cancel
Showing results for 
Search instead for 
Did you mean: 

Flash Secure Firmware from Linux host without Tera Term

MdFayaz
Associate III

I build SBSFU using X-CUBE extension for STM32F769I-DISCO. Flashed the "SBSFU_UserApp.bin" file using STM32CubeProgrammer. Now I need to send UserApp.sfb file via YMODEM without using Tera Term

I used,

stty -F /dev/ttyACM0 115200
sb UserApp.sfb >/dev/ttyACM0 </dev/ttyACM0

Is there any extra parameters to be mentioned or is there any other way without using tera term?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JHOUD​ , I add the following macro (MINICOM_YMODEM) to the following files in project (2_Images):

  • 2_Images_SBSFU/SBSFU/App/sfu_boot_loader.h
  • 2_Images_UserApp/Src/ymodem.c
  • 2_Images_UserApp/Src/fw_update_app.c
  • 2_Images_UserApp/Inc/ymodem.h
#define MINICOM_YMODEM

Then I build all three and selected option 1 on putty while the board is connected.

Then I entered the following command on Linux Terminal:

    stty -F /dev/ttyACM0 115200
    sb UserApp.sfb >/dev/ttyACM0 </dev/ttyACM0

This worked for me.

View solution in original post

3 REPLIES 3
Bubbles
ST Employee

Hi @MdFayaz​ ,

the SBSFU doesn't support all the variants of the YMODEM, for example the variable size of the block. If you force the block size to 1K, there should be no problem.

The ymodem.c source in the SBSFU project loader file may also give you some further hints in case the block size doesn't help.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @JHOUD​ , I add the following macro (MINICOM_YMODEM) to the following files in project (2_Images):

  • 2_Images_SBSFU/SBSFU/App/sfu_boot_loader.h
  • 2_Images_UserApp/Src/ymodem.c
  • 2_Images_UserApp/Src/fw_update_app.c
  • 2_Images_UserApp/Inc/ymodem.h
#define MINICOM_YMODEM

Then I build all three and selected option 1 on putty while the board is connected.

Then I entered the following command on Linux Terminal:

    stty -F /dev/ttyACM0 115200
    sb UserApp.sfb >/dev/ttyACM0 </dev/ttyACM0

This worked for me.

Thanks @MdFayaz​ ,

this solution should be useful for other users.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.