How to create RoT examples for STM32WBA

In the STM32CubeWBA firmware package, the OEMiRoT & OEMiRoT_OEMuRoT examples are not provided for all boards and all MCUs. This article explains how to generate the OEMiROT examples for the NUCLEO-WBA65RI and NUCLEO-WBA55CG boards, as well as OEMiROT & OEMiRoT_OEMuRoT examples for the STM32WBA55G-DK1 board.

1. OEMiRoT projects creation for NUCLEO-WBA65RI

OEMiRoT example can be generated for the NUCLEO-WBA65RI board using the STM32WBA65I-DK1 board as a reference. To do that, follow the steps below:

1.1. Get the source files from the STM32WBA65I-DK1 board:

  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli content in Projects/NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli_TrustZone content in Projects/NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli_TrustZone
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Boot content in Projects/NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Boot

1.2. Change the board name in the project files :

Following your preferred IDE, update the project files replacing STM32WBA65I-DK1 to NUCLEO-WBA65RI

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Boot/
EWARM/Project_s.ewd

Security WBA NUCLEO-WBA65R OEMiROT Boot EWARM ewd.png

EWARM/Project_s.ewp

Security WBA NUCLEO-WBA65R OEMiROT Boot EWARM ewp.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Boot/

MDK-ARM/Project.uvoptx

Security WBA NUCLEO-WBA65R OEMiROT Boot MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA NUCLEO-WBA65R OEMiROT Boot MDK-ARM uvprojx.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Boot/

STM32CubeIDE/Secure/.cproject
No changes

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli_Trustzone/
EWARM/Secure/Project_s.ewd

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone EWARM S ewd.png

EWARM/Secure/Project_s.ewp

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone EWARM S ewp.png

EWARM/NonSecure/Project_ns.ewd

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone EWARM NS ewd.png

EWARM/NonSecure/Project_ns.ewp

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone EWARM NS ewp.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli_Trustzone/

MDK-ARM/Secure/Project_S.uvoptx

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone MDK-ARM S uvoptx.png

MDK-ARM/Secure/Project_S.uprojx

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone MDK-ARM S uvprojx.png

MDK-ARM/NonSecure/Project_NS.uvoptx

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone MDK-ARM NS uvoptx.png

MDK-ARM/NonSecure/Project_NS.uprojx

Security WBA NUCLEO-WBA65R OEMiROT Appli Trustzone MDK-ARM NS uvprojx.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli_Trustzone/

STM32CubeIDE/Secure/.cproject
No changes


STM32CubeIDE/NonSecure/.cproject
No changes

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli/
EWARM/Project_s.ewd

Security WBA NUCLEO-WBA65R OEMiROT Appli EWARM ewd.png

EWARM/Project_s.ewp

Security WBA NUCLEO-WBA65R OEMiROT Appli EWARM ewp.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli/

MDK-ARM/Project.uvoptx

Security WBA NUCLEO-WBA65R OEMiROT Appli MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA NUCLEO-WBA65R OEMiROT Appli MDK-ARM uvprojx.png

NUCLEO-WBA65RI/Applications/ROT/OEMiROT_Appli/

STM32CubeIDE/Secure/.cproject
No changes

1.3. Adapt all region_defs.h to the correct board :

OEMiROT_Boot/inc/region_defs.h :

Security WBA NUCLEO-WBA65R OEMiROT Boot region defs.png

OEMiROT_Appli_Trustzone/Secure_nsclib/appli_region_defs.h :

Security WBA NUCLEO-WBA65R OEMiROT Appli appli region defs.png

OEMiROT_Appli/Secure_nsclib/appli_region_defs.h : Security WBA NUCLEO-WBA65R OEMiROT Appli appli region defs.png

1.4. Get the provisioning files from the STM32WBA65I-DK1 board :

  • Copy the Projects/STM32WBA65I-DK1/ROT_Provisioning content in Projects/NUCLEO-WBA65RI/ROT_Provisioning

1.5. Ready to start

Your NUCLEO-WBA65RI board is now adapted to OEMiRoT Boot path. To test it, run the provisioning.bat/sh script stored in the Firmware/Projects/NUCLEO-WBA65RI/OEMiROT folder and follow the instructions.

