Hc32 pr 20260910 - #11798
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_hc32Reviewers: @levizh Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-09-14 09:54 CST)
📝 Review Instructions
|
|
@Rbb666 Hi,请帮忙合并PR,对HC32 BSP做了一些更新,谢谢 |
There was a problem hiding this comment.
rtconfig.h不要进行格式化,保持env生成的格式即可,然后也可以添加到忽略格式化脚本中
There was a problem hiding this comment.
好的,谢谢提醒,rtconfig.h文件已恢复,格式化脚本已忽略rtconfig.h文件
There was a problem hiding this comment.
🟡 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.
| | **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 开发板 | |
| | **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 开发板 | |
| | [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 |
拉取/合并请求描述:(PR description)
[
]
当前拉取/合并请求的状态 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