cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU application: How to change secure and non-secure partition size.

RWill.3
Associate

Hi,

I've been successfully using the SBSFU example app found in STM32Cube_FW_L5_V1.2.0 SDK on the Nucleo-L552ZE. I'd now like to alter the partition size for the secure and non-secure f/w to suit my application. Initially I'd like to make the partitions both equally sized, so go from 4000h and 34000h to 1C000h for each (same overall size). I've altered the partition size definitions in flash_layout.h and all the project elements clean build fine (bootloader, secure and non-secure). However, after loading the files to the device in exactly the same way as used successfully before, the bootloader fails reading the image header and can find no bootable image.

Can someone please detail all the steps required to change the partition size?

I'm using the IAR EW for ARM v8.50.1.

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello,

One thing you may have missed is the setting of the secure region size in option bytes.

Best regards

Jocelyn

RWill.3
Associate

Hi Jocelyn,

Thanks for your response, in the end that wasn't where I found the issue. Just to feedback where I found the solution, there is a batch file SBSFU_UPDATE.bat that expects to load the 3 f/w images to specific hard-coded addresses using the STM32 Cube Programmer command line. Once I changed the address of the non-secure image (slot 1) from 0x0c013000 to 0x0c02b000 everything worked fine.

BR,

Rob