2. OEMxRoT projects creation for STM32WBA55G-DK1

OEMxRoT example can be generated for the STM32WBA55G-DK1 board using the STM32WBA65I-DK1 board as a reference. To do that, follow the steps below:

2.1. Get the source files from the STM32WBA65I-DK1 board:

  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli content in Projects/STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli_TrustZone content in Projects/STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli_TrustZone
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Boot content in Projects/STM32WBA55G-DK1/Applications/ROT/OEMiROT_Boot

2.2. Change the board name in the project files :

Following your preferred IDE, update the project files replacing STM32WBA65I-DK1 to STM32WBA55G-DK1

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Boot/
EWARM/Project_s.ewd

Security WBA STM32WBA55G-DK1 OEMiROT Boot EWARM ewd.png

EWARM/Project_s.ewp

Security WBA STM32WBA55G-DK1 OEMiROT Boot EWARM ewp.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Boot/

MDK-ARM/Project.uvoptx

Security WBA STM32WBA55G-DK1 OEMiROT Boot MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA STM32WBA55G-DK1 OEMiROT Boot MDK-ARM uvprojx.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Boot/

STM32CubeIDE/Secure/.cproject
Security WBA STM32WBA55G-DK1 OEMiROT Boot STM32CubeIDE cproject.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli_Trustzone/
EWARM/Secure/Project_s.ewd

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone EWARM S ewd.png

EWARM/Secure/Project_s.ewp

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone EWARM S ewp.png

EWARM/NonSecure/Project_ns.ewd

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone EWARM NS ewd.png

EWARM/NonSecure/Project_ns.ewp

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone EWARM NS ewp.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli_Trustzone/

MDK-ARM/Secure/Project_S.uvoptx

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone MDK-ARM S uvoptx.png

MDK-ARM/Secure/Project_S.uprojx

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone MDK-ARM S uvprojx.png

MDK-ARM/NonSecure/Project_NS.uvoptx

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone MDK-ARM NS uvoptx.png

MDK-ARM/NonSecure/Project_NS.uprojx

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone MDK-ARM NS uvprojx.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli_Trustzone/

STM32CubeIDE/Secure/.cproject

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone STM32CubeIDE S cproject.png

STM32CubeIDE/NonSecure/.cproject

Security WBA STM32WBA55G-DK1 OEMiROT Appli Trustzone STM32CubeIDE NS cproject.png


STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli/
EWARM/Project_s.ewd

Security WBA STM32WBA55G-DK1 OEMiROT Appli EWARM ewd.png

EWARM/Project_s.ewp

Security WBA STM32WBA55G-DK1 OEMiROT Appli EWARM ewp.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli/

MDK-ARM/Project.uvoptx

Security WBA STM32WBA55G-DK1 OEMiROT Appli MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA STM32WBA55G-DK1 OEMiROT Appli MDK-ARM uvprojx.png

STM32WBA55G-DK1/Applications/ROT/OEMiROT_Appli/

STM32CubeIDE/Secure/.cproject
Security WBA STM32WBA55G-DK1 OEMiROT Appli STM32CubeIDE cproject.png


2.3. Adapt all region_defs.h to the correct board :

OEMiROT_Boot/inc/region_defs.h :

No change needed.

OEMiROT_Appli_Trustzone/Secure_nsclib/appli_region_defs.h :

No change needed.

OEMiROT_Appli/Secure_nsclib/appli_region_defs.h :

No change needed.

2.4. Get the provisioning files from the STM32WBA65I-DK1 board :

  • Copy the Projects/STM32WBA65I-DK1/ROT_Provisioning content in Projects/STM32WBA55G-DK1/ROT_Provisioning

2.5. Ready to start

Your STM32WBA55G-DK1 board is now adapted to OEMxRoT Boot path. To test it, run the provisioning.bat/sh script stored in the Firmware/Projects/STM32WBA55G-DK1/OEMiROT folder and follow the instructions.

3. OEMiRoT projects creation for NUCLEO-WBA55CG

OEMiRoT example can be generated for the NUCLEO-WBA55CG board using the STM32WBA65I-DK1 board as a reference. To do that, follow the steps below:

