cancel
Showing results for 
Search instead for 
Did you mean: 

For SBSFU v2.4.0, Send firmware file by Linux Minicom YMODEM failed

EEdwa.1
Associate II

Hi,

I have download the newest version SBSFU v2.4.0.

From the readme.txt, I compile the SBSFU project NUCLEO-G071RB 1_Image_SBSFU with the MINICOM_YMODEM switch enabled (app_sfu.h).

But send the user encrypted firmware file UserApp.sfb always failed.

How to send firmware by Minicom YMODEM successfully?

My minicom version is 2.7.

The following is the error message.

+-----------[ymodem upload - Press CTRL-C to quit]------------+         

|Sending: UserApp.sfb                     |         

|Ymodem sectors/kbytes sent: 158/19kRetry 0: Cancelled    |         

|                               |         

|Transfer incomplete                     |         

|                               |         

| READY: press any key to continue...             |         

|                               |         

+-------------------------------------------------------------+ 

= [SBOOT] STATE: HANDLE CRITICAL FAILURE                         

= [EXCPT] BINARY IMAGE TOO BIG TO BE STORED IN DWL SLOT!                 

= [SBOOT] STATE: REBOOT STATE MACHINE                           

========= End of Execution ==========                           

                                             

                                             

                                             

= [SBOOT] System Security Check successfully passed. Starting...             

                                             

                                             

======================================================================          

=       (C) COPYRIGHT 2017 STMicroelectronics         =          

=                                  =          

=       Secure Boot and Secure Firmware Update        =          

======================================================================          

                                             

                                             

= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL                     

= [SBOOT] STATE: CHECK STATUS ON RESET                          

     INFO: A Reboot has been triggered by a Software reset!             

     INFO: Last execution detected error was: FW too big.              

= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD                      

= [SBOOT] STATE: CHECK USER FW STATUS                           

     No valid FW found in the active slots nor new FW to be installed        

     Waiting for the local download to start...                   

= [SBOOT] STATE: DOWNLOAD NEW USER FIRMWARE                        

     File> Transfer> YMODEM> Send CCCCCCCCCCCCCCCCCC

Thanks.

10 REPLIES 10
Jocelyn RICARD
ST Employee

Hello,

sorry I didn't have time to look at this issue.

On my side, I'm trying to make it work on MacOS, but also fails, maybe for different reason, the transfer does not start at all.

Only way to debug is to connect a logic analyser on UART wires to understand what happens

Best regards

Jocelyn

PThom.11
Associate

I'm currently seeing exactly the same error under the same conditions: Linux and Minicom. Did you get to the bottom of it?

EBonv
Associate III

I am also facing the same issue with Linux and Minicom on a NUCLEO H753ZI. Has anyone found a solution?

Have you waited enough (~ 10 sec) to start transfer?

I don't use Ymodem with Minicom on Linux but with Teraterm on Windows there's a very long delay before the PC starts sending data.

It could seem that transfer does not start at all. For me it is annoying but not enough motivating to debug it.

The thing with Minicom on Linux is that the transfer does start (cf. original post). You can see a progress bar indicating that the sfb file file is being downloaded. However it stops at some point and says there isn't enough space on the DWL slot for the binary image. For me, this happens after transferring 187 sectors.

PThom.11
Associate

EBonv, Yes, that was what I was seeing. By searching for the error message in the code I believe that the firmware is not counting in the firmware size correctly. It could just be a byte over and it generates the error. To be honest, I am working with someone who is working on a Windows platform and for compatibility I have defected to Windows for further development. I don't believe that the problem should be too difficult to fix but I didn't realise a solution.

honestech
Associate II

I have used a different MCU (stm32wl55) than you and faced the same issue.

Eventually, I found a workaround.

This would help you.

https://community.st.com/s/question/0D53W00000uYLzcSAG/stm32cubewl-sbsfu-doesnt-upload-the-userappsfb-using-linux-minicom?t=1625003247692

Hi Jocelyn,

I am also on MacOS and the transfer doesn't start here as well... the ymodem popup view shows up for one second and then disappears without any message.

Did you figure out a solution?

EDIT: I think the issue might come from the fact that `sb` is not available on MacOS but is still being used when looking at the "file transfer protocol" window

EDIT2: indeed that was the issue. Download lrzs https://formulae.brew.sh/formula/lrzsz and change the config in minicom to use lsb and lrb instead or sb and rb

Best,

Cyril

Hello Cyril,

Thank you for the hint.

i could make this work also, but on my setup it is very slow as it is transmitting 128Bytes of data at each frames.

Do you get same behaviour ?

I'm running MacOS Big Sur

Best regards

Jocelyn