Skip to main content
jsalg.1
Associate II
January 24, 2025
Question

SBSFU Bootloader Not working In Release mode (When security flags enabled)

  • January 24, 2025
  • 4 replies
  • 748 views

Hi Team,

 

I am working on project where we are implementing Secure upgrade feature using SBSFU package, we followed the steps as mentioned by ST community and to integrate SBSFU in our project. we have two modes Debug mode and Release mode.

in Debug Mode: 

below Protection flags are disable

#define SFU_WRP_PROTECT_ENABLE
#define SFU_RDP_PROTECT_ENABLE
#define SFU_TAMPER_PROTECT_ENABLE 
#define SFU_DAP_PROTECT_ENABLE

and bootloader and application are working fine. we can see the software upgrade is happening.

 In Release mode:

all above Protection flags are enable. bootloader is not working I think it is not coming up properly.

I can see through STMCubeprogrammer the protection changes applied to flash.

worst part is, I couldn't debug bootloader code.

it would be great somebody help me in building SBSFU in Release mode.

Thanks in Advance.

 

4 replies

Technical Moderator
March 10, 2025

Hello @jsalg.1 

Can you clarify which STM32 Series you are targeting in your project ?

As you know the SBSFU security scheme is a bit different when the product is whith or without trustzone?

 

Best Regards,

Jocelyn RICARD
ST Employee
March 10, 2025

Hello @jsalg.1 ,

In order to understand where issue is occurring you will need to enable each protection one by one.

RDP protection will not allow you to debug, to it should be the last one. RDP protection should not impact the behaviour of your code.

I would first check the Tamper protection

Best regards

Jocelyn

Explorer
April 17, 2025

I am having the same problem.

When protections are not enabled, my system will boot normally and I can perform an sfb update and the system will reboot on completion.

When I define SFU_RDP_PROTECT_ENABLE it will also boot normally but after performing an update, the system seems to hang in the bootloader until a power cycle.

I've tried -c port=SWD reset=HWrst and it hangs as well.

 

Associate II
November 4, 2025

Hi @DGK22@jsalg.1,

Was your problem fixed? If yes, how?

Regards,

Denys