Lab 00-02: Building the SBSFU project using X-Cube-IDE

Application Project

  1. SBSFU project We are going to Step 1 & 2 highlighted in green in the below diagram, in this lab

import-project

  1. Secure Boot Implementation secure-boot

  2. Secure Firmware Update Implementation

sbsfu-certificates

4.First step is to compile the SECorebin project by right click on the project then Clean Project and subsequently Build Project

stcore-bin

  1. Second step is to compile the SBSFU project (that will use the output of Step 1) by right click on the project then Clean Project and subsequently Build Project

sbsfu

  1. Download the project on to the device, There are multiple ways to do this, in this we are going to use STM32CubeProgrammer,

The firmware binary for the SBSFU project can be found from the below folder. The BASE_DIR could vary dependending on where you installed the x-cube-aws-2.0 source navigate until ..\BootLoader_STSAFE\ 2_Images_SBSFU\STM32CubeIDE\B-L4S5I-IOT01_2_Images_SBSFU\Debug

Click Open–>Start Programming to download the firmware to the target.

  1. Confirm the firmware download is successful, before proceeding to the next step.

  2. Now we are going to verify the results

Once connected, reset the board (through the black button) and observe the output onto your screen

Secure Engine is initialized but afterwards as there is not yet an application (Step 3) no valid firmware image is found by the SBSFU which is normal

Once the board is connected to the PC, in a serial terminal emulator, locate the COM port and configure it: 8N1, 115200 bauds, no HW flow control Set the line endings to LF or CR-LF (Transmit) and LF (receive). Reset the board (thanks to the IDE, STM32CubeProgrammer, or the black reset button)