Skip to content

Hc32 pr 20260910 - #11798

Open
Leeto1970 wants to merge 4 commits into
RT-Thread:masterfrom
levizh:hc32_pr_20260910
Open

Hc32 pr 20260910#11798
Leeto1970 wants to merge 4 commits into
RT-Thread:masterfrom
levizh:hc32_pr_20260910

Conversation

@Leeto1970

Copy link
Copy Markdown
Contributor

拉取/合并请求描述:(PR description)

[

  • Update support README
  • Sync 'CONFIG_RT_NAME_MAX'
  • Modify pm_config.h
  • Regenerate project files
    ]

当前拉取/合并请求的状态 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
  • 已经使用clang-format 源码格式化工具确保格式符合RT-Thread代码规范 This PR has been formatted with clang-format and complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

@github-actions

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

  • Use workflow from 保持默认分支(通常为 master
    Keep the default branch (usually master) in Use workflow from
  • branch 输入框填写 PR 分支 hc32_pr_20260910
    Enter PR branch hc32_pr_20260910 in the branch field
  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将作为独立提交推送至你的分支。
    The formatting changes will be pushed to your branch as a separate commit.

完成后,提交将自动更新至 hc32_pr_20260910 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the hc32_pr_20260910 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 BSP: HC32 BSP related with HC32 labels Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown

📌 Code Review Assignment

🏷️ Tag: bsp_hc32

Reviewers: @levizh

Changed Files (Click to expand)
  • bsp/hc32/.clang-format-ignore
  • bsp/hc32/README.md
  • bsp/hc32/ev_hc32f334_lqfp64/.config
  • bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h
  • bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h
  • bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h
  • bsp/hc32/ev_hc32f448_lqfp80/.config
  • bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h
  • bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h
  • bsp/hc32/ev_hc32f460_lqfp100_v2/.config
  • bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig
  • bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h
  • bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h
  • bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h
  • bsp/hc32/ev_hc32f467_lqfp144/project.ewp
  • bsp/hc32/ev_hc32f467_lqfp144/project.uvoptx
  • bsp/hc32/ev_hc32f467_lqfp144/project.uvprojx
  • bsp/hc32/ev_hc32f472_lqfp100/.config
  • bsp/hc32/ev_hc32f472_lqfp100/board/config/pm_config.h
  • bsp/hc32/ev_hc32f472_lqfp100/board/ports/usb_config.h
  • bsp/hc32/ev_hc32f472_lqfp100/project.ewp
  • bsp/hc32/ev_hc32f472_lqfp100/project.uvprojx
  • bsp/hc32/ev_hc32f472_lqfp100/rtconfig.h
  • bsp/hc32/ev_hc32f4a0_lqfp176/.config
  • bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig
  • bsp/hc32/ev_hc32f4a0_lqfp176/board/config/pm_config.h
  • bsp/hc32/ev_hc32f4a0_lqfp176/board/hc32f4xx_conf.h
  • bsp/hc32/ev_hc32f4a0_lqfp176/board/ports/usb_config.h
  • bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h
  • bsp/hc32/ev_hc32f4a2_lqfp176/.config

📊 Current Review Status (Last Updated: 2026-09-14 09:54 CST)


📝 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.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@Leeto1970

Copy link
Copy Markdown
Contributor Author

@Rbb666 Hi,请帮忙合并PR,对HC32 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.

rtconfig.h不要进行格式化,保持env生成的格式即可,然后也可以添加到忽略格式化脚本中

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.

好的,谢谢提醒,rtconfig.h文件已恢复,格式化脚本已忽略rtconfig.h文件

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.

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR maintains the HC32 BSP by synchronizing configuration values, regenerating project files, migrating CherryUSB glue to the shared implementation, and cleaning driver formatting/validation. / 本 PR 用于维护 HC32 BSP,统一配置、重新生成工程文件,并迁移 CherryUSB glue。

Changes:

  • Synchronizes RT_NAME_MAX, PM configuration, and SDIO/DFS dependencies.
  • Removes duplicated HC32 CherryUSB glue.
  • Updates driver guards, validation, documentation, and generated projects.
File summaries
File Description
bsp/hc32/tests/test_soft_i2c.c Updated as part of this pull request.
bsp/hc32/tests/test_clock_timer.c Updated as part of this pull request.
bsp/hc32/README.md Updated as part of this pull request.
bsp/hc32/platform/cherryusb/SConscript Updated as part of this pull request.
bsp/hc32/platform/cherryusb/cherryusb_port.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_usart.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_usart_v2.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_spi.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_pwm.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_pm.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_irq.c Updated as part of this pull request.
bsp/hc32/libraries/hc32_drivers/drv_can.c Updated as part of this pull request.
bsp/hc32/lckfb-hc32f4a0-lqfp100/board/Kconfig Updated as part of this pull request.
bsp/hc32/lckfb-hc32f4a0-lqfp100/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/lckfb-hc32f4a0-lqfp100/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/board/ports/usb_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/board/Kconfig Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/board/config/mcan_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a8_lqfp176/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f4a2_lqfp176/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a2_lqfp176/project.uvprojx Updated as part of this pull request.
bsp/hc32/ev_hc32f4a2_lqfp176/project.ewp Updated as part of this pull request.
bsp/hc32/ev_hc32f4a2_lqfp176/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/board/ports/usb_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/board/hc32f4xx_conf.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f4a0_lqfp176/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/project.uvprojx Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/project.ewp Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/board/ports/usb_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f472_lqfp100/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f467_lqfp144/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f467_lqfp144/project.uvprojx Updated as part of this pull request.
bsp/hc32/ev_hc32f467_lqfp144/project.uvoptx Updated as part of this pull request.
bsp/hc32/ev_hc32f467_lqfp144/project.ewp Updated as part of this pull request.
bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig Updated as part of this pull request.
bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f460_lqfp100_v2/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f448_lqfp80/.config Updated as part of this pull request.
bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h Updated as part of this pull request.
bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h Updated as part of this pull request.
bsp/hc32/ev_hc32f334_lqfp64/.config Updated as part of this pull request.
Review details

Suppressed comments (3)

bsp/hc32/README.md:14

  • [discrepancy_with_pr_description/PR 描述]: The description only lists broad actions and does not explain the motivation, affected boards/files, or validation performed. Please add the what/why/how and test or build results before marking the PR mature. / PR 描述仅列出笼统的修改事项,没有说明动机、受影响的开发板或文件,也没有验证结果;在标记为成熟版本前请补充 what/why/how 及测试或编译结果。
| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176)        | 小华 官方 EV_F467_LQ144 开发板    |

