This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 16df6dc55d2 boards/stm32f3: nucleo-f302r8:ihm07m1_b16: enable LTO to
fit flash
16df6dc55d2 is described below
commit 16df6dc55d296592bf4c9e7090a76deac9c09d27
Author: anjiahao <[email protected]>
AuthorDate: Thu Jul 16 09:29:51 2026 +0800
boards/stm32f3: nucleo-f302r8:ihm07m1_b16: enable LTO to fit flash
The ihm07m1_b16 (FOC motor control) configuration overflows the
STM32F302R8 64 KiB flash region by ~470 bytes, so it no longer links.
Enable GNU Full LTO (CONFIG_LTO_FULL=y); cross-module dead-code
elimination brings the image back under the limit (flash drops from
~66.0 KiB to ~57.7 KiB, 88%).
Signed-off-by: anjiahao <[email protected]>
---
boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig
b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig
index 429998371d9..a8842958da1 100644
--- a/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig
+++ b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig
@@ -55,6 +55,7 @@ CONFIG_INPUT_BUTTONS=y
CONFIG_INPUT_BUTTONS_LOWER=y
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBM=y
+CONFIG_LTO_FULL=y
CONFIG_MOTOR=y
CONFIG_MOTOR_FOC=y
CONFIG_MOTOR_FOC_TRACE=y