UM1718

STM32CubeMX user interface

 

 

Figure 157. Boot path settings panel

Fill all fields, then click on Edit to open Enables to update the code location Trusted Package Creator

for customized settings

Erases the linker content. If both are selected, the file content is cleared, but the new code address location is updated.

If selected, secure and non secure codes are encrypted. The code generated for the chosen IDE includes the settings for the Post-build command, which calls the Trusted Package Creator for the encryption.

Included in file map properties for the OEM-iRoT project

DT56309V2

Step 6: Authentication and encryption keys regeneration, option byte file generation

Customization of OEMiROT configuration file (OEMiROT_Config.obk):

The default configuration file of CubeFW can be used, but the default keys must be regenerated or replaced.

To customize the configuration file, proceed as follow:

a)Launch Trusted Package Creator and select STM32H5 (click edit in Project Manager as indicated in Figure 156)

b)Open OBkey tab

c)Select the OEMiROT_Config.xml file in the folder created during Step 5: Boot path selection

d)The default keys can be regenerated

e)The OEMiROT_Config.obk file is generated. The modified parameters are saved in OEMiROT_Config

UM1718 Rev 41

179/453

STM32CubeMX user interface

UM1718

 

 

Figure 158. Authentication and encryption keys regeneration

Contextual help displayed when

Default keys can

hovering the mouse on editing areas

be regenerated

Secure firmware and data images authentication key

Non-secure firmware and data images authentication key

OEMiRoT_Config.obk

file generated

Key to encrypt firmware and data images

DT56311

The H5-Image Gen1 and Gen2 tabs indicate the location of the image configuration files and the path of the binary input and output files. Keep the default settings.

Figure 159. Secure image configuration

180/453

UM1718 Rev 41

UM1718

STM32CubeMX user interface

 

 

Figure 160. Non-secure image configuration

Step 7: Code generation

Figure 161. Generate the code

Click here to generate the code and the IDE environment

DT56314V2

UM1718 Rev 41

181/453

STM32CubeMX user interface

UM1718

 

 

Figure 162. Code is generated

DT56316

Additional directories, including the IDE environment, are created.

Figure 163. Secure and non-secure IDE directories

Open the project

A secure application and a non-secure application

code have been generated

The S and NS applications can be developed using the generated code skeletons.

DT56315

Step 8: Code compilation and encrypted binaries generation

If the “Sign Binary(ies)” option has been ticked at Step 7: Code generation, the application binaries are encrypted. Select Project → Option → Build Actions. The links to the Trusted Package executable, and to the secure and non-secure application xml files are filled automatically.

182/453

UM1718 Rev 41

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