Skip to content

Commit 1c51a7d

Browse files
MarekPietakapi-no
authored andcommitted
applications: nrf_desktop: Enable LTO in MCUboot
LTO no longer causes boot failures, enable it to reduce the memory footprint. Jira: NCSDK-31751 Jira: NCSDK-33013 Signed-off-by: Marek Pieta <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]>
1 parent 1e07cc3 commit 1c51a7d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/images/mcuboot/prj_mcuboot_qspi.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ CONFIG_NCS_BOOT_BANNER=n
4646
# Use minimal C library instead of the Picolib
4747
CONFIG_MINIMAL_LIBC=y
4848

49-
# Disable Link Time Optimization (LTO). LTO causes application boot failures.
50-
CONFIG_LTO=n
51-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
49+
# Activate Link Time Optimization (LTO)
50+
CONFIG_LTO=y
51+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
5252

5353
# Improve debugging experience by disabling reset on fatal error
5454
CONFIG_RESET_ON_FATAL_ERROR=n

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/images/mcuboot/prj_mcuboot_smp.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ CONFIG_NCS_BOOT_BANNER=n
3838
# Use minimal C library instead of the Picolib
3939
CONFIG_MINIMAL_LIBC=y
4040

41-
# Disable Link Time Optimization (LTO). LTO causes application boot failures.
42-
CONFIG_LTO=n
43-
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
41+
# Activate Link Time Optimization (LTO)
42+
CONFIG_LTO=y
43+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
4444

4545
# Improve debugging experience by disabling reset on fatal error
4646
CONFIG_RESET_ON_FATAL_ERROR=n

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,12 @@ nRF5340 Audio
211211
nRF Desktop
212212
-----------
213213

214-
* Updated the application configurations for dongles on memory-limited SoCs (nRF52820) to reuse the system workqueue for GATT Discovery Manager (:kconfig:option:`CONFIG_BT_GATT_DM_WORKQ_SYS`).
215-
This helps to reduce RAM usage.
214+
* Updated:
215+
216+
* Application configurations for dongles on memory-limited SoCs (nRF52820) to reuse the system workqueue for GATT Discovery Manager (:kconfig:option:`CONFIG_BT_GATT_DM_WORKQ_SYS`).
217+
This helps to reduce RAM usage.
218+
* Link Time Optimization (:kconfig:option:`CONFIG_LTO`) to be enabled in MCUboot configurations of the nRF52840 DK (``mcuboot_smp``, ``mcuboot_qspi``).
219+
LTO no longer causes boot failures and it reduces the memory footprint.
216220

217221
nRF Machine Learning (Edge Impulse)
218222
-----------------------------------

0 commit comments

Comments
 (0)