EasyManua.ls Logo

ST X-CUBE-SBSFU STM32Cube - Optimizing Memory Mapping; Table 3. SBSFU Code-Size Reduction

ST X-CUBE-SBSFU STM32Cube
49 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Adapting SBSFU AN5056
36/49 AN5056 Rev 8
7.2 Optimizing memory mapping
Several options exist to reduce SBSFU code size to maximize the size of the user
application slot. Some of these options are summarized in
Table 3.
The total gain depends on the mapping constraints described in Section 3.2: Memory
mapping definition on page 10.
As an example, Figure 32 highlights the mapping modifications to be done. Starting from 2
images with a symmetric cryptographic scheme, the SFFU_DEBUG_MODE and
SECBOOT_USE_LOCAL_LOADER switches are disabled, resulting in a 16-Kbyte increase of
the user application size.
Table 3. SBSFU code-size reduction
Option Description / Consequence Gain
Select 1-image variant
Download a new firmware image from the
user application is no more possible.
Slot size is doubled
vs. 2-image projects
Select AES-GCM symmetric
cryptographic scheme
Shared symmetric key secret stored in the
device.
~ 9 Kbytes
Disable SFU_DEBUG_MODE
No more information displayed on the
terminal during SBSFU execution
~ 9 Kbytes
Disable SECBOOT_USE_LOCAL_LOADER
No more local loader inside the SBSFU
application. This is not compatible with 1-
image variant.
~3 Kbytes
Implement a hardware decryption
Select STM32 devices integrating
cryptographic hardware IP.
This depends on the user
implementation
If all the code running on STM32 is fully
trusted and robust then Secure Engine
internal isolation based on MPU for
STM32F4/F7/G0/G4/H7/L1 can be
removed.
Removes alignment constraints with MPU
regions.
Up to 12 Kbytes
depending on products

Table of Contents