i.MX 95 AHAB Load M7 Application to TCM#
This notebook describes how to build a bootable AHAB image with M7 application, and how to load it to TCM (Tightly Coupled Memory).
1. Prerequisites#
SPSDK is needed with examples extension.
pip install spsdk[examples]
(Please refer to the installation documentation.)This demo was tested with i.MX 95 EVK board with LPDDR4 memory and A0 chip revision.
1.1 Images preparation#
Obtain all the necessary binaries and put them into inputs directory
1.2 Requirements#
Download these files from the https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/<package name>
and put them into the inputs directory.
Primary image container set:
ELE firmware
lpddr5 or lpddr4 firmware files with OEI firmware
CM33 OEI TCM
CM33 System manager image
M7 application image
2. AHAB Image#
2.1 AHAB Template#
We can generate the template using the nxpimage ahab get-template command. The command will generate a template. The template is a YAML file that contains the AHAB header and the AHAB container. The AHAB header contains the information about the image, such as the version, the number of containers, and the signature. The AHAB container contains the information about the image, such as the image type, the image version, the image size, and the image signature.
The following command generates the template:
nxpimage ahab get-template -f mimx9596 -o ahab_template.yaml
2.2 Exporting of the AHAB image#
The AHAB image can be exported using the nxpimage ahab export command. The command will create the AHAB image from the template. The following command creates the AHAB image:
nxpimage ahab export -c ahab_template.yaml
Image container set consists of the following images:
ELE firmware
DDR firmware with OEI
System manager
M7 application image
# EXPORT U-BOOT IMAGE
%! nxpimage -v ahab export --config inputs/mx95_tcm.yaml
nxpimage -v ahab export --config inputs/mx95_tcm.yaml
INFO:spsdk.apps.nxpimage:Created AHAB Image:
Name: AHAB Image
Starts: 0x0
Ends: 0xb2bff
Size: Size: 715.0 kiB; 732,160 B
Alignment: 512 B
Execution Start Address: Not defined
Pattern:zeros
AHAB Image for mimx9596_a0
INFO:spsdk.apps.nxpimage:Created AHAB Image memory map:
+==0x0000_0000= AHAB Image ==========================+
| Size: 715.0 kiB; 732,160 B |
| AHAB Image for mimx9596_a0 |
| Pattern: zeros |
|+==0x0000_0000= AHAB Containers ===================+|
|| Size: 8.0 kiB; 8,192 B ||
|| AHAB Containers block ||
|| Pattern: zeros ||
||+==0x0000_0000= AHAB Container 0 ================+||
||| Size: 544 B |||
||| AHAB Container for nxp_SWver:0 |||
||+==0x0000_021f===================================+||
|| Gap: 480 B ||
||+==0x0000_0400= AHAB Container 1 ================+||
||| Size: 832 B |||
||| AHAB Container for oem_SWver:0 |||
||+==0x0000_073f===================================+||
|| Gap: 192 B ||
||+==0x0000_0800= AHAB Container 2 ================+||
||| Size: 672 B |||
||| AHAB Container for none_SWver:0 |||
||+==0x0000_0a9f===================================+||
|+==0x0000_1fff=====================================+|
|+==0x0000_2000= Container 0 AHAB Data Image 0 =====+|
|| Size: 104.6 kiB; 107,072 B ||
|| AHAB encrypted data block for ele core and ele ||
|| Image Type. ||
|+==0x0001_c23f=====================================+|
| Gap: 15.4 kiB |
|+==0x0002_0000= Container 1 AHAB Data Image 0 =====+|
|| Size: 56.0 kiB; 57,344 B ||
|| AHAB data block for v2x-1 core and v2x_primary ||
|| Image Type. ||
|+==0x0002_dfff=====================================+|
|+==0x0002_e000= Container 1 AHAB Data Image 1 =====+|
|| Size: 28.0 kiB; 28,672 B ||
|| AHAB data block for v2x-2 core and v2x_secondary ||
|| Image Type. ||
|+==0x0003_4fff=====================================+|
|+==0x0003_5000= OEI DDR ===========================+|
|| Size: 269.0 kiB; 275,456 B ||
||AHAB data block for cortex-m33 core and oei Image ||
|| Type. ||
|+==0x0007_83ff=====================================+|
| Gap: 64.0 kiB |
|+==0x0008_8400= OEI TCM ===========================+|
|| Size: 4.0 kiB; 4,096 B ||
||AHAB data block for cortex-m33 core and oei Image ||
|| Type. ||
|+==0x0008_93ff=====================================+|
|+==0x0008_9400= System manager ====================+|
|| Size: 151.0 kiB; 154,624 B ||
||AHAB data block for cortex-m33 core and executable||
|| Image Type. ||
|+==0x000a_efff=====================================+|
|+==0x000a_f000= Additional Cortex M7 application ==+|
|| Size: 15.0 kiB; 15,360 B ||
|| AHAB data block for cortex-m7-1 core and ||
|| executable Image Type. ||
|+==0x000b_2bff=====================================+|
|+==0x000b_2c00= V2X core Dummy record =============+|
|| Size: 0 B ||
||AHAB data block for cortex-m33 core and v2x_dummy ||
|| Image Type. ||
|+==0x000b_2bff=====================================+|
+==0x000b_2bff=======================================+
Success. (AHAB: outputs/flash.bin created.)
# Set the boot mode to Cortex-M Serial Downloader 1001 and download the files using the UUU tool
%! nxpuuu $VERBOSITY run "SDPS[-t 10000]: boot -f outputs/flash.bin"
nxpuuu -v write -f mimx9596 -b emmc outputs/flash.bin
SDPS: boot -f outputs/flash.bin
SDPV: write -f outputs/flash.bin -skipspl
SDPV: jump
Done