cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Some questions regarding the SBSFU loader

ali rostami
Associate III

I couldn't find any clear explanation for the term loader on an5056 and um2262.

Maybe it is so obvious for others but unfortunately not for me:\ So here is my questions regarding loader and appreciate you helping me understand it well.

  • What is the loader on SBSFU projects? does it refer to the ymodem protocol or the uart?
  • What does a standalone loader mean? when do we need it?
  • Why use ymodem for transferring firmware? Is there any alternative or even better protocol?
  • In my project, I need to update the device with an android phone through the USB-CDC. I should change the uart to usb-cdc. The android app needs to download the .sfb file from a server and send it to the MCU to upgrade it by ymodem protocol, Am I right?
1 ACCEPTED SOLUTION

Accepted Solutions
Arno1
Senior

Hi Ali,

  • It is the ymodem protocol.
    • There are 2 main files: sfu_loader.c and sfu_com_loader.c
    • The idea was probably to have some sort of generic implementation in sfu_loader.c with sfu_com_loader.c the specific choice based on how you choose SECBOOT_LOADER
  • IIRC, the standalone loader is where the loader is in a separate binary so the same binary is accessible from both SBSFU and your user app. This can help to reduce flash use if you need the same functionality in both SBSFU and user app.
  • x-cube-sbsfu is meant to be an example for you to develop your own bootloader from. Ymodem is a simple enough protocol to implement. You can implement any protocol you prefer and Ymodem is just an example to get you started.
  • No, you don't have to use the ymodem protocol here, you can use whatever protocol that might better serve your purpose but than you'll have to implement it yourself.

Regards,

Arno

View solution in original post

1 REPLY 1
Arno1
Senior

Hi Ali,

  • It is the ymodem protocol.
    • There are 2 main files: sfu_loader.c and sfu_com_loader.c
    • The idea was probably to have some sort of generic implementation in sfu_loader.c with sfu_com_loader.c the specific choice based on how you choose SECBOOT_LOADER
  • IIRC, the standalone loader is where the loader is in a separate binary so the same binary is accessible from both SBSFU and your user app. This can help to reduce flash use if you need the same functionality in both SBSFU and user app.
  • x-cube-sbsfu is meant to be an example for you to develop your own bootloader from. Ymodem is a simple enough protocol to implement. You can implement any protocol you prefer and Ymodem is just an example to get you started.
  • No, you don't have to use the ymodem protocol here, you can use whatever protocol that might better serve your purpose but than you'll have to implement it yourself.

Regards,

Arno