[stm32][bsp] Add initial BSP for stm32h723-dm-mc02#11450
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-06-22 16:41 CST)
📝 Review Instructions
|
|
PTAL? @Rbb666 @supperthomas |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR adds an initial RT-Thread BSP port for the stm32h723-DM-MC02 board and wires it into CI BSP compilation.
Changes:
- Added a new BSP directory (
bsp/stm32/stm32h723-DM-MC02) with board files, build scripts, configs, and IDE templates. - Added STM32H7 CubeMX-generated configuration sources/headers and linker scripts for GCC/Keil/IAR.
- Updated STM32 BSP distribution tooling and CI BSP compile list to include the new board.
Reviewed changes
Copilot reviewed 37 out of 39 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bsp/stm32/tools/sdk_dist.py | Avoids failing distro build when a library Kconfig is absent |
| bsp/stm32/stm32h723-DM-MC02/template.uvprojx | Adds Keil MDK project template for the board |
| bsp/stm32/stm32h723-DM-MC02/template.uvoptx | Adds Keil MDK options template for the board |
| bsp/stm32/stm32h723-DM-MC02/template.eww | Adds IAR workspace template |
| bsp/stm32/stm32h723-DM-MC02/rtconfig.py | Adds toolchain/build configuration for this BSP |
| bsp/stm32/stm32h723-DM-MC02/rtconfig.h | Adds generated RT-Thread configuration header |
| bsp/stm32/stm32h723-DM-MC02/project.uvoptx | Adds concrete Keil project options for checked-in project |
| bsp/stm32/stm32h723-DM-MC02/project.eww | Adds concrete IAR workspace for checked-in project |
| bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.sct | Adds Keil scatter file for memory layout |
| bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.lds | Adds GCC linker script for flash/RAM layout |
| bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.icf | Adds IAR linker configuration |
| bsp/stm32/stm32h723-DM-MC02/board/board.h | Adds board-level definitions (heap, flash/ram layout, includes) |
| bsp/stm32/stm32h723-DM-MC02/board/board.c | Adds clock configuration implementation |
| bsp/stm32/stm32h723-DM-MC02/board/SConscript | Adds SCons build rules for board sources |
| bsp/stm32/stm32h723-DM-MC02/board/Kconfig | Adds Kconfig options for on-chip peripherals used by this BSP |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/system_stm32h7xx.c | Adds CubeMX system init/clock update implementation |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/stm32h7xx_it.c | Adds CubeMX interrupt handlers |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/stm32h7xx_hal_msp.c | Adds CubeMX MSP init (GPIO/UART clock/pins) |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/main.c | Adds CubeMX standalone main (likely for reference/regeneration) |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/stm32h7xx_it.h | Adds CubeMX ISR header |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/stm32h7xx_hal_conf.h | Adds HAL module configuration header |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/main.h | Adds CubeMX main header |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/CubeMX_Config.ioc | Adds CubeMX project configuration |
| bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/.mxproject | Adds CubeMX metadata for regeneration |
| bsp/stm32/stm32h723-DM-MC02/applications/main.c | Adds RT-Thread user main loop |
| bsp/stm32/stm32h723-DM-MC02/applications/SConscript | Adds SCons build rules for application sources |
| bsp/stm32/stm32h723-DM-MC02/SConstruct | Adds BSP top-level SCons build entry |
| bsp/stm32/stm32h723-DM-MC02/SConscript | Adds BSP module SConscript wiring and chip define |
| bsp/stm32/stm32h723-DM-MC02/README.md | Adds BSP documentation and bring-up instructions |
| bsp/stm32/stm32h723-DM-MC02/Kconfig | Adds BSP root Kconfig for SoC selection and driver menus |
| bsp/stm32/stm32h723-DM-MC02/EventRecorderStub.scvd | Adds Keil EventRecorder stub metadata |
| bsp/stm32/stm32h723-DM-MC02/.gitignore | Adds BSP-local ignore patterns (build artifacts, packages, IDE outputs) |
| .github/ALL_BSP_COMPILE.json | Adds this BSP to CI compile matrix |
Comments suppressed due to low confidence (4)
bsp/stm32/stm32h723-DM-MC02/rtconfig.py:1
RTT_ROOTis only set when the environment variable exists; otherwise it remains undefined. Some RT-Thread tooling/BSP scripts expectrtconfig.RTT_ROOTto always exist, so this can cause runtime errors. Add a default fallback (commonly repo root viaos.path.normpath(os.getcwd() + '/../../..')) in anelse:branch.
bsp/stm32/stm32h723-DM-MC02/rtconfig.py:1- Hardcoding developer-specific
EXEC_PATHvalues makes the BSP non-portable and breaks builds on other machines/CI environments. Prefer leavingEXEC_PATHempty by default and requiringRTT_EXEC_PATH(or a well-known installation path) to be set externally, or use a documented, generic default that doesn't embed user names.
bsp/stm32/stm32h723-DM-MC02/rtconfig.py:1 - This string literal contains Windows backslashes; in Python, sequences like
\\lare treated as invalid escape sequences (raising deprecation warnings and risking future breakage). Use forward slashes (board/linker_scripts/link.sct) or a raw string literal (prefix withr'') to avoid escape issues and improve portability.
bsp/stm32/tools/sdk_dist.py:1 - When
Kconfigis missing, the dist build now silently skips copying it. That avoids a hard failure but may produce an incomplete SDK package that later failsmenuconfigin the dist output. Consider logging a clear warning (or raising if the BSP expects it) so missing configuration files are detected early.
| def bsp_pkg_check(): | ||
| import subprocess | ||
|
|
||
| check_paths = [ |
There was a problem hiding this comment.
确实多余,但所有其他 STM32 BSP 也都有这行,是模板遗留。如果需要更改请麻烦确认一下()
| CPPDEFINES = ['STM32H723xx'] | ||
|
|
||
| group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) |
| * linker script for STM32F4xx with GNU ld | ||
| * bernard.xiong 2009-10-14 |
There was a problem hiding this comment.
这个问题遗留自复制的模板。即使是在H7模板中,如link.lds,其中也是
/*
* linker script for STM32F4xx with GNU ld
* bernard.xiong 2009-10-14
*/
| *.lib | ||
| *.i | ||
| *.d | ||
| .DS_Stor* |
|
应该修好了,我顺便把提交合并成了一个,麻烦再看看? @Rbb666 @supperthomas |
Add initial BSP support for the DM-MC02 board based on STM32H723VGT6. Supported peripherals (Stage 1): - GPIO (RT_USING_PIN) - UART1 as FinSH console Note: Onboard WS2812 LED and other peripherals are planned for Stage 2. Also update bsp/README.md BSP support summary table.
已添加,bsp/README.md |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
添加达妙喵板的BSP(Add initial BSP for stm32h723-dm-mc02)
你的解决方案是什么 (what is your solution)
本次 PR 完成了 stm32h723-dm-mc02 的基础 BSP 适配(This PR provides the initial BSP adaptation for stm32h723-dm-mc02.)
备注:(Notes:)
板载 WS2812 灯板暂未纳入第一阶段 BSP,计划作为第二阶段板载外设支持内容单独补充(The onboard WS2812 LED is not included in this stage-1 BSP and is planned for stage-2 peripheral support)
请提供验证的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