Skip to content

Commit

Permalink
[nrf noup] Use ncs merge file function
Browse files Browse the repository at this point in the history
Uses the newly added merge hex file function for generating output
files when partition manager is not enabled

Signed-off-by: Jamie McCrae <[email protected]>
  • Loading branch information
nordicjm committed Jul 17, 2024
1 parent c0df90b commit 76567d8
Showing 1 changed file with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,7 @@ function(nrfconnect_generate_factory_data)
set_property(GLOBAL PROPERTY factory_data_PM_HEX_FILE ${OUTPUT_FILE_PATH}/factory_data.hex)
set_property(GLOBAL PROPERTY factory_data_PM_TARGET factory_data)
else()
add_custom_command(OUTPUT ${OUTPUT_FILE_PATH}/merged.hex
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/build/mergehex.py
-o ${OUTPUT_FILE_PATH}/merged.hex
${OUTPUT_FILE_PATH}/factory_data.hex
${OUTPUT_FILE_PATH}/zephyr.hex
DEPENDS
${DEFAULT_IMAGE}_extra_byproducts
factory_data
${OUTPUT_FILE_PATH}/factory_data.hex
${OUTPUT_FILE_PATH}/zephyr.hex
)

# Wrapper target for the merge command.
add_custom_target(merged_hex
ALL DEPENDS
${OUTPUT_FILE_PATH}/merged.hex
)
ncs_merge_file(FILES ${OUTPUT_FILE_PATH}/factory_data.hex DOMAIN cpuapp DEPENDENCIES factory_data)
endif()
endif()
endfunction()

0 comments on commit 76567d8

Please sign in to comment.