File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,15 +25,21 @@ function(add_image_flasher)
2525 set (${args_NAME} _HEX_FILE "${args_HEX_FILE} " CACHE FILEPATH "Hex file to flash" FORCE )
2626 set (IMAGE_FLASHER_DEFAULT_IMAGE ${DEFAULT_IMAGE} CACHE STRING "Default image" FORCE )
2727
28+ if (args_BASE_IMAGE)
29+ set (${args_NAME} _IMAGE_FLASHER_SPECIFIC_IMAGE ${args_BASE_IMAGE} CACHE STRING "Base image" FORCE )
30+ get_target_property (image_flasher_target_board ${args_BASE_IMAGE} BOARD )
31+
32+ if (image_flasher_target_board)
33+ set (image_flasher_target_board BOARD ${image_flasher_target_board} )
34+ endif ()
35+ endif ()
36+
2837 ExternalZephyrProject_Add (
2938 APPLICATION ${args_NAME}
3039 SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR} /applications/image_flasher
40+ ${image_flasher_target_board}
3141 )
3242
33- if (args_BASE_IMAGE)
34- set (${args_NAME} _IMAGE_FLASHER_SPECIFIC_IMAGE ${args_BASE_IMAGE} CACHE STRING "Base image" FORCE )
35- endif ()
36-
3743 # Must be configured after the default image as the default image Kconfig and dts files are
3844 # copied.
3945 sysbuild_add_dependencies (CONFIGURE ${args_NAME} ${DEFAULT_IMAGE} )
You can’t perform that action at this time.
0 commit comments