Skip to content

Commit 271acea

Browse files
nordicjmcarlescufi
authored andcommitted
cmake: Fix wrongly changing hex file to flash with b0 and MCUboot
Fixes an issue whereby a hex file to flash CMake change was wrongly running for both MCUboot and the application when MCUboot and b0 were enabled Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 6bb7b99 commit 271acea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmake/sysbuild/image_signing_b0.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ if(NOT CONFIG_PARTITION_MANAGER_ENABLED)
66

77
if(CONFIG_SECURE_BOOT)
88
if(CONFIG_BOOTLOADER_MCUBOOT)
9-
zephyr_runner_file(hex ${CMAKE_BINARY_DIR}/../signed_by_mcuboot_and_b0_${SYSBUILD_NAME}.hex)
9+
if(${CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER} STREQUAL "-1" OR
10+
(NOT ${CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER} STREQUAL "-1" AND CONFIG_MCUBOOT)
11+
)
12+
zephyr_runner_file(hex ${CMAKE_BINARY_DIR}/../signed_by_mcuboot_and_b0_${SYSBUILD_NAME}.hex)
13+
endif()
1014
else()
1115
zephyr_runner_file(hex ${CMAKE_BINARY_DIR}/../signed_by_b0_${SYSBUILD_NAME}.hex)
1216
endif()

0 commit comments

Comments
 (0)