From f24cefd613c86af4edc8ceab9ae0427626a7356d Mon Sep 17 00:00:00 2001 From: xychen Date: Tue, 21 May 2024 17:55:41 +0800 Subject: [PATCH] =?UTF-8?q?cli:=20=E6=9B=B4=E6=96=B0=20timeout=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=89=E9=A1=B9=E7=9A=84=E5=B8=AE=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xychen --- README.md | 16 ++++++++++++++-- cskburn/src/main.c | 19 +++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 20ec351..729b4dd 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ USB burning options: check for device presence (without burning) Serial burning options: - -b, --baud + -b, --baud baud rate used for serial burning (default: 3000000) - -C, --chip + -C, --chip chip family, acceptable values: 3/4/6 (default: 4) --chip-id read unique chip ID @@ -45,6 +45,18 @@ Serial burning options: verify all partitions after burning -n, --nand burn to NAND flash (CSK6 only) + --probe-timeout + timeout for probing device (default: 10000 ms) + --reset-attempts + number of attempts to reset device during probing (default: 4) + --reset-delay + delay in milliseconds the reset line is held low (default: 500 ms) + --timeout + override timeout for each operation (default: 0), acceptable values: + -1: no timeout + 0: use default strategy + n: timeout after n milliseconds (n > 0) + this option does not affect the timeout of probing device, use --probe-timeout if needed Advanced operations (serial only): --erase diff --git a/cskburn/src/main.c b/cskburn/src/main.c index 2ff1bd2..90408d0 100644 --- a/cskburn/src/main.c +++ b/cskburn/src/main.c @@ -239,10 +239,10 @@ print_help(const char *progname) #endif LOGI("Serial burning options:"); - LOGI(" -b, --baud"); + LOGI(" -b, --baud "); LOGI(" baud rate used for serial burning (default: %d)", DEFAULT_BAUD); #ifndef WITHOUT_USB - LOGI(" -C, --chip"); + LOGI(" -C, --chip "); LOGI(" chip family, acceptable values: 3/4/6 (default: %d)", DEFAULT_CHIP); #endif LOGI(" --chip-id"); @@ -251,6 +251,21 @@ print_help(const char *progname) LOGI(" verify all partitions after burning"); LOGI(" -n, --nand"); LOGI(" burn to NAND flash (CSK6 only)"); + LOGI(" --probe-timeout "); + LOGI(" timeout for probing device (default: %d ms)", DEFAULT_PROBE_TIMEOUT); + LOGI(" --reset-attempts "); + LOGI(" number of attempts to reset device during probing (default: %d)", + DEFAULT_RESET_ATTEMPTS); + LOGI(" --reset-delay "); + LOGI(" delay in milliseconds the reset line is held low (default: %d ms)", + DEFAULT_RESET_DELAY); + LOGI(" --timeout "); + LOGI(" override timeout for each operation (default: 0), acceptable values:"); + LOGI(" -1: no timeout"); + LOGI(" 0: use default strategy"); + LOGI(" n: timeout after n milliseconds (n > 0)"); + LOGI(" this option does not affect the timeout of probing device, use " + "--probe-timeout if needed"); LOGI(""); LOGI("Advanced operations (serial only):");