Firmware image preparation tool UM2262
80/94 UM2262 Rev 6
When compiling with the IDE, the keys and firmware image are handled. No extra action is
required from the user. At the end of the compilation steps:
• The required keys are embedded in the SECoreBin binary
• The firmware image to be installed is generated in the proper format, with the
appropriate firmware header, as a .sfb file. This .sfb file can be transferred over the
Ymodem protocol for installation by SBSFU.
• The .bin file that can be flashed for the test of UserApp (SBFU_UserApp.bin).
The batch files integrating the tool in the IDE are located in folder
Applications\2_Images\2_Images SECoreBin\EWARM:
• prebuild.bat: invoking the tool to perform the pre-build actions when compiling the
SECoreBin project
• postbuild.bat: invoking the tool to perform the post-build actions when compiling the
UserApp project
These batch files allow seamless switching from the Windows
®
executable variant to the
Python™ script variant of the prepareimage tool. The procedure is described in the files
themselves.
E.5 Partial Image
A partial image contains only the binary portion of the new firmware image to install, versus
the active firmware image.
Partial-image usage presents various benefits:
• Smaller firmware image to download (reduced download duration)
• Faster firmware image installation
• Memory mapping optimization, with possibly smaller Slot #1 (maximum size of partial
image) and bigger Slot #0 (maximum size of full image)
This feature is available on dual-image variant only (not available on single-image variant).
For the partial-image feature, the header structure includes two instances of the FW tag:
• Partial FW tag: tag of the partial image only. This tag is checked by SBSFU during the
image installation phase.
• FW tag: tag of the full image (after the installation of the partial image). This tag is
checked by SBSFU during the image boot phase.
The prepareimage tool can be used to generate partial firmware image, starting from the
active image and the new firmware image to install:
1. First perform a binary comparison between the two full images in clear
2. Then apply the usual image preparation procedure
Refer to the detailed procedure Example for partial update described in the readme.txt file of
the prepareimage tool
(Middlewares\ST\STM32_Secure_Engine\Utilities\KeysAndImages\readme.txt).