Skip to main content
MdFayaz
Associate III
April 17, 2023
Solved

Flash Secure Firmware from Linux host without Tera Term

  • April 17, 2023
  • 1 reply
  • 1511 views

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?

This topic has been closed for replies.
Best answer by MdFayaz

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.

1 reply

Bubbles
ST Employee
April 26, 2023

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.
MdFayaz
MdFayazAuthorBest answer
Associate III
April 27, 2023

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.

Bubbles
ST Employee
April 27, 2023

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.