Skip to content

Commit 252e35a

Browse files
Vge0rgerlubos
authored andcommitted
modules: tf-m: Fix mcuboot_single_image bug
The cmake logic which checks the mcuboot_single_image in order to enable the NRF_NS_SECONDARY variable is wrong since it evaluates the actual mcuboot_single_image string and not the variable. As a result the boolean check is always true and thus the NRF_NS_SECONDARY is never enabled. Fix the check to use the variable and not the literal string. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 3e3117e commit 252e35a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ set_property(TARGET zephyr_property_target
6060
-DPROJECT_CONFIG_HEADER_FILE=${CMAKE_CURRENT_BINARY_DIR}/tfm_config.h
6161
-DTFM_EXTRA_CONFIG_PATH="${CMAKE_CURRENT_BINARY_DIR}/config_extra.cmake"
6262
-DPS_ROLLBACK_PROTECTION=${CONFIG_TFM_PS_ROLLBACK_PROTECTION}
63-
$<$<BOOL:mcuboot_single_slot>:-DNRF_NS_SECONDARY=OFF>
64-
$<$<NOT:$<BOOL:mcuboot_single_slot>>:-DNRF_NS_SECONDARY=ON>
63+
$<$<AND:$<NOT:$<BOOL:${mcuboot_single_slot}>>,$<BOOL:${CONFIG_BOOTLOADER_MCUBOOT}>>:-DNRF_NS_SECONDARY=ON>
6564
$<$<BOOL:${CONFIG_TFM_HW_INIT_RESET_ON_BOOT}>:-DNRF_HW_INIT_RESET_ON_BOOT=ON>
6665
$<$<BOOL:${CONFIG_TFM_HW_INIT_NRF_PERIPHERALS}>:-DNRF_HW_INIT_NRF_PERIPHERALS=ON>
6766
$<$<BOOL:${CONFIG_TFM_ALLOW_NON_SECURE_RESET}>:-DNRF_ALLOW_NON_SECURE_RESET=ON>

0 commit comments

Comments
 (0)