scripts: generate image info header file
This commit adds the `gen_image_info.py` script which supports creation of a header file with image information from the EFL file. This version populates the header file with: - Number of segments in the image - LMA address of each segment - VMA address of each segment - Size of each segment The header file can be used by a secondary build system which needs this information. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
eb9a97299d
commit
c8ddc34bb8
4 changed files with 104 additions and 0 deletions
|
@ -1576,6 +1576,19 @@ if(CONFIG_BUILD_OUTPUT_EXE)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BUILD_OUTPUT_INFO_HEADER)
|
||||
list(APPEND
|
||||
post_build_commands
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/gen_image_info.py
|
||||
--elf-file=${KERNEL_ELF_NAME}
|
||||
--header-file=${PROJECT_BINARY_DIR}/include/public/zephyr_image_info.h
|
||||
)
|
||||
list(APPEND
|
||||
post_build_byproducts
|
||||
${PROJECT_BINARY_DIR}/include/public/zephyr_image_info.h
|
||||
)
|
||||
endif()
|
||||
|
||||
# Generate and use MCUboot related artifacts as needed.
|
||||
if(CONFIG_BOOTLOADER_MCUBOOT)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/mcuboot.cmake)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue