[bsp][stm32] add a new bsp for MCU STM32F407ZET6#11414
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_stm32Reviewers: Liang1795 hamburger-os wdfk-prog Changed Files (Click to expand)
🏷️ Tag: workflowReviewers: Rbb666 kurisaW supperthomas Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-05-27 16:28 CST)
📝 Review Instructions
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new STM32 BSP (bsp/stm32/stm32f407-industrial-board) targeting STM32F407ZET6, including build/config files, board initialization, and IDE project templates, and registers the BSP in the CI compile list.
本次 PR 新增一个 STM32 BSP(bsp/stm32/stm32f407-industrial-board),面向 STM32F407ZET6,包含构建/配置文件、板级初始化与 IDE 工程模板,并将该 BSP 加入 CI 编译列表。
Changes / 变更:
- Add new BSP directory with SCons/Kconfig/rtconfig and board bring-up + linker scripts. / 新增 BSP 目录,包含 SCons/Kconfig/rtconfig、板级初始化与链接脚本。
- Add MDK/IAR project/template files and CubeMX configuration artifacts for the board. / 增加 MDK/IAR 工程与模板文件,以及 CubeMX 配置产物。
- Register the BSP in
.github/ALL_BSP_COMPILE.jsonfor CI compilation. / 在.github/ALL_BSP_COMPILE.json中注册该 BSP 以便 CI 编译。
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/ALL_BSP_COMPILE.json | Adds the new BSP path to the STM32 F2/F4 CI compile list. |
| bsp/stm32/stm32f407-industrial-board/.config | Default BSP configuration used by Env/menuconfig. |
| bsp/stm32/stm32f407-industrial-board/.gitignore | BSP-local ignore rules for build outputs and IDE artifacts. |
| bsp/stm32/stm32f407-industrial-board/Kconfig | BSP-level Kconfig entry wiring RT-Thread/Kconfig, packages, and board Kconfig. |
| bsp/stm32/stm32f407-industrial-board/README.md | Board/BSP usage guide and peripheral support notes. |
| bsp/stm32/stm32f407-industrial-board/SConscript | Top-level SCons script to include subdirectories. |
| bsp/stm32/stm32f407-industrial-board/SConstruct | SCons build entry for toolchain setup and package presence check. |
| bsp/stm32/stm32f407-industrial-board/rtconfig.h | Generated RT-Thread configuration header for this BSP. |
| bsp/stm32/stm32f407-industrial-board/rtconfig.py | Toolchain and build flags configuration for GCC/Keil/IAR. |
| bsp/stm32/stm32f407-industrial-board/applications/SConscript | SCons rules for building application sources. |
| bsp/stm32/stm32f407-industrial-board/applications/main.c | Sample app (LED blink + key IRQ demo). |
| bsp/stm32/stm32f407-industrial-board/board/SConscript | SCons rules for board sources and CubeMX includes. |
| bsp/stm32/stm32f407-industrial-board/board/board.c | Board clock configuration implementation. |
| bsp/stm32/stm32f407-industrial-board/board/board.h | Board-level definitions (flash/heap bounds) and prototypes. |
| bsp/stm32/stm32f407-industrial-board/board/Kconfig | Board driver options (GPIO/UART/etc.) and HAL driver Kconfig include. |
| bsp/stm32/stm32f407-industrial-board/board/linker_scripts/link.icf | IAR linker configuration. |
| bsp/stm32/stm32f407-industrial-board/board/linker_scripts/link.lds | GCC linker script for this BSP. |
| bsp/stm32/stm32f407-industrial-board/board/linker_scripts/link.sct | Keil scatter file. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/.mxproject | CubeMX project metadata. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/CubeMX_Config.ioc | CubeMX IOC configuration for the board. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/generate.script | Script to generate code from CubeMX IOC. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Inc/main.h | CubeMX generated header. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Inc/stm32f4xx_hal_conf.h | CubeMX HAL configuration header. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Inc/stm32f4xx_it.h | CubeMX interrupt header. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Src/main.c | CubeMX generated main (reference artifact). |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Src/stm32f4xx_hal_msp.c | CubeMX generated MSP init (pins/clocks). |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Src/stm32f4xx_it.c | CubeMX generated ISR stubs. |
| bsp/stm32/stm32f407-industrial-board/board/CubeMX_Config/Src/system_stm32f4xx.c | CubeMX generated CMSIS system file. |
| bsp/stm32/stm32f407-industrial-board/project.ewd | IAR debug settings project file. |
| bsp/stm32/stm32f407-industrial-board/project.ewp | IAR project file. |
| bsp/stm32/stm32f407-industrial-board/project.eww | IAR workspace file. |
| bsp/stm32/stm32f407-industrial-board/project.uvoptx | MDK5 uVision options file. |
| bsp/stm32/stm32f407-industrial-board/project.uvproj | MDK4 uVision project file. |
| bsp/stm32/stm32f407-industrial-board/project.uvprojx | MDK5 uVision project file. |
| bsp/stm32/stm32f407-industrial-board/template.ewp | IAR template project file. |
| bsp/stm32/stm32f407-industrial-board/template.eww | IAR template workspace file. |
| bsp/stm32/stm32f407-industrial-board/template.uvopt | MDK4 template options file. |
| bsp/stm32/stm32f407-industrial-board/template.uvoptx | MDK5 template options file. |
| bsp/stm32/stm32f407-industrial-board/template.uvproj | MDK4 template project file. |
| bsp/stm32/stm32f407-industrial-board/template.uvprojx | MDK5 template project file. |
| bsp/stm32/stm32f407-industrial-board/figures/board.jpg | Board photo referenced by README. |
| /* KEY0: pull-down + rising edge; KEY1: pull-up + falling edge (active low) */ | ||
| rt_pin_attach_irq(KEY0_PIN, PIN_IRQ_MODE_RISING, key0_irq_callback, RT_NULL); | ||
| rt_pin_attach_irq(KEY1_PIN, PIN_IRQ_MODE_FALLING, key1_irq_callback, RT_NULL); | ||
| rt_pin_irq_enable(KEY0_PIN, PIN_IRQ_ENABLE); | ||
| rt_pin_irq_enable(KEY1_PIN, PIN_IRQ_ENABLE); |
| /* defined the LED1 pin: PC1 */ | ||
| #define LED1_PIN GET_PIN(F, 10) | ||
| /* defined the LED2 pin: PC0 */ |
| <Device>STM32F407ZG</Device> | ||
| <Vendor>STMicroelectronics</Vendor> | ||
| <Cpu>IRAM(0x20000000-0x2001FFFF) IRAM2(0x10000000-0x1000FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) CPUTYPE("Cortex-M4") FPU2</Cpu> | ||
| <FlashUtilSpec></FlashUtilSpec> | ||
| <StartupFile>"Startup\ST\STM32F4xx\startup_stm32f40_41xxx.s" ("STM32F40/41xxx Startup Code")</StartupFile> | ||
| <FlashDriverDll>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000)</FlashDriverDll> | ||
| <DeviceId>6105</DeviceId> |
| "stm32/stm32f407-robomaster-c", | ||
| "stm32/stm32f407-st-discovery", | ||
| "stm32/stm32f407-micu", | ||
| "stm32/stm32f407-industrial-board", |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
可以添加一下MAINTAINERS信息,谢谢! |

拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
add a new bsp for MCU STM32F407ZET6
你的解决方案是什么 (what is your solution)
add BSP files in directory bsp\stm32
请提供验证的bsp和config (provide the config and 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