Skip to content

Commit 0c9513c

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 <ddegrasse@tenstorrent.com>
1 parent ed95d0f commit 0c9513c

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
@@ -145,6 +145,7 @@ function(zephyr_mcuboot_tasks)
145145
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
146146
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.bin
147147
${output}.signed.confirmed.bin)
148+
zephyr_runner_file(bin ${output}.signed.confirmed.bin)
148149
endif()
149150

150151
if(NOT "${keyfile_enc}" STREQUAL "")
@@ -208,6 +209,7 @@ function(zephyr_mcuboot_tasks)
208209
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
209210
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.hex
210211
${output}.signed.confirmed.hex)
212+
zephyr_runner_file(hex ${output}.signed.confirmed.hex)
211213
endif()
212214

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

0 commit comments

Comments
 (0)