Skip to content

Commit a1cbaf5

Browse files
committed
applications: nrf_desktop: nrf54h20: disable LTO in the app image
Disabled the Link Time Optimization (LTO) for the nrf54h20dk/nrf54h20/cpuapp board target in the default image configuration of the nRF Desktop application. This change is done to prevent the LTO warnings about the type mismatch (-Wlto-type-mismatch) in the device_deps.c file, which is autogenerated if the CONFIG_DEVICE_DEPS Kconfig option is enabled. This file is required by the Zephyr domain driver to notify child devices in the domain to turn on or off when the domain itself is powered up or down. Ref: NCSDK-35587 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 3df25f3 commit a1cbaf5

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpuapp/prj.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ CONFIG_PM=y
107107
CONFIG_PM_S2RAM=y
108108
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
109109

110+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
111+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
112+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
113+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
114+
# on or off when the domain itself is powered up or down.
115+
CONFIG_LTO=n
116+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
117+
110118
################################################################################
111119
# Debug logs configuration
112120

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpuapp/prj_dongle.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ CONFIG_PM=y
9191
CONFIG_PM_S2RAM=y
9292
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
9393

94+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
95+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
96+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
97+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
98+
# on or off when the domain itself is powered up or down.
99+
CONFIG_LTO=n
100+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
101+
94102
################################################################################
95103
# Debug logs configuration
96104

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpuapp/prj_release.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ CONFIG_PM=y
102102
CONFIG_PM_S2RAM=y
103103
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
104104

105+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
106+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
107+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
108+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
109+
# on or off when the domain itself is powered up or down.
110+
CONFIG_LTO=n
111+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
112+
105113
################################################################################
106114
# Disable unused features
107115

applications/nrf_desktop/configuration/nrf54h20dk_nrf54h20_cpuapp/prj_release_dongle.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ CONFIG_PM=y
9090
CONFIG_PM_S2RAM=y
9191
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
9292

93+
# Temporarily disable Link Time Optimization (LTO) to prevent linker warnings about the type
94+
# mismatch (-Wlto-type-mismatch) that are caused by the device_deps.c file. The device_deps.c
95+
# file is autogenerated and its generation is controlled by the CONFIG_DEVICE_DEPS Kconfig option.
96+
# This file is required by the Zephyr domain driver to notify child devices in the domain to turn
97+
# on or off when the domain itself is powered up or down.
98+
CONFIG_LTO=n
99+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n
100+
93101
################################################################################
94102
# Disable unused features
95103

0 commit comments

Comments
 (0)