Skip to content

Commit 7ac38e4

Browse files
MarekPietapdunaj
authored andcommitted
applications: nrf_desktop: Enable LTO for sysbuild images
Change enables the Link Time Optimization (LTO) for sysbuild images to limit memory usage and improve performance. Jira: NCSDK-26866 Signed-off-by: Marek Pieta <[email protected]>
1 parent d80a817 commit 7ac38e4

File tree

44 files changed

+161
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+161
-29
lines changed

applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/images/mcuboot/prj_release.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,9 @@ CONFIG_BOOT_SERIAL_IMG_GRP_HASH=n
5858
# Use minimal C library instead of the Picolib
5959
CONFIG_MINIMAL_LIBC=y
6060

61+
# Activate Link Time Optimization (LTO)
62+
CONFIG_LTO=y
63+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
64+
6165
# Improve firmware reliability
6266
CONFIG_RESET_ON_FATAL_ERROR=y

applications/nrf_desktop/configuration/nrf52833dk_nrf52820/images/mcuboot/prj_release.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,9 @@ CONFIG_BOOT_SERIAL_IMG_GRP_HASH=n
6262
# Use minimal C library instead of the Picolib
6363
CONFIG_MINIMAL_LIBC=y
6464

65+
# Activate Link Time Optimization (LTO)
66+
CONFIG_LTO=y
67+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
68+
6569
# Improve firmware reliability
6670
CONFIG_RESET_ON_FATAL_ERROR=y

applications/nrf_desktop/configuration/nrf52833dk_nrf52833/images/mcuboot/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ CONFIG_NCS_BOOT_BANNER=n
6060
# Use minimal C library instead of the Picolib
6161
CONFIG_MINIMAL_LIBC=y
6262

63+
# Activate Link Time Optimization (LTO)
64+
CONFIG_LTO=y
65+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
66+
6367
# Improve debugging experience by disabling reset on fatal error
6468
CONFIG_RESET_ON_FATAL_ERROR=n

applications/nrf_desktop/configuration/nrf52833dk_nrf52833/images/mcuboot/prj_dongle_small.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,9 @@ CONFIG_NCS_BOOT_BANNER=n
5757
# Use minimal C library instead of the Picolib
5858
CONFIG_MINIMAL_LIBC=y
5959

60+
# Activate Link Time Optimization (LTO)
61+
CONFIG_LTO=y
62+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
63+
6064
# Improve firmware reliability
6165
CONFIG_RESET_ON_FATAL_ERROR=y

applications/nrf_desktop/configuration/nrf52833dk_nrf52833/images/mcuboot/prj_release.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,9 @@ CONFIG_NCS_BOOT_BANNER=n
5757
# Use minimal C library instead of the Picolib
5858
CONFIG_MINIMAL_LIBC=y
5959

60+
# Activate Link Time Optimization (LTO)
61+
CONFIG_LTO=y
62+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
63+
6064
# Improve firmware reliability
6165
CONFIG_RESET_ON_FATAL_ERROR=y

applications/nrf_desktop/configuration/nrf52833dongle_nrf52833/images/mcuboot/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ CONFIG_NCS_BOOT_BANNER=n
6060
# Use minimal C library instead of the Picolib
6161
CONFIG_MINIMAL_LIBC=y
6262

63+
# Activate Link Time Optimization (LTO)
64+
CONFIG_LTO=y
65+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
66+
6367
# Improve debugging experience by disabling reset on fatal error
6468
CONFIG_RESET_ON_FATAL_ERROR=n

applications/nrf_desktop/configuration/nrf52833dongle_nrf52833/images/mcuboot/prj_release.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,9 @@ CONFIG_NCS_BOOT_BANNER=n
5656
# Use minimal C library instead of the Picolib
5757
CONFIG_MINIMAL_LIBC=y
5858

59+
# Activate Link Time Optimization (LTO)
60+
CONFIG_LTO=y
61+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
62+
5963
# Improve firmware reliability
6064
CONFIG_RESET_ON_FATAL_ERROR=y

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/images/b0/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ CONFIG_LOG=n
3939
# Use minimal C library instead of the Picolib
4040
CONFIG_MINIMAL_LIBC=y
4141

42+
# Activate Link Time Optimization (LTO)
43+
CONFIG_LTO=y
44+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
45+
4246
# Improve debugging experience by disabling reset on fatal error
4347
CONFIG_RESET_ON_FATAL_ERROR=n

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/images/b0/prj_dongle.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ CONFIG_LOG=n
3939
# Use minimal C library instead of the Picolib
4040
CONFIG_MINIMAL_LIBC=y
4141

42+
# Activate Link Time Optimization (LTO)
43+
CONFIG_LTO=y
44+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
45+
4246
# Improve debugging experience by disabling reset on fatal error
4347
CONFIG_RESET_ON_FATAL_ERROR=n

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/images/b0/prj_keyboard.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ CONFIG_LOG=n
3939
# Use minimal C library instead of the Picolib
4040
CONFIG_MINIMAL_LIBC=y
4141

42+
# Activate Link Time Optimization (LTO)
43+
CONFIG_LTO=y
44+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
45+
4246
# Improve debugging experience by disabling reset on fatal error
4347
CONFIG_RESET_ON_FATAL_ERROR=n

0 commit comments

Comments
 (0)