3.1. Get the source files from the STM32WBA65I-DK1 board:

  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli content in Projects/NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Appli_TrustZone content in Projects/NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli_TrustZone
  • Copy the Projects/STM32WBA65I-DK1/Applications/ROT/OEMiROT_Boot content in Projects/NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Boot

3.2. Change the board name in the project files :

Following your preferred IDE, update the project files replacing STM32WBA65I-DK1 to NUCLEO-WBA55CG

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Boot/
EWARM/Project_s.ewd

Security WBA NUCLEO-WBA55CG OEMiROT Boot EWARM ewd.png

EWARM/Project_s.ewp

Security WBA NUCLEO-WBA55CG OEMiROT Boot EWARM ewp.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Boot/

MDK-ARM/Project.uvoptx

Security WBA NUCLEO-WBA55CG OEMiROT Boot MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA NUCLEO-WBA55CG OEMiROT Boot MDK-ARM uvprojx.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Boot/

STM32CubeIDE/Secure/.cproject
Security WBA NUCLEO-WBA55CG OEMiROT Boot STM32CubeIDE cproject.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli_Trustzone/
EWARM/Secure/Project_s.ewd

Security WBA NUCLEO-WBA55CG OEMiROT AppliTrustzone S EWARM ewd.png

EWARM/Secure/Project_s.ewp

Security WBA NUCLEO-WBA55CG OEMiROT AppliTrustzone S EWARM ewp.png

EWARM/NonSecure/Project_ns.ewd

Security WBA NUCLEO-WBA55CG OEMiROT AppliTrustzone NS EWARM ewd.png

EWARM/NonSecure/Project_ns.ewp

Security WBA NUCLEO-WBA55CG OEMiROT AppliTrustzone NS EWARM ewp.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli_Trustzone/

MDK-ARM/Secure/Project_S.uvoptx

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone S MDK-ARM uvoptx.png

MDK-ARM/Secure/Project_S.uprojx

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone S MDK-ARM uvprojx.png

MDK-ARM/NonSecure/Project_NS.uvoptx

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone NS MDK-ARM uvoptx.png

MDK-ARM/NonSecure/Project_NS.uprojx

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone NS MDK-ARM uvprojx.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli_Trustzone/

STM32CubeIDE/Secure/.cproject

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone S STM32CubeIDE cproject.png

STM32CubeIDE/NonSecure/.cproject

Security WBA NUCLEO-WBA55CG OEMiROT Appli Trustzone NS STM32CubeIDE cproject.png


NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli/
EWARM/Project_s.ewd

Security WBA NUCLEO-WBA55CG OEMiROT Appli EWARM ewd.png

EWARM/Project_s.ewp

Security WBA NUCLEO-WBA55CG OEMiROT Appli EWARM ewp.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli/

MDK-ARM/Project.uvoptx

Security WBA NUCLEO-WBA55CG OEMiROT Appli MDK-ARM uvoptx.png

MDK-ARM/Project.uvprojx

Security WBA NUCLEO-WBA55CG OEMiROT Appli MDK-ARM uvprojx.png

NUCLEO-WBA55CG/Applications/ROT/OEMiROT_Appli/

STM32CubeIDE/Secure/.cproject
Security WBA NUCLEO-WBA55CG OEMiROT Appli STM32CubeIDE cproject.png

3.3. Adapt all region_defs.h to the correct board :

OEMiROT_Boot/inc/region_defs.h :

Security WBA NUCLEO-WBA65R OEMiROT Boot region defs.png

OEMiROT_Appli_Trustzone/Secure_nsclib/appli_region_defs.h :

Security WBA NUCLEO-WBA65R OEMiROT Appli appli region defs.png

OEMiROT_Appli/Secure_nsclib/appli_region_defs.h :

Security WBA NUCLEO-WBA65R OEMiROT Appli appli region defs.png

3.4. Get the provisioning files from the STM32WBA65I-DK1 board :

  • Copy the Projects/STM32WBA65I-DK1/ROT_Provisioning content in Projects/NUCLEO-WBA55CG/ROT_Provisioning

3.5. Ready to start

Your NUCLEO-WBA55CG board is now adapted to OEMiRoT Boot path. To test it, run the provisioning.bat/sh script stored in the Firmware/Projects/NUCLEO-WBA55CG/OEMiROT folder and follow the instructions.