Skip to content

Commit 0baa5bd

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 ed206f3 commit 0baa5bd

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
@@ -177,6 +177,7 @@ function(zephyr_mcuboot_tasks)
177177
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
178178
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.bin
179179
${output}.signed.confirmed.bin)
180+
zephyr_runner_file(bin ${output}.signed.confirmed.bin)
180181
endif()
181182

182183
if(NOT "${keyfile_enc}" STREQUAL "")
@@ -240,6 +241,7 @@ function(zephyr_mcuboot_tasks)
240241
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND
241242
${imgtool_sign} ${imgtool_args} --pad --confirm ${output}.hex
242243
${output}.signed.confirmed.hex)
244+
zephyr_runner_file(hex ${output}.signed.confirmed.hex)
243245
endif()
244246

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

0 commit comments

Comments
 (0)