2024-05-20 07:23 AM
Hello,
I have created my own program using TrustZone and I want to add the SBSFU_BOOT project to it. How can I do this?
Solved! Go to Solution.
2024-05-21 06:48 AM
Hello @Istillaga,
There are slight differences between the project example provided with SBSFU_Boot and a "standard" secure/non secure project generated by STM32CubeMX.
For instance, examples uses a startup file written in C instead of assembly.
So, you may need to replace this assembly file by the c file.
As a general point the example provided with SBSFU_Boot is the reference that will help you.
The main point is the linker file.
Either you reuse same linker file as in the example. In that case you need to adapt your project to be able to include this "region_defs.h" file (you can find how this is done in example)
Other possibility is to manually change your linker file with hardcoded addresses but this may lead to issue when you decide to change the mapping.
Finally, you will need to add the postbuild command to generate the signed images. Here this is copy paste of commands.
I hope this will help
Best regards
Jocelyn
2024-05-20 02:25 PM
Hello @Istillaga ,
The secure boot solution on STM32U5 is based on MCUBoot.
You will find the ready-to-use SBSFU_Boot application, which is available within STM32CubeU5 package :
This project is used to generate the SBSFU_Boot binary file. The core function of this application relies on the MCUBoot middleware, the trusted firmware (TFM) middleware (only Boot Loader stage 2 part) and the mbed-crypto middleware.
I advise you to follow the instructions in the SBSFU readme file.
For more details, please refer to the following resources:
2024-05-21 06:48 AM
Hello @Istillaga,
There are slight differences between the project example provided with SBSFU_Boot and a "standard" secure/non secure project generated by STM32CubeMX.
For instance, examples uses a startup file written in C instead of assembly.
So, you may need to replace this assembly file by the c file.
As a general point the example provided with SBSFU_Boot is the reference that will help you.
The main point is the linker file.
Either you reuse same linker file as in the example. In that case you need to adapt your project to be able to include this "region_defs.h" file (you can find how this is done in example)
Other possibility is to manually change your linker file with hardcoded addresses but this may lead to issue when you decide to change the mapping.
Finally, you will need to add the postbuild command to generate the signed images. Here this is copy paste of commands.
I hope this will help
Best regards
Jocelyn