Hi,
We are using the nRF Connect SDK and building a Zephyr standalone application. Is there a way to add a post build step to the application CMakeLists.txt file which will run AFTER the zephyr.hex is generated?
Thanks.
Hi,
We are using the nRF Connect SDK and building a Zephyr standalone application. Is there a way to add a post build step to the application CMakeLists.txt file which will run AFTER the zephyr.hex is generated?
Thanks.
Hi,
Have you looked at extra_post_build_commands
? That is the closest I can think of.
No, I have not looked into this. Are there any examples of using this with a Zephyr build?
There are quite a few example of it, I suggest you search for "extra_post_build_commands
" in the SDK code base and look at some of the the CMakeLists.txt files that use it.
A more or less random example is from zephyr\boards\arm\faze\CMakeLists.txt:
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands # Insert checksum (verified by the bootloader) into the zephyr.bin # and zephyr.hex images. COMMAND lpc_checksum -f hex ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_HEX_NAME} COMMAND lpc_checksum -f bin ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_BIN_NAME} )
There are quite a few example of it, I suggest you search for "extra_post_build_commands
" in the SDK code base and look at some of the the CMakeLists.txt files that use it.
A more or less random example is from zephyr\boards\arm\faze\CMakeLists.txt:
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands # Insert checksum (verified by the bootloader) into the zephyr.bin # and zephyr.hex images. COMMAND lpc_checksum -f hex ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_HEX_NAME} COMMAND lpc_checksum -f bin ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_BIN_NAME} )