UM1718

STM32CubeMX user interface

 

 

Figure 164. IDE post build commands

xml configuration for secure application

xml configuration for non-secure application

The secure code must be generated before the non-secure code. Compile each code separately (right click on Project → Rebuild all). The secure and non-secure signed and encrypted binaries are generated during the post build phase.

DT56317

Figure 165. Trusted Package Creator output directory

Step 9: Provisioning of the board

The program cannot be flashed using an IDE. Use provisioning scripts found in the user environment, and double click on the provisioning.bat file (Figure 166). During provisioning, log files are generated to inform the user about the activity. Follow the on-screen instructions (Figure 167).

UM1718 Rev 41

183/453

STM32CubeMX user interface

UM1718

 

 

Figure 166. Board provisioning

Figure 167. On-screen instructions

In the user environment, CubeMX has generated an env.bat file, containing the information required for provisioning. Do not change this file.

A pop-up (see Figure 168) appears if you forget to compile the project OEMiRoT_Boot in the CubeFW.

184/453

UM1718 Rev 41

UM1718

STM32CubeMX user interface

 

 

Figure 168. Error message

Figure 169. Selection of the OEMiRoT_Boot project

Used OEMiRoT_Boot project

DT56310V2

4.16.4How to configure an ST-iRoT boot path

The configuration for an ST immutable Root of Trust (ST-iRoT) boot path. The requirements are the same of the previous example.

Step 1: Generating the code

Select an STM32H57x MCU

Create a project with TrustZone activated (TZEN = 1)

In Project Manager, choose “Secure Project”

Save the project

UM1718 Rev 41

185/453

STM32CubeMX user interface

UM1718

 

 

Go to “BootPath Settings” tab, and press the Select button

Choose ST immutable Root of Trust (ST-iRoT)

Figure 170. Select ST-iRoT

Select Secure Application

Figure 171. Final boot path stage

Click “FINISH”, the boot path configuration panel is displayed (see Figure 172), use it to configure the application, then press the GENERATE CODE button to generate the code for the selected toolchain

186/453

UM1718 Rev 41

UM1718

STM32CubeMX user interface

 

 

Figure 172. Boot path settings panel

Figure 173. Select the project structure

Generate the code and the IDE environment

DT56333V2

For this boot path, only the secure project is generated.

UM1718 Rev 41

187/453

Соседние файлы в папке STM