From 9162c690e32a9f48c1035ea9c9d2b0c017c1ed79 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Wed, 27 Dec 2023 16:16:02 +0800 Subject: [PATCH 1/2] ymodem:set the transport retry as optional The waiting duration of the rb/sb command can be determined based on the number of retransmissions, so that ymodem can restart to the normal system after running in the bootloader for a short period of time. Signed-off-by: anjiahao --- system/ymodem/rb_main.c | 22 ++++++- system/ymodem/sb_main.c | 17 ++++++ system/ymodem/sbrb.py | 126 +++++++++++++++++++++++----------------- system/ymodem/ymodem.c | 10 ++-- system/ymodem/ymodem.h | 2 + 5 files changed, 114 insertions(+), 63 deletions(-) diff --git a/system/ymodem/rb_main.c b/system/ymodem/rb_main.c index 1beb8c2a277..6dd08408460 100644 --- a/system/ymodem/rb_main.c +++ b/system/ymodem/rb_main.c @@ -330,6 +330,12 @@ static void show_usage(FAR const char *progname) fprintf(stderr, "\t-t|--threshold : Threshold for writing asynchronously." "Threshold must be less than or equal buffersize, Default: 0kB\n"); + fprintf(stderr, + "\t-i|--interval