Skip to content
Commit eb6b7dba authored by Lingkai Dong's avatar Lingkai Dong Committed by Jaeden Amero
Browse files

Generate merged image of bootloader, TF-M and application



A merged image of bootloader, TF-M and application has the following
benefits:
* some microcontrollers do not support flashing different parts of
memory with different images
* the `htrun` tool for running Greentea tests does not support multiple
images
* a single image means a simpler workflow when running an application
manually.

To create a merged image, an executable's CMakeLists.txt needs to call
`iotsdk_tf_m_merge_images()`, passing the executable's target name and
addresses of the three images. The combined image is named
`<cmake-target-name>_merged`, with `.bin`, `.hex` and `.elf` versions
of it available in the build directory.

Notes:
* The commands bin2hex.py, hex2bin.py and hexmerge.py come from the
intelhex python package, which is installed as a dependency of the
imgtool package listed in TF-M's requirements.txt. The installation
of dependencies for TF-M has been added to the SDK's documentation.
* The Corstone-300 FVP requires an ELF image, and conversion from a raw
binary or an Intel HEX image to an ELF image requires either
arm-none-eabi-objcopy from the GNU Arm Embedded Toolchain or objcopy
from the host's GNU Binutils.

Signed-off-by: Lingkai Dong's avatarLingkai Dong <lingkai.dong@arm.com>
parent 9768c38d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment