Skip to content

Commit 157485b

Browse files
cmake: mcuboot: prefer confirmed image when one is created
Prefer flashing the confirmed image when one is created with CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE. This way, the west runner will flash this image over the signed image if it exists. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 29d4747 commit 157485b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/mcuboot.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ function(zephyr_mcuboot_tasks)
179179
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
180180
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.bin
181181
${output}.signed.confirmed.bin)
182+
zephyr_runner_file(bin ${output}.signed.confirmed.bin)
182183
endif()
183184

184185
if(NOT "${keyfile_enc}" STREQUAL "")
@@ -242,6 +243,7 @@ function(zephyr_mcuboot_tasks)
242243
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
243244
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.hex
244245
${output}.signed.confirmed.hex)
246+
zephyr_runner_file(hex ${output}.signed.confirmed.hex)
245247
endif()
246248

247249
if(NOT "${keyfile_enc}" STREQUAL "")

0 commit comments

Comments
 (0)