From 2c82ccd6abd78c5e41aa05cfaec6d4ddc46ff18f Mon Sep 17 00:00:00 2001 From: Andrei Gansari Date: Wed, 16 Dec 2020 19:56:30 +0200 Subject: [PATCH] boards: lpcxpresso55s69: merge dual core images Merges cpu0 and cpu1 targets to a single image, named multicore.bin, this image can be found in the build folder. Documentation is to be updated in a later commit. Signed-off-by: Andrei Gansari --- boards/arm/lpcxpresso55s69/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/boards/arm/lpcxpresso55s69/CMakeLists.txt b/boards/arm/lpcxpresso55s69/CMakeLists.txt index dea41cd95dc..4e89cbade00 100644 --- a/boards/arm/lpcxpresso55s69/CMakeLists.txt +++ b/boards/arm/lpcxpresso55s69/CMakeLists.txt @@ -98,3 +98,21 @@ if (CONFIG_BUILD_WITH_TFM) ) endif() endif() + +if (CONFIG_SECOND_CORE_MCUX) + # Set srec_cat binary name + find_program(SREC_CAT srec_cat) + if(${SREC_CAT} STREQUAL SREC_CAT-NOTFOUND) + message(FATAL_ERROR "'srec_cat' not found. Please install it, or add it to $PATH.") + endif() + + #merge cpu0 and cpu1 to a single image + #offset is taken from zephyr,code-cpu1-partition + set_property(GLOBAL APPEND PROPERTY extra_post_build_commands + COMMAND ${SREC_CAT} + ARGS ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_BIN_NAME} -Binary + ${REMOTE_ZEPHYR_DIR}/${KERNEL_BIN_NAME} -Binary + -offset ${CONFIG_SECOND_CORE_BOOT_ADDRESS_MCUX} + -o ${CMAKE_BINARY_DIR}/multicore.bin -Binary + ) +endif()