cancel
Showing results for 
Search instead for 
Did you mean: 

I have downloaded the X-CUBE-SBSFU V2.4.0 and build project NUCLEO-G071RB. It works and can download firmware from Tera Term's ymodem send. Can we use only Tera Term? Do any other tools be used for download firmware?

EEdwa.1
Associate II
 
18 REPLIES 18
Jocelyn RICARD
ST Employee

Hello,

the SBSFU package provides and example of secure boot and secure firmware update.

This example implements the Ymodem protocol.

It you want to use another interface and/or protocol, you have to implement it.

The implementation of Ymodem protocol should help you understanding what needs to be changed.

Best regards

Jocelyn

Arno1
Senior

On linux I use minicom which uses sb to send files using the YMODEM protocol.

I've had to split the debug output from the update communication by using a different UART for each. I suppose TeraTerm is better able to filter out other data on the bus that is not used for YMODEM.

Jocelyn RICARD
ST Employee

Hello Arno,

this is not better with Teraterm. This is the limitation of this solution.

When downloading a new firmware through Ymodem, you lose the traces.

When it is needed to debug this specific part, I use a UART protocol analyzer connected to Rx and Tx.

Best regards

Jocelyn

Hi Arno,

So can you download firmware successfully by minicom?

I have try to comment "#define SFU_DEBUG_MODE" in app_sfu.h

And try to download firmware by minicom, but failed.

Should I need to modify anything else?

Thank you

I'm going off of memory here as it's been a while but the splitting was more to see traces while testing ymodem uploads.

But that indeed may not have been the reason why things worked.

can you share your minicom ymodem settings?

Ctrl-A Z -> O (configure) -> File Transfer protocols

Hi Arno,

It show the following messages,

+------------------------------------------------------------------------------+
|     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 -k              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    |
| J    -                                                                       |
| K    -                                                                       |
| L    -                                                                       |
| M  Zmodem download string activates... D                                     |
| N  Use filename selection window...... Yes                                   |
| O  Prompt for download directory...... No                                    |
|                                                                              |
|   Change which setting? (SPACE to delete)                                    |
+------------------------------------------------------------------------------+

After Ctrl-A s -> ymodem -> [Select one or more files for upload],

It show the following messages,

After press the Enter, it is still in download mode.

+-----------[ymodem upload - Press CTRL-C to quit]------------+
|Sending: UserApp.sfb                                         |
|Ymodem sectors/kbytes sent: 154/19kRetry 0: Cancelled        |
|                                                             |
|Transfer incomplete                                          |
|                                                             |
| READY: press any key to continue...                         |
|                                                             |
+-------------------------------------------------------------+

Thank you

setting seems fine. This is mine for B:

/usr/bin/sb -o --ymodem -k -vv

This is my setting from when I had the same issue and haven't touched it in over a year so this may not be the solution (I know not very helpful) but perhaps you can try it.

You need to activate MINICOM_YMODEM flag.

No need to deactivate the debug mode.

Best regards

Jocelyn