Skip to content

refactor(firmware/c_board): Externalize STM32 HAL/CMSIS via submodules#26

Merged
qzhhhi merged 2 commits intomainfrom
dev/refactor-cubemx
Feb 27, 2026
Merged

refactor(firmware/c_board): Externalize STM32 HAL/CMSIS via submodules#26
qzhhhi merged 2 commits intomainfrom
dev/refactor-cubemx

Conversation

@qzhhhi
Copy link
Member

@qzhhhi qzhhhi commented Feb 27, 2026

  • Move CubeMX-generated project files from bsp/HAL to cubemx
  • Replace vendored STM32 HAL/CMSIS sources with git submodules (cmsis-core, cmsis-device-f4, stm32f4xx-hal-driver)
  • Update firmware CMake and presets to use new paths
  • Patch CubeMX CMake integration to use repository variables and PRIVATE link scope for project libraries
  • Add .scripts/patch_cubemx to remove redundant generated files and rewrite absolute include/source paths
  • Update related path references (e.g. startup file comment)

No functional behavior change intended.

PR #26 - 通过子模块外部化 STM32 HAL/CMSIS(更新)

概述

将 firmware/c_board 项目中的 CubeMX/STM32 HAL/CMSIS 相关源从仓库内的直写副本迁移为外部 git 子模块管理;同时调整 CubeMX 生成的 CMake 集成、更新 CMake 配置/预设并添加自动化补丁脚本以修正生成文件的绝对路径与冗余产物。目标为重构与路径、依赖管理清理;不引入功能行为变更。

主要变更

  1. 子模块(.gitmodules)
  1. CubeMX 补丁脚本
  • 新增 .scripts/patch_cubemx(Python 脚本):
    • 删除已知的冗余/过时生成文件(STALE_FILES 列表)。
    • 对 cubemx/cmake/stm32cubemx 下的 CMakeLists.txt 应用一系列正则替换(PATCH_RULES),将绝对路径重写为使用仓库变量 (${LIBRMCS_*_ROOT} 等)、并把项目 link libraries 转为 PRIVATE ${MX_LINK_LIBS}。
    • 校验是否仍存在未解决的绝对路径,只有在变更时写回文件,并在错误情况下给出明确提示。
  1. CMake 与预设更新
  • firmware/c_board/CMakeLists.txt:
    • 新增/公开 CMake 变量以指向外部子模块路径:LIBRMCS_STM32_HAL_DRIVER_ROOT、LIBRMCS_STM32_DEVICE_ROOT、LIBRMCS_CMSIS_CORE_ROOT 及派生的 LIBRMCS_CMSIS_CORE_INCLUDE_DIR。
    • 将 CubeMX 子目录引用从 bsp/HAL/cmake/stm32cubemx 改为 cubemx/cmake/stm32cubemx(对应项目重组)。
    • 将 target_link_libraries(...) 的可见性改为 PRIVATE,避免将 HAL/CMSIS 依赖外泄。
    • 移除对 TinyUSB 子模块存在性的致命检查(不再在此处强制失败)。
  • firmware/c_board/CMakePresets.json:
    • 将 toolchainFile 路径从 bsp/HAL/cmake/gcc-arm-none-eabi.cmake 更新为 cubemx/cmake/gcc-arm-none-eabi.cmake。
  1. 删除/移除的供应商文件
  • 删除或清空了原来仓库内的 bsp/HAL 相关文件(大量 CMSIS 与 STM32F4 HAL 头文件与项目配置):
    • 完整移除或清空了 CMSIS 核心/设备头(例如 core_.h、cmsis_.h、mpu_*.h、tz_context.h、pac_armv81.h、pmu_armv8.h、cachel1_armv7.h 等)。
    • 完整移除 STM32F4 HAL 及各模块头(例如 stm32f4xx_hal.h 及大量模块头:CAN、GPIO、DMA、EXTI、FLASH、CORTEX、DMA_ex、FLASH_ex、FLASH_ramfunc 等,约 30+ 文件)。
    • 删除 bsp/HAL 下的 CMakeLists.txt、CMakePresets.json、.mxproject 中列出的旧生成文件清单与 LICENSE 文本(供应商源码与许可证内容不再作为本仓库直写副本)。
  • 这些文件的声明/宏/API 现在由新增的子模块提供,不再在主仓库内维护本地副本。

