Post build step building a Zephyr application

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.

Parents Reply
  • 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}
      )

Children
No Data
Related