Skip to content

Commit 76d1c8d

Browse files
ahasztagmaciejpietras
authored andcommitted
samples: suit: Link time optimization for recovery app
This commit enables LTO on both cores in the default SUIT recovery application. This allows to save ~10kB on the application core and ~5kB on the radio core. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 87d05ff commit 76d1c8d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

samples/suit/recovery/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ CONFIG_BT_DEVICE_NAME="SUIT Recovery"
6868
# Disable unneeded drivers, peripherals and features to optimize for size
6969
CONFIG_SIZE_OPTIMIZATIONS=y
7070

71+
# Enable LTO
72+
CONFIG_LTO=y
73+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
74+
7175
CONFIG_I2C=n
7276
CONFIG_WATCHDOG=n
7377
CONFIG_SPI=n

samples/suit/recovery/sysbuild/hci_ipc.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ CONFIG_PRINTK=n
4545

4646
CONFIG_SIZE_OPTIMIZATIONS=y
4747

48+
# Enable LTO
49+
CONFIG_LTO=y
50+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
51+
4852
CONFIG_BT_CTLR_CRYPTO=n
4953
CONFIG_ENTROPY_GENERATOR=y
5054

0 commit comments

Comments
 (0)