Skip to content

Commit

Permalink
cli: 更新 timeout 相关选项的帮助
Browse files Browse the repository at this point in the history
Signed-off-by: xychen <xychen@listenai.com>
  • Loading branch information
xychen committed May 21, 2024
1 parent 5d6cf15 commit f24cefd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,28 @@ USB burning options:
check for device presence (without burning)
Serial burning options:
-b, --baud
-b, --baud <rate>
baud rate used for serial burning (default: 3000000)
-C, --chip
-C, --chip <family>
chip family, acceptable values: 3/4/6 (default: 4)
--chip-id
read unique chip ID
--verify-all
verify all partitions after burning
-n, --nand
burn to NAND flash (CSK6 only)
--probe-timeout <ms>
timeout for probing device (default: 10000 ms)
--reset-attempts <n>
number of attempts to reset device during probing (default: 4)
--reset-delay <ms>
delay in milliseconds the reset line is held low (default: 500 ms)
--timeout <ms>
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 <addr:size>
Expand Down
19 changes: 17 additions & 2 deletions cskburn/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ print_help(const char *progname)
#endif

LOGI("Serial burning options:");
LOGI(" -b, --baud");
LOGI(" -b, --baud <rate>");
LOGI(" baud rate used for serial burning (default: %d)", DEFAULT_BAUD);
#ifndef WITHOUT_USB
LOGI(" -C, --chip");
LOGI(" -C, --chip <family>");
LOGI(" chip family, acceptable values: 3/4/6 (default: %d)", DEFAULT_CHIP);
#endif
LOGI(" --chip-id");
Expand All @@ -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 <ms>");
LOGI(" timeout for probing device (default: %d ms)", DEFAULT_PROBE_TIMEOUT);
LOGI(" --reset-attempts <n>");
LOGI(" number of attempts to reset device during probing (default: %d)",
DEFAULT_RESET_ATTEMPTS);
LOGI(" --reset-delay <ms>");
LOGI(" delay in milliseconds the reset line is held low (default: %d ms)",
DEFAULT_RESET_DELAY);
LOGI(" --timeout <ms>");
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):");
Expand Down

0 comments on commit f24cefd

Please sign in to comment.