Skip to content

Commit 447495f

Browse files
oyvindronningstadSebastianBoe
authored andcommitted
zephyr: cmake: Adapt to new hex file handling in Partition Manager
Use the automatically generated hex file for the app partition. Signed-off-by: Øyvind Rønningstad <[email protected]>
1 parent 4ef858c commit 447495f

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

boot/zephyr/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,3 @@ if(NOT CONFIG_BOOT_SIGNATURE_KEY_FILE STREQUAL "")
201201
)
202202
zephyr_library_sources(${GENERATED_PUBKEY})
203203
endif()
204-
205-
# TODO: Configurable?
206-
set_property(GLOBAL APPEND PROPERTY
207-
HEX_FILES_TO_MERGE
208-
${PROJECT_BINARY_DIR}/zephyr/${KERNEL_HEX_NAME}
209-
)
210-
set_property(GLOBAL APPEND PROPERTY
211-
HEX_FILES_TO_MERGE_TARGET
212-
${logical_target_for_zephyr_elf}
213-
)

zephyr/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)