兼容性与注意事项

  • 无功能变更:本次为重构与路径/依赖管理调整,期望不改变运行时行为。
  • 本地开发/构建要求:使用者在克隆后需执行 git submodule update --init --recursive(或等价流程)以获取 cmsis-core、cmsis-device-f4 与 stm32f4xx-hal-driver 子模块内容。
  • CMake 使用:下游或 CI 需确保新的 LIBRMCS_* 变量或默认子模块相对路径可被 CMake 解析;CubeMX 生成的 CMake 文件应通过 .scripts/patch_cubemx 修正后再纳入构建。
  • 链接作用域:将 HAL/CMSIS 库以 PRIVATE 链接,避免将其符号暴露给库的上游消费者(这是刻意的封装/隔离策略)。

益处

  • 明确且可版本化的外部依赖(通过子模块)。
  • 减少仓库冗余代码与体积,便于维护与安全审计。
  • 自动化脚本降低手工修补 CubeMX 生成输出的成本与错误风险。
  • 更清晰的 CMake 配置与依赖可见性(PRIVATE 链接)。

- Move CubeMX-generated project files from `bsp/HAL` to `cubemx`
- Replace vendored STM32 HAL/CMSIS sources with git submodules (`cmsis-core`, `cmsis-device-f4`, `stm32f4xx-hal-driver`)
- Update firmware CMake and presets to use new paths
- Patch CubeMX CMake integration to use repository variables and PRIVATE link scope for project libraries
- Add `.scripts/patch_cubemx` to remove redundant generated files and rewrite absolute include/source paths
- Update related path references (e.g. startup file comment)

No functional behavior change intended.
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3b3d30 and c557e16.

📒 Files selected for processing (1)
  • .scripts/patch_cubemx
🚧 Files skipped from review as they are similar to previous changes (1)
  • .scripts/patch_cubemx

Walkthrough

将 CMSIS 与 STM32F4 HAL 从仓库内移除并改为子模块管理;新增 .scripts/patch_cubemx 脚本以修补 CubeMX 生成的 CMake 配置;更新 c_board 的 CMake 配置与 CMakePresets 指向新的 cubemx 路径;删除原 HAL/CMSIS 目录下大量头文件与构建元数据。

变更

Cohort / File(s) Summary
子模块 & 顶层构建配置
\.gitmodules, firmware/c_board/CMakeLists.txt, firmware/c_board/CMakePresets.json
添加三个 STM32F4 相关子模块声明(cmsis-device-f4、stm32f4xx-hal-driver、cmsis-core);新增 LIBRMCS_* CMake 变量,删除 tusb.h 检查,将 HAL 子目录引用改为 cubemx/cmake/stm32cubemx,将 target_link_libraries 可见性改为 PRIVATE,更新 presets 的 toolchainFile 路径。
CubeMX 补丁脚本
.scripts/patch_cubemx
新增 Python 脚本:解析参数、定位 CubeMX 根、删除已知陈旧文件、按 regex 规则修补 cmake/stm32cubemx/CMakeLists.txt、规范 link 语法并检测绝对路径,只有在发生更改时写回,带有错误/异常处理。
HAL 项目与预设删除
firmware/c_board/bsp/HAL/CMakeLists.txt, firmware/c_board/bsp/HAL/CMakePresets.json, firmware/c_board/bsp/HAL/.mxproject
删除原 HAL 目录下的 CMakeLists、CMakePresets 以及 .mxproject 中嵌入的生成/库/文件列表(移除原有构建目标、文件清单与 presets)。
CMSIS / HAL 头文件大规模移除
firmware/c_board/bsp/HAL/Drivers/CMSIS/..., firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/...
移除大量 CMSIS 核心与工具头(core_cm*, cmsis_, mpu_, pmu_, pac_, tz_context, cachel1_* 等)以及 STM32F4 HAL 的主头与模块头(stm32f4xx_hal*.h、GPIO、DMA、FLASH、EXTI、CAN、CORTEX 等),并删除相关 LICENSE 文本。
设备层头与许可删除
firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/...
移除 device 层头文件(stm32f4xx.hsystem_stm32f4xx.h)、以及相关 LICENSE.txt,显著删去设备宏、SystemCoreClock 声明与系统接口声明。

估算代码审查工作量

🎯 4 (Complex) | ⏱️ ~45 分钟

可能相关的 PRs

概述(保留)

此 PR 重组了固件构建系统,通过在 .gitmodules 中添加三个新的 Git 子模块(STM32F4xx CMSIS 设备、HAL 驱动和 CMSIS 核心),引入了新的 CubeMX 路径补丁脚本,更新了 CMake 配置以指向新的 CubeMX 集成路径,并删除了现已作为子模块管理的冗余 HAL 和 CMSIS 头文件。

🐰 小兔的构建之诗:
子模块来临整队列,
CMake 路径已更新,
冗余文件收归档,
脚本轻补 CubeMX,构建轻盈又欢喜。

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: externalizing STM32 HAL/CMSIS dependencies via git submodules instead of vendored code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev/refactor-cubemx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.scripts/patch_cubemx (1)

76-79: 建议校验 target_link_libraries 替换命中次数,避免静默失效。

Line [76]-[79] 建议改用 subn 并断言至少命中 1 次,这样当 CubeMX 输出格式变化时能立刻失败并暴露问题。

建议修复
-    patched = PROJECT_LINK_LIBRARIES_PATTERN.sub(
+    patched, replaced = PROJECT_LINK_LIBRARIES_PATTERN.subn(
         "target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${MX_LINK_LIBS})",
         patched,
     )
+    if replaced == 0:
+        raise ValueError(
+            "Failed to patch target_link_libraries(${CMAKE_PROJECT_NAME} ...)."
+        )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.scripts/patch_cubemx around lines 76 - 79, The replacement of
PROJECT_LINK_LIBRARIES_PATTERN currently uses re.sub via
PROJECT_LINK_LIBRARIES_PATTERN.sub on the variable patched; change this to use
PROJECT_LINK_LIBRARIES_PATTERN.subn so you receive (new_string, count), assign
back to patched and check the count (assert or raise) is >= 1 to fail fast if no
replacements occurred; reference the symbols patched,
PROJECT_LINK_LIBRARIES_PATTERN, target_link_libraries and use subn to get the
hit count and assert it to surface format changes in CubeMX output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.scripts/patch_cubemx:
- Line 35: The ABSOLUTE_PATH_PATTERN currently only matches POSIX-style absolute
paths and omits Windows drive-letter paths; update ABSOLUTE_PATH_PATTERN so it
also recognizes Windows absolute paths by adding an alternative that matches a
drive letter followed by a colon and a forward slash (letter + ":" + "/") while
preserving the existing boundary lookbehind logic, and then apply the same
updated pattern to the subsequent input validation logic that uses
ABSOLUTE_PATH_PATTERN (the block that checks for absolute paths later in the
script) so Windows-generated inputs are correctly detected.
- Around line 97-101: Validate the CubeMX directory structure (e.g., ensure
(cubemx_root / "cmake/stm32cubemx/CMakeLists.txt").is_file()) before calling
remove_stale_files; if the expected file(s) are missing, raise FileNotFoundError
with a clear message referencing cubemx_root, and only then call
remove_stale_files and patch_stm32cubemx_cmake so you never delete files when
the provided --cubemx-root is incorrect.

---

Nitpick comments:
In @.scripts/patch_cubemx:
- Around line 76-79: The replacement of PROJECT_LINK_LIBRARIES_PATTERN currently
uses re.sub via PROJECT_LINK_LIBRARIES_PATTERN.sub on the variable patched;
change this to use PROJECT_LINK_LIBRARIES_PATTERN.subn so you receive
(new_string, count), assign back to patched and check the count (assert or
raise) is >= 1 to fail fast if no replacements occurred; reference the symbols
patched, PROJECT_LINK_LIBRARIES_PATTERN, target_link_libraries and use subn to
get the hit count and assert it to surface format changes in CubeMX output.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b94c8b and e3b3d30.

📒 Files selected for processing (134)
  • .gitmodules
  • .scripts/patch_cubemx
  • firmware/c_board/CMakeLists.txt
  • firmware/c_board/CMakePresets.json
  • firmware/c_board/bsp/HAL/.mxproject
  • firmware/c_board/bsp/HAL/CMakeLists.txt
  • firmware/c_board/bsp/HAL/CMakePresets.json
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/LICENSE.txt
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cachel1_armv7.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armcc.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armclang.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armclang_ltm.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_compiler.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_gcc.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_iccarm.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_version.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_armv81mml.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_armv8mbl.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_armv8mml.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm0.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm0plus.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm1.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm23.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm3.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm33.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm35p.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm4.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm55.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm7.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm85.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_sc000.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_sc300.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_starmc1.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/mpu_armv7.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/mpu_armv8.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/pac_armv81.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/pmu_armv8.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/tz_context.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/LICENSE.txt
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_can.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pcd.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pcd_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_spi.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_tim.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_usart.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_usb.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/LICENSE.txt
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c
  • firmware/c_board/bsp/HAL/cmake/starm-clang.cmake
  • firmware/c_board/bsp/cmsis-core
  • firmware/c_board/bsp/cmsis-device-f4
  • firmware/c_board/bsp/stm32f4xx-hal-driver
  • firmware/c_board/cubemx/.gitignore
  • firmware/c_board/cubemx/Core/Inc/can.h
  • firmware/c_board/cubemx/Core/Inc/dma.h
  • firmware/c_board/cubemx/Core/Inc/gpio.h
  • firmware/c_board/cubemx/Core/Inc/main.h
  • firmware/c_board/cubemx/Core/Inc/spi.h
  • firmware/c_board/cubemx/Core/Inc/stm32f4xx_hal_conf.h
  • firmware/c_board/cubemx/Core/Inc/stm32f4xx_it.h
  • firmware/c_board/cubemx/Core/Inc/tim.h
  • firmware/c_board/cubemx/Core/Inc/usart.h
  • firmware/c_board/cubemx/Core/Inc/usb_otg.h
  • firmware/c_board/cubemx/Core/Src/can.c
  • firmware/c_board/cubemx/Core/Src/dma.c
  • firmware/c_board/cubemx/Core/Src/gpio.c
  • firmware/c_board/cubemx/Core/Src/main.c
  • firmware/c_board/cubemx/Core/Src/spi.c
  • firmware/c_board/cubemx/Core/Src/stm32f4xx_hal_msp.c
  • firmware/c_board/cubemx/Core/Src/stm32f4xx_it.c
  • firmware/c_board/cubemx/Core/Src/syscalls.c
  • firmware/c_board/cubemx/Core/Src/sysmem.c
  • firmware/c_board/cubemx/Core/Src/system_stm32f4xx.c
  • firmware/c_board/cubemx/Core/Src/tim.c
  • firmware/c_board/cubemx/Core/Src/usart.c
  • firmware/c_board/cubemx/Core/Src/usb_otg.c
  • firmware/c_board/cubemx/STM32F407XX_FLASH.ld
  • firmware/c_board/cubemx/cmake/gcc-arm-none-eabi.cmake
  • firmware/c_board/cubemx/cmake/stm32cubemx/CMakeLists.txt
  • firmware/c_board/cubemx/rmcs_slave.ioc
  • firmware/c_board/cubemx/startup_stm32f407xx.s
  • firmware/c_board/src/utility/interrupt_lock.hpp
💤 Files with no reviewable changes (35)
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_compiler.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_iccarm.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm1.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_version.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/LICENSE.txt
  • firmware/c_board/bsp/HAL/.mxproject
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cachel1_armv7.h
  • firmware/c_board/bsp/HAL/CMakePresets.json
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_gcc.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armclang.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm0.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/pac_armv81.h
  • firmware/c_board/bsp/HAL/CMakeLists.txt
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/LICENSE.txt
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armcc.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/mpu_armv7.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/cmsis_armclang_ltm.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/tz_context.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_sc000.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/core_cm0plus.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/mpu_armv8.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h
  • firmware/c_board/bsp/HAL/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_can.h
  • firmware/c_board/bsp/HAL/Drivers/CMSIS/Include/pmu_armv8.h

@qzhhhi qzhhhi merged commit 34a76fe into main Feb 27, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in RMCS Slave SDK Feb 27, 2026
@qzhhhi qzhhhi deleted the dev/refactor-cubemx branch February 27, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant