cancel
Showing results for 
Search instead for 
Did you mean: 

I am using SBSFU 2 image project for OTA, I am able to do OTA successfully via UART (Xbee), but I also want to flash User firmware using Segger jlink. Is it possible or not?

Brajp.1
Associate II
 
7 REPLIES 7
Jocelyn RICARD
ST Employee

Hello @Brajp.1​ ,

SBSFU is a secure boot.

To make it secure you need to activate hardware secure protections adapted to your device (in app_sfu.h).

Once these protections are activated, this is no more possible to access to the device with the JTAG or SWD interface. If is was possible, device wouldn't be secure.

So, only way to update your application is to use a standard communication interface such as UART, USB, etc. Any interface that allows your application to download the update firmware.

Best regards

Jocelyn

Brajp.1
Associate II

Thanks for the answer, but right now we are in the development phase for that I have disabled those security features. So when I use SWD to write user firmware I am seeing that SBSFU is not accepting this user firmware because the header is not matching.

So is there any way by which we can generate combined firmware SBSFU and user application?

Thanks for the answer, but right now we are in the development phase for that I have disabled those security features. So when I use SWD to write user firmware I am seeing that SBSFU is not accepting this user firmware because the header is not matching.

So is there any way by which we can generate combined firmware SBSFU and user application?

Jocelyn RICARD
ST Employee

Hello @Brajp.1​ ,

OK I understand.

This is possible, but you need to modify the tools to be able to generated an "installed firmware" only.

This is the firmware with header that is inside the big image (SBSFU_UserApp.bin)

So, if you adapt the postbuild to generate such standalone firmware, you can download it with jlink.

Best regards

Jocelyn

As per your suggestion, I have checked the post-build python script that the user application project is using to generate the big image.

Following is the command script is using:

 command=$cmd" "$prepareimage" merge -v 0 -e 1 -i "$headerbin" -s "$sbsfuelf" -u "$elf" "$bigbinary

So my question is, in the command itself header file, sbsfu file, and user firmware files are used but even though after flashing this big image it is not switching from sbsfu to user application., showing the following debug message.

= [SBOOT] STATE: CHECK USER FW STATUS

 Slot SLOT_ACTIVE_1 not empty : erasing ...

Jocelyn RICARD
ST Employee

Hello @Brajp.1​ ,

Well, it seems I didn't really catch your concern.

With base example, are you able to flash a working binary with Segger Jlink?

Best regards

Jocelyn

I have ported the SBSFU project for STM32L4S7 MCU that's why there is one mistake related to the Header address after correcting that problem got solved.