AN5056
8.4
How to change the firmware version
The firmware version is part of the firmware header generated with the postbuild.bat script.
In the following example, the version is 5.
Caution:
The firmware with version SFU_FW_VERSION_INIT_NUM app_sfu.h is the only one
allowed for installation when the header of the installed image is not valid. This is the case
either because no firmware is installed (Development phase) or due to an attack attempt. It
is important to keep such firmware private as the only purpose of this version is to analyze
and repair devices returned from the field.
8.5
How to validate a firmware image
First of all, the ENABLE_IMAGE_STATE_HANDLING compilation switch must be defined in
SECoreBin, SBSFU, and UserApp IDE configuration.
At the first user application start-up, if the execution is correct (For example after self-tests
execution) the user application must call a running service SE_APP_Validate(slot_id) if
available or update dedicated flags in RAM otherwise to validate the firmware image. If not
done a rollback on the previous firmware image is performed by SBSFU at the next reset.
An example is provided in the user application through the menu
FW_VALIDATE_RunMenu() as shown in
slot identification parameter can be either 1, 2, 3, or 255. The value 255 indicates that all
new firmware images are validated through a single request. The objective is to ensure
firmware compatibility between all new images in case of interruption during the validation
phase.
Figure 40. Firmware version change
Figure
AN5056 Rev 8
Adapting the user application
41. In a multiple image configuration, the
45/49
48
Need help?
Do you have a question about the X-CUBE-SBSFU STM32Cube and is the answer not in the manual?