@@ -18,12 +18,13 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
1818 set (update_hex ${PROJECT_BINARY_DIR} /update.hex)
1919 set (update_bin ${PROJECT_BINARY_DIR} /update.bin)
2020
21+ get_property (app_binary_dir GLOBAL PROPERTY PROJECT_BINARY_DIR )
2122 set (merged_hex_file
22- $<TARGET_PROPERTY:partition_manager,MCUBOOT_TO_SIGN> )
23+ ${app_binary_dir} /mcuboot_primary_app.hex )
2324 set (merged_hex_file_depends
24- $<TARGET_PROPERTY:partition_manager,MCUBOOT_TO_SIGN_DEPENDS> )
25+ mcuboot_primary_app_hex )
2526 set (sign_merged
26- $<BOOL :$<TARGET_PROPERTY: partition_manager,MCUBOOT_TO_SIGN> >)
27+ $<TARGET_EXISTS: partition_manager>)
2728 set (to_sign_hex
2829 $<IF:${sign_merged} ,${merged_hex_file} ,${PROJECT_BINARY_DIR} /${KERNEL_HEX_NAME} >)
2930 set (sign_depends
@@ -76,13 +77,12 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
7677 )
7778 add_custom_target (mcuboot_sign_target DEPENDS ${signed_image_hex} )
7879
79- set_property (GLOBAL APPEND PROPERTY
80- HEX_FILES_TO_MERGE
80+ set_property (GLOBAL PROPERTY
81+ mcuboot_primary_app_PM_HEX_FILE
8182 ${signed_image_hex}
8283 )
83- set_property (GLOBAL APPEND PROPERTY
84- HEX_FILES_TO_MERGE_TARGET
85- ${logical_target_for_zephyr_elf}
84+ set_property (GLOBAL PROPERTY
85+ mcuboot_primary_app_PM_TARGET
8686 mcuboot_sign_target
8787 )
8888 endif () # ${require_build}
0 commit comments