Skip to content

[stm32][bsp] Add initial BSP for stm32h723-dm-mc02#11450

Merged
Rbb666 merged 1 commit into
RT-Thread:masterfrom
moment-NEW:master
Jun 22, 2026
Merged

[stm32][bsp] Add initial BSP for stm32h723-dm-mc02#11450
Rbb666 merged 1 commit into
RT-Thread:masterfrom
moment-NEW:master

Conversation

@moment-NEW

@moment-NEW moment-NEW commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

拉取/合并请求描述:(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)

  • BSP:bsp\stm32\stm32h723-DM-MC02
  • .config:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  • 将目标分支设置为 \ Set the target branch to:master
  • 设置PR number为 \ Set the PR number to:11450
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将自动推送至你的分支。
    The formatted code will be automatically pushed to your branch.

完成后,提交将自动更新至 master 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the master branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@github-actions github-actions Bot added BSP: STM32 BSP related with ST/STM32 BSP action github action yml imporve labels Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

📌 Code Review Assignment

🏷️ Tag: bsp_stm32

Reviewers: Liang1795 hamburger-os wdfk-prog

Changed Files (Click to expand)
  • bsp/stm32/stm32h723-DM-MC02/.config
  • bsp/stm32/stm32h723-DM-MC02/.gitignore
  • bsp/stm32/stm32h723-DM-MC02/EventRecorderStub.scvd
  • bsp/stm32/stm32h723-DM-MC02/Kconfig
  • bsp/stm32/stm32h723-DM-MC02/README.md
  • bsp/stm32/stm32h723-DM-MC02/SConscript
  • bsp/stm32/stm32h723-DM-MC02/SConstruct
  • bsp/stm32/stm32h723-DM-MC02/applications/SConscript
  • bsp/stm32/stm32h723-DM-MC02/applications/main.c
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/.mxproject
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/CubeMX_Config.ioc
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/main.h
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/stm32h7xx_hal_conf.h
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Inc/stm32h7xx_it.h
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/main.c
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/stm32h7xx_hal_msp.c
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/stm32h7xx_it.c
  • bsp/stm32/stm32h723-DM-MC02/board/CubeMX_Config/Src/system_stm32h7xx.c
  • bsp/stm32/stm32h723-DM-MC02/board/Kconfig
  • bsp/stm32/stm32h723-DM-MC02/board/SConscript
  • bsp/stm32/stm32h723-DM-MC02/board/board.c
  • bsp/stm32/stm32h723-DM-MC02/board/board.h
  • bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.icf
  • bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.lds
  • bsp/stm32/stm32h723-DM-MC02/board/linker_scripts/link.sct
  • bsp/stm32/stm32h723-DM-MC02/figures/board.png
  • bsp/stm32/stm32h723-DM-MC02/figures/power.png
  • bsp/stm32/stm32h723-DM-MC02/project.ewp

🏷️ Tag: workflow

Reviewers: Rbb666 kurisaW supperthomas

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json

📊 Current Review Status (Last Updated: 2026-06-22 16:41 CST)

  • Liang1795 Pending Review
  • Rbb666 Pending Review
  • hamburger-os Pending Review
  • kurisaW Pending Review
  • supperthomas Pending Review
  • wdfk-prog Pending Review

📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@moment-NEW

Copy link
Copy Markdown
Contributor Author

PTAL? @Rbb666 @supperthomas

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ROOT is only set when the environment variable exists; otherwise it remains undefined. Some RT-Thread tooling/BSP scripts expect rtconfig.RTT_ROOT to always exist, so this can cause runtime errors. Add a default fallback (commonly repo root via os.path.normpath(os.getcwd() + '/../../..')) in an else: branch.
    bsp/stm32/stm32h723-DM-MC02/rtconfig.py:1
  • Hardcoding developer-specific EXEC_PATH values makes the BSP non-portable and breaks builds on other machines/CI environments. Prefer leaving EXEC_PATH empty by default and requiring RTT_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 \\l are 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 with r'') to avoid escape issues and improve portability.
    bsp/stm32/tools/sdk_dist.py:1
  • When Kconfig is missing, the dist build now silently skips copying it. That avoids a hard failure but may produce an incomplete SDK package that later fails menuconfig in the dist output. Consider logging a clear warning (or raising if the BSP expects it) so missing configuration files are detected early.

Comment on lines +18 to +21
def bsp_pkg_check():
import subprocess

check_paths = [

@moment-NEW moment-NEW Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实多余,但所有其他 STM32 BSP 也都有这行,是模板遗留。如果需要更改请麻烦确认一下()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没事,这个留着吧

Comment on lines +12 to +14
CPPDEFINES = ['STM32H723xx']

group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Comment on lines +2 to +3
* linker script for STM32F4xx with GNU ld
* bernard.xiong 2009-10-14

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个问题遗留自复制的模板。即使是在H7模板中,如link.lds,其中也是

/*
 * linker script for STM32F4xx with GNU ld
 * bernard.xiong 2009-10-14
 */

*.lib
*.i
*.d
.DS_Stor*
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

@moment-NEW

Copy link
Copy Markdown
Contributor Author

应该修好了,我顺便把提交合并成了一个,麻烦再看看? @Rbb666 @supperthomas

@Rbb666

Rbb666 commented Jun 22, 2026

Copy link
Copy Markdown
Member

这个文档添加完善下:

https://github.com/RT-Thread/rt-thread/blob/master/bsp/README.md

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.
@moment-NEW

Copy link
Copy Markdown
Contributor Author

这个文档添加完善下:

https://github.com/RT-Thread/rt-thread/blob/master/bsp/README.md

已添加,bsp/README.md

@Rbb666 Rbb666 merged commit abb0889 into RT-Thread:master Jun 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action github action yml imporve BSP: STM32 BSP related with ST/STM32 BSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants