fix: change stack alignment from 4 to 8 bytes for all STM32 targets#11530
fix: change stack alignment from 4 to 8 bytes for all STM32 targets#11530finnyoun9 wants to merge 1 commit into
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: bsp_stm32h743-st-nucleoReviewers: @LittleGreyG Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-06-28 21:43 CST)
📝 Review Instructions
|
|
对于h7来说可提高浮点算法性能。建议修改。 |
|
Summary
Fixes stack alignment issue for STM32 targets (Issue #7527).
The
.stacksection in STM32 linker scripts was aligned to 4 bytes, causing issues with 8-byte types (e.g.double) being passed via variadic functions. This PR changesALIGN(4)toALIGN(8)in the.stacksection for all affected STM32 BSPs.Closes #7527
Changes
ALIGN(4)toALIGN(8)in.stacksection of 13 STM32 linker scripts.textor.bsssections (they remain at ALIGN(4) — correct for 4-byte instructions/data)Affected files
bsp/stm32/libraries/templates/stm32f2xx/board/linker_scripts/link.ldsbsp/stm32/libraries/templates/stm32l1xx/board/linker_scripts/link.ldsbsp/stm32/libraries/templates/stm32mp1xx/board/linker_scripts/link.ldsbsp/stm32/stm32f401-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32f405-smdz-breadfruit/board/linker_scripts/link.ldsbsp/stm32/stm32f410-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32f446-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32h743-openmv-h7plus/board/linker_scripts/link.ldsbsp/stm32/stm32h743-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32l432-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32l433-st-nucleo/board/linker_scripts/link.ldsbsp/stm32/stm32l4r9-st-eval/board/linker_scripts/link.ldsbsp/stm32/stm32u585-iot02a/board/linker_scripts/link.lds