Skip to main content
przemyslaw jakobczak
Associate II
May 10, 2024
Question

SBSFU - resize SBSFU Code to bigger

  • May 10, 2024
  • 1 reply
  • 1468 views

I've implemented on my own board (MCU STM32WLE5CCU6) bootloader SBSFU from example 'STM32Cube_FW_WL_V1.3.0\NUCLEO-WL55JC\BFU_1_Slot'. Everything works ok.In my own aplication i must change download channel from usart to by radio FSK. Because of handling radio i must change linker scripts in bootloader apping_fwimg.ld, mapping_sbsfu.ld). I must resize section SBSFU Code Region to bigger. I've changed 'SB_region_ROM_end' from value 0x0800CFFF to 0x08013FFF. Also i must changed following regions: KMS_DataStorage_start = 0x08014000;KMS_DataStorage_end = 0x08015FFF;SLOT_Blob_Dwl_1_start = 0x08016000;  SLOT_Blob_Dwl_1_end  = 0x080167FF;SLOT_Active_1_start = 0x08016800; SLOT_Active_1_end  = 0x0803FFFF. After compiled and runned code i have always the same problem. When the Secure Engine Call (inside SE_Init() function) is called in this line:

e_ret_status = (*SE_CallGatePtr)(SE_INIT_ID, peSE_Status, primask_bit, uSystemCoreClock); (which is between a SE_EnterSecureMode and SE_ExitSecureMode).

The MCU resets at this point, the reset happens continuously (reset loop) always at this line.

In bootloader i disabled all security Ips by SECBOT_DISABLE_SECURITY_IPS. To increase SBSFU code, i changed linker scripts. Beside this i must something yet change?

I suspect this error that i crossed area 64kB (0x10000) for SE code + SBSFU (end KMS_DataStorage_end = 0x08015FFF).

Can i change SBSFU Code region above 0x08010000 ?

This topic has been closed for replies.

1 reply

Jocelyn RICARD
ST Employee
May 13, 2024

Hello @przemyslaw jakobczak ,

there is not such 64kb constraint as far as I know.

Instead of guessing what could be wrong, I would suggest adding SECoreBin symbols in your debug configuration and enter in SE (using assembly stepping until you find C code again).

You should rapidly find the reason why it resets

Best regards

Jocelyn 

przemyslaw jakobczak
Associate II
May 15, 2024

Hello,

I've added  SECoreBin symbols in my debug configuration. When I debug function 'SE_CallGate' from SE, debbuger displays error "no source available for SE_CallGate() ...". I think that everything is ok in debug configuration.  I must yet set something else? Debug/Source? Screens below:

screen3.JPG

 

screen1.JPG

screen0.JPG