2021-01-21 05:18 AM
2021-01-25 12:50 AM
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
2021-01-29 12:42 AM
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.
2021-01-29 01:18 AM
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
2021-01-29 01:48 AM
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
2021-01-29 03:46 AM
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.
2021-01-29 03:48 AM
can you share your minicom ymodem settings?
Ctrl-A Z -> O (configure) -> File Transfer protocols
2021-01-29 04:37 AM
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
2021-01-29 04:44 AM
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.
2021-01-29 05:48 AM
You need to activate MINICOM_YMODEM flag.
No need to deactivate the debug mode.
Best regards
Jocelyn