bsp/hc32/README.md:14

  • [codebase_conventions/代码库约定]: Commit message format / Commit 消息格式

English: All three commits use the uppercase [HC32] prefix and omit the subsystem, while the repository checklist requires a lowercase [module][subsystem] form. Please rename them with a consistent prefix such as [hc32][bsp] (for example, [hc32][bsp] Sync HC32 series configuration and project files).
中文:三个 commit 都使用大写的 [HC32] 前缀且缺少子系统,而仓库检查项要求小写的 [module][subsystem] 格式。请统一改为类似 [hc32][bsp] 的前缀,例如 [hc32][bsp] Sync HC32 series configuration and project files

| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176)        | 小华 官方 EV_F467_LQ144 开发板    |

bsp/hc32/README.md:14

  • [codebase_conventions/代码库约定]: Routine formatting commit should be squashed / 常规格式化 commit 应压缩

English: The standalone [HC32] Run 'clang-format' to formate code. commit is a routine formatting change split from the functional/configuration work. Please squash it into the related code commits so the history remains focused; keep the drv_irq.c compile fix separate only if it needs independent review.
中文:独立的 [HC32] Run 'clang-format' to formate code. commit 只是常规格式化修改,却与功能/配置修改分开。请将其压缩到相关代码 commit 中,使提交历史更聚焦;只有在需要独立审查时才保留 drv_irq.c 编译修复为单独 commit。

| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176)        | 小华 官方 EV_F467_LQ144 开发板    |
  • Files reviewed: 51/53 changed files
  • Comments generated: 13
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread bsp/hc32/README.md
| **F4 系列** | |
| [ev_hc32f448_lqfp80](ev_hc32f448_lqfp80) | 小华 官方 EV_F448_LQ80 开发板 |
| [ev_hc32f460_lqfp100_v2](ev_hc32f460_lqfp100_v2) | 小华 官方 EV_F460_LQ100_V2 开发板 |
| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176) | 小华 官方 EV_F467_LQ144 开发板 |
Comment thread bsp/hc32/README.md
| **F4 系列** | |
| [ev_hc32f448_lqfp80](ev_hc32f448_lqfp80) | 小华 官方 EV_F448_LQ80 开发板 |
| [ev_hc32f460_lqfp100_v2](ev_hc32f460_lqfp100_v2) | 小华 官方 EV_F460_LQ100_V2 开发板 |
| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176) | 小华 官方 EV_F467_LQ144 开发板 |
Comment thread bsp/hc32/README.md
| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176) | 小华 官方 EV_F467_LQ144 开发板 |
| [ev_hc32f472_lqfp100](ev_hc32f472_lqfp100) | 小华 官方 EV_F472_LQ100 开发板 |
| [ev_hc32f4a0_lqfp176](ev_hc32f4a0_lqfp176) | 小华 官方 EV_F4A0_LQ176 开发板 |
| [ev_hc32f4a2_lqfp176](ev_hc32f4a2_lqfp176) | 小华 官方 EV_F4A0_LQ176 开发板 |
1. MCAN1 and MCAN2 share 2048 bytes message RAM
2. User can modify the definitions of filter number, Rx FIFO number, Tx FIFO number.
3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default.
3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default.
* Change Logs:
* Date Author Notes
* 2024-02-20 CDT first version
* 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer
* Change Logs:
* Date Author Notes
* 2024-02-20 CDT first version
* 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer
* Date Author Notes
* 2023-05-12 CDT first version
* 2024-06-13 CDT disable pm tickless timer
* 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer
1. MCAN1 and MCAN2 share 4K bytes message RAM
2. User can modify the definitions of filter number, Rx FIFO number, Tx FIFO number.
3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default.
3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default.
* Date Author Notes
* 2023-05-12 CDT first version
* 2024-06-13 CDT disable pm tickless timer
* 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer
* Change Logs:
* Date Author Notes
* 2023-05-12 CDT first version
* 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BSP: HC32 BSP related with HC32 BSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants