cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeWL SBSFU doesn't upload the UserApp.sfb using Linux minicom

honestech
Associate II

Hello,

I am trying to upload the user firmware using BFU(1 slot) and Linux minicom, it always failed to complete to transfer a UserApp.sfu. I have read the UM2767 and followed all steps. But it works well on Windows Tera Term.

I am testing on both of Nucleo55 eval board and custom board and using STM32Cube_FW_WL_V1.0.0(SBSFU version 2.4.0), not succeed.

I have looked for the similar issues, couldn't get the workaround.

There are some similar issues:

https://community.st.com/s/question/0D53W00000HMk4nSAD/for-sbsfu-v240-send-firmware-file-by-linux-minicom-ymodem-failed

https://community.st.com/s/question/0D53W00000Eba1XSAR/download-firmware-by-ymodem-failed-at-linux

Last article tells me this issue would be fixed in SBSFU v2.4.0, but I am failing.

This is what I've done:

  • defined MINICOM_YMODEM in app_sfu.h
  • Erase flash and upload the BFU.bin
  • set minicom 115200bps, 8N1, HW flow control: None.
  • ymodem protocol setting:
+------------------------------------------------------------------------------+
|     Name             Program                 Name U/D FullScr IO-Red. Multi  |
| A  zmodem     /usr/bin/sz -vv -b              Y    U    N       Y       Y    |
| B  ymodem     /usr/bin/sb -vv                 Y    U    N       Y       Y    |
| C  xmodem     /usr/bin/sx -vv                 Y    U    N       Y       N    |
| D  zmodem     /usr/bin/rz -vv -b -E           N    D    N       Y       Y    |
| E  ymodem     /usr/bin/rb -vv                 N    D    N       Y       Y    |
| F  xmodem     /usr/bin/rx -vv                 Y    D    N       Y       N    |
| G  kermit     /usr/bin/kermit -i -l %l -b %b  Y    U    Y       N       N    |
| H  kermit     /usr/bin/kermit -i -l %l -b %b  N    D    Y       N       N    |
| I  ascii      /usr/bin/ascii-xfr -dsv         Y    U    N       Y       N    |

  

It's my minicom log.

Welcome to minicom 2.7.1                            
 
                                        
 
OPTIONS: I18n                                  
 
Compiled on Aug 13 2017, 15:25:34.                       
 
Port /dev/ttyUSB0, 21:32:12                           
 
     +-----------[ymodem upload - Press CTRL-C to quit]------------+    
 
Press CTR|Sending: UserApp.sfb                     |     
 
     |Ymodem sectors/kbytes sent: 191/23kRetry 0: Cancelled    |     
 
CC    |                               |     
 
     |Transfer incomplete                     |     
 
     |                               |     
 
     | READY: press any key to continue...             |    
 
     |                               |    
 
     +-------------------------------------------------------------+

But the image size is about 24.5kB. :(

Does anyone have any idea?

Any suggestions would be appreciated.

Thanks.

  

1 ACCEPTED SOLUTION

Accepted Solutions
honestech
Associate II

I realized there is one way to use minicom on Linux like Tera Term on Windows.

You don't need to build with MINICOM_YMODEM definition for minicom. Just leave it commented.

You should set the minicom ymodem to

sb -vv -k

Option -k will allow the minicom to transfer the file using ymodem-1k.

That works well for me.

Cheers,

View solution in original post

2 REPLIES 2
honestech
Associate II

I realized there is one way to use minicom on Linux like Tera Term on Windows.

You don't need to build with MINICOM_YMODEM definition for minicom. Just leave it commented.

You should set the minicom ymodem to

sb -vv -k

Option -k will allow the minicom to transfer the file using ymodem-1k.

That works well for me.

Cheers,

GCapr.2
Associate

Hello,

I just encountered the same issue with minicom, and MINICOM_YMODEM definition.

After debugging a bit, I noticed that the m_uDwlAreaSddress doesn't add the rx bytes correctly.

There are a few ways to address this, but the fastest way is to only take into account the rx header size (192 bytes), not the entire SE_FW_HEADER_TOT_LEN (320 bytes).

0693W00000DlkHYQAZ.pngAnother way would be to actually wait for the entire 320 bytes of the fw_header[] to be received, and then write it in Flash.

The following bytes between the header and the actual image are ignored anyway.

Hope that someone from ST will see this and fix it accordingly.

Also @honestech​ , thank you for the Minicom settings. Hope this will speed up the image transfer.

Regards,

George