This article explains how to load and build the system components processed by the Cortex-M33 subsystem. The Cortex-M33 subsystem components are:
- The DDR firmware binary.
- The TF-M (Trusted Firmware-M) secure and Cortex-M33 non secure image.
- The FSBLM (mcuboot) image.
The TF-M secure and Cortex-M33 non secure are concatenated in a single image. This image and the DDR firmware are signed with default test keys (ECDSA, 256bits).
For more details, you can refer to TF_M overview wiki page.
1. Prerequisites[edit | edit source]
The environment must be installed using the Distribution Package adapted to the selected microprocessor unit.
The environment setup must be carried out in accordance with the instructions provided here.
Additionally, the toolchain has to be installed using the following command:
bspsetup
The bspsetup instruction only needs to be run once for each distribution.
|
2. Partition layout[edit | edit source]
The mcuboot is integrated in the fsblm partition.
The TF-M is integrated in the m33fw partition.
The DDR is integrated in the m33ddr partition.
The binaries are available in device/stm/<STM32Series>-system/prebuilt.
| For information on the complete partition layout for the corresponding development platform, refer to the STM32 MPU Flash mapping for Android article. |
3. Load the Cortex-M33 firmware sources[edit | edit source]
By default, the Cortex-M33 firmware sources are not part of the OpenSTDroid distribution. To load the sources, execute the following instruction:
load_system
|
The load_system script uses the configuration file |
The loaded sources can then be accessed at the device/stm/<STM32Series>-system/tf-m-<STM32Series> and device/stm/<STM32Series>-system/tf-m-tests-<STM32Series> directories.
4. Build the M33 firmware sources[edit | edit source]
After retrieving the M33 firmware sources, build them using:
build_system
This instruction generates M33 firmwares for every available board.
To get back more details on available options, run:
build_system -h
Here after, see the result for the version 1.2:
Usage: build_system [Options] [Board Options]
This script allows building the M33 firmware sources (TF-M and MCUBoot)
Options:
-h / --help: print this message
-v / --version: get script version
-i / --install: update prebuilt images
-t / --tool: update tools
-d/--debug: enable script debug traces
--verbose: enable verbosity
Board options: (default = all possibilities)
-b <name> / --board=<name>: set board name from following list = eval (default: all)
5. Integrate the Cortex-M33 firmwares[edit | edit source]
To integrate the new Cortex-M33 firmwares within your distribution, first, the prebuilt images must be updated:
build_system -i
Then, build the full distribution.
make -j
Finally, update the associated partitions for the device. Refer to Flashing the built image.