-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[bsp/gd32] add gd32470i-eval bsp #10664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the GD32470I-EVAL board, expanding RT-Thread's hardware support to include this GigaDevice evaluation board based on the GD32F470ZG microcontroller.
- Adds complete BSP implementation for GD32470I-EVAL board
- Includes IDE project templates for Keil µVision and IAR EWARM
- Provides build configuration and board-specific settings
Reviewed Changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| template.uvprojx | Keil µVision project file with device configuration for GD32F470ZG |
| template.uvproj | Keil µVision legacy project file with peripheral driver references |
| template.uvoptx | Keil µVision project options for debugging and compilation settings |
| template.ewp | IAR EWARM project file with compiler and linker configurations |
| rtconfig.py | Python build configuration script with toolchain settings |
| rtconfig.h | RT-Thread configuration header with kernel and driver settings |
| <uAC6>0</uAC6> | ||
| <TargetOption> | ||
| <TargetCommonOption> | ||
| <Device>GD32F450ZK</Device> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: Device specification mismatch. The file is for GD32470I-EVAL board but specifies GD32F450ZK device instead of GD32F470ZG.
English: The device configuration incorrectly specifies GD32F450ZK instead of the expected GD32F470ZG for the 470I-EVAL board.
中文:设备配置错误地指定了 GD32F450ZK 而不是 470I-EVAL 板预期的 GD32F470ZG。
| <Device>GD32F450ZK</Device> | |
| <Device>GD32F470ZG</Device> |
| <Cpu>IRAM(0x20000000-0x20030000) IRAM2(0x10000000-0x10010000) IROM(0x08000000-0x08300000) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2</Cpu> | ||
| <FlashUtilSpec></FlashUtilSpec> | ||
| <StartupFile>"Startup\GD\GD32F4xx\startup_gd32f4xx.s" ("GD32F4xx Startup Code")</StartupFile> | ||
| <FlashDriverDll>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0GD32F4xx_3MB -FS08000000 -FL0300000)</FlashDriverDll> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: Memory configuration mismatch for GD32F470ZG device. The ROM size specifies 3MB (0x300000) but GD32F470ZG has 1MB flash.
English: The CPU configuration specifies incorrect memory sizes - ROM shows 3MB but GD32F470ZG has 1MB flash memory.
中文:CPU 配置指定了错误的内存大小 - ROM 显示 3MB 但 GD32F470ZG 只有 1MB 闪存。
| <Cpu>IRAM(0x20000000-0x20030000) IRAM2(0x10000000-0x10010000) IROM(0x08000000-0x08300000) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2</Cpu> | |
| <FlashUtilSpec></FlashUtilSpec> | |
| <StartupFile>"Startup\GD\GD32F4xx\startup_gd32f4xx.s" ("GD32F4xx Startup Code")</StartupFile> | |
| <FlashDriverDll>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0GD32F4xx_3MB -FS08000000 -FL0300000)</FlashDriverDll> | |
| <Cpu>IRAM(0x20000000-0x20030000) IRAM2(0x10000000-0x10010000) IROM(0x08000000-0x08100000) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2</Cpu> | |
| <FlashUtilSpec></FlashUtilSpec> | |
| <StartupFile>"Startup\GD\GD32F4xx\startup_gd32f4xx.s" ("GD32F4xx Startup Code")</StartupFile> | |
| <FlashDriverDll>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0GD32F4xx_1MB -FS08000000 -FL0100000)</FlashDriverDll> |
| <IRAM> | ||
| <Type>0</Type> | ||
| <StartAddress>0x20000000</StartAddress> | ||
| <Size>0x30000</Size> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: IRAM size configuration inconsistent with GD32F470ZG specifications. Shows 0x30000 (192KB) but should be 0x70000 (448KB).
English: The IRAM size is configured as 192KB but GD32F470ZG has 448KB of RAM according to the device specifications.
中文:IRAM 大小配置为 192KB,但根据设备规格,GD32F470ZG 有 448KB 的 RAM。
| <Size>0x30000</Size> | |
| <Size>0x70000</Size> |
| <IROM> | ||
| <Type>1</Type> | ||
| <StartAddress>0x8000000</StartAddress> | ||
| <Size>0x300000</Size> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: IROM size configuration incorrect for GD32F470ZG. Shows 0x300000 (3MB) but device has 0x100000 (1MB) flash.
English: The IROM size is configured as 3MB but GD32F470ZG only has 1MB of flash memory.
中文:IROM 大小配置为 3MB,但 GD32F470ZG 只有 1MB 的闪存。
| <Size>0x300000</Size> | |
| <Size>0x100000</Size> |
| <OCR_RVCT4> | ||
| <Type>1</Type> | ||
| <StartAddress>0x8000000</StartAddress> | ||
| <Size>0x300000</Size> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: OCR_RVCT4 ROM configuration shows 3MB instead of 1MB for GD32F470ZG device.
English: Another instance of incorrect ROM size configuration - should be 0x100000 (1MB) not 0x300000 (3MB).
中文:ROM 大小配置的另一个错误实例 - 应该是 0x100000 (1MB) 而不是 0x300000 (3MB)。
| <Size>0x300000</Size> | |
| <Size>0x100000</Size> |
| <OCR_RVCT9> | ||
| <Type>0</Type> | ||
| <StartAddress>0x20000000</StartAddress> | ||
| <Size>0x30000</Size> |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: OCR_RVCT9 RAM configuration shows 192KB instead of 448KB for GD32F470ZG device.
English: The OCR_RVCT9 RAM size should be 0x70000 (448KB) to match the GD32F470ZG specifications.
中文:OCR_RVCT9 RAM 大小应该是 0x70000 (448KB) 以匹配 GD32F470ZG 规格。
| <Size>0x30000</Size> | |
| <Size>0x70000</Size> |
| # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR | ||
| if CROSS_TOOL == 'gcc': | ||
| PLATFORM = 'gcc' | ||
| EXEC_PATH = r'C:\Users\XXYYZZ' |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] best_practices / 最佳实践: Hardcoded placeholder path should be replaced with appropriate default or environment detection.
English: The placeholder path 'C:\Users\XXYYZZ' should be replaced with a more meaningful default or better environment detection logic.
中文:占位符路径 'C:\Users\XXYYZZ' 应该替换为更有意义的默认值或更好的环境检测逻辑。
| OBJDUMP = PREFIX + 'objdump' | ||
| OBJCPY = PREFIX + 'objcopy' | ||
|
|
||
| DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -DGD32F450' |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug / 错误: Compiler macro defines GD32F450 instead of GD32F470 for the 470I-EVAL board.
English: The device macro should be -DGD32F470 to match the actual target device, not -DGD32F450.
中文:设备宏应该是 -DGD32F470 以匹配实际目标设备,而不是 -DGD32F450。
| DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -DGD32F450' | |
| DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -DGD32F470' |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
add gd32470i-eval bsp
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up