Skip to content

Commit 7c1721d

Browse files
ahasztagjhedberg
authored andcommitted
tests: boot: Fix bootloader.mcuboot boot loop for nrf platforms
The swapped_app image, added via ExternalZephyrProject_Add, wasn't receiving the swap method configuration from sysbuild. If trying to build the test with a different configuration that SWAP_USING_OFFSET (for example SWAP_USING_MOVE) this resulted in a boot loop due to configuration mismatch between swapped_image and mcuboot. This fix ensures proper configuration propagation and prevents similar mismatches in future scenarios. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 79bfd95 commit 7c1721d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/boot/test_mcuboot/sysbuild.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ExternalZephyrProject_Add(
1414
SOURCE_DIR ${APP_DIR}/swapped_app
1515
)
1616

17+
# This section ensures that sysbuild-related configurations, such as the MCUBOOT swap type,
18+
# are passed down to the swapped_app image.
19+
set_target_properties(swapped_app PROPERTIES
20+
IMAGE_CONF_SCRIPT ${ZEPHYR_BASE}/share/sysbuild/image_configurations/MAIN_image_default.cmake
21+
)
22+
1723
# Add the swapped app to the list of images to flash
1824
# Ensure the flashing order of images is as follows:
1925
# - mcuboot

0 commit comments

Comments
 (0)