Skip to content

Commit 59e2401

Browse files
krish2718rlubos
authored andcommitted
samples: net: mqtt: Enable LTO to increase available flash
Customers when using TLS + Wi-Fi are running out of flash esp. for TF-M/NS builds, enable LTO by default to conserver flash. This saves ~52K of flash for NS and ~58K for non-NS. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 9d71499 commit 59e2401

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000
5959

6060
# For Wi-Fi cred
6161
CONFIG_SETTINGS=y
62+
63+
# Link-time optimizations
64+
CONFIG_LTO=y
65+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000
6161
CONFIG_TFM_PROFILE_TYPE_SMALL=y
6262
CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000
6363
CONFIG_PM_PARTITION_SIZE_TFM=0x20000
64+
65+
# Link-time optimizations
66+
CONFIG_LTO=y
67+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

0 commit comments

Comments
 (0)