Silvio Barani


Discussion created by Silvio Barani on Jun 4, 2018


I tried to port latest SBSFU to STM32L4+ line of MCUs using NUCLEO-L4R5ZI board.
I modified preprocessor macro to STM32L4R5xx and I found such problems:


1. FLASH_PAGE_SIZE for L4+ is 0x1000, while for L4 it is 0x0800.
It produces following error:
= [SBOOT] System Security Check successfully passed. Starting...
= [FWIMG] Slot #0 @: 8080800 / Slot #1 @: 800e000 / Swap @: 80f2800
= [FWIMG] slot 0 (8080800) is not properly aligned: please tune your settings
= [FWIMG] swap region (80f2800) is not properly aligned: please tune your settings
========= End of Execution ==========
Fix is simple: aligning memory addresses of SLOT_0 and SWAP to 0x1000.


When all protections are disabled (with SECBOOT_DISABLE_SECURITY_IPS defined) everything works fine.


Unfortunately when I tried to apply some protections I observed next two problems:
2. Inclusion of all protections resulted in linking problem: region `SB_ROM_region' overflowed by 728 bytes.

3. With some protections disabled (SFU_MPU_PROTECT_ENABLE and SFU_TAMPER_PROTECT_ENABLE) it is possible to link SBSFU but rolling reset was observed.
By experimenting I realized that enabling SFU_PCROP_PROTECT_ENABLE or SFU_FWALL_PROTECT_ENABLE causes rolling SBSFU reset.


I'm still investigating those problems, but I'm interested if someone already ported SBSFU to L4+.