From 9e0126a1d42f83165db02f1aa6fb0cf4b13c6a2c Mon Sep 17 00:00:00 2001 From: xychen Date: Tue, 21 May 2024 17:55:41 +0800 Subject: [PATCH] cli: Update help text for timeout options Signed-off-by: xychen --- README.md | 19 +++++++++++++------ cskburn/src/main.c | 22 ++++++++++++++++------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7e80542..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,11 +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, acceptable values: - -1: no timeout - 0: use default strategy - >0: timeout in milliseconds + 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 1cf5226..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,11 +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, acceptable values:"); - LOGI(" -1: no timeout"); - LOGI(" 0: use default strategy"); - LOGI(" >0: timeout in milliseconds"); + 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):");