cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating MCUboot into a project

Ade J.2
Associate II

Split from old thread: https://community.st.com/t5/stm32-mcus-security/information-about-mcuboot-and-illustrative-examples/td-p/689154 


Hello @Jocelyn RICARD ,

I'm looking for guidance on integrating Mcuboot into my project. I am using a NUCLEO-U5A5ZJ-Q

STM32CubeIDE 1.17

First of all some notes about the experience:

  1. When using the example selector in CubeIDE and, for example the SBSFU_Boot project, it has several problems related to paths in the shell scripts. It cannot find the env.sh file, since it's in the root SBSFU directory. 
  2. It shows only the content of the STM32CubeIDE directory, while it also has related content in the top directory?

How should I use this example correctly? Download the whole SBSFU project and not use CubeIDE, but use make/cmake and a manually installed compiler?

Are the provided examples by ST for Mcuboot in the SBSFU project using the modified Mcuboot middleware?
When writing my own bootloader is that the recommended way or is it only for demonstration purposes and  should I use the original mcubood itself?

It would highly appreciated if ST would make a proper step by step guide of how to build your own bootloader using Mcuboot on the wiki.st.com page. 
Edit: I am aware of AN5447, but it's very high level only..

 

Best regards,

Arnold

3 REPLIES 3
Jocelyn RICARD
ST Employee

Hello Arnold,

I would suggest using directly the example provided in the STM32CubeU5:

STM32Cube_FW_U5_V1.7.0\Projects\B-U585I-IOT02A\Applications\SBSFU\

In the readme file, it is explained what to do to adapt the example to your device.

The example is a porting on STM32U5, and mcuboot middleware is adapted to support more configuration use cases.

So, if you want to have a working setup you shouldn't change it.

Besides, there is a way to build a mcuboot for STM32 through trusted-firmware.org and CMake. This is part of BL2 TFM build. It follow TFM build rules.

Best regards

Jocelyn

 

 

Thanks @Jocelyn RICARD for your fast reply!

So for the example to work I should get the complete project and then open them individually in CubeIDE and then it should work fine?

I want to make some changes, so I guess I'll go straight to the stm32-mw-mcuboot after testing the example.

 

Best regards,

Arnold

Jocelyn RICARD
ST Employee

Hello @Ade J.2 ,

you can import the whole project at once in STM32CubeIDE.

Then build each project as described in the readme file.

Then you can make all the changes you need.

Best regards

Jocelyn