From f85c54be97bd3b69ae6b780ab6ebd9fa9e180fe3 Mon Sep 17 00:00:00 2001 From: fabalthazar Date: Mon, 29 Mar 2021 22:40:46 +0200 Subject: [PATCH] Prepared -w option --- src/platforms/pc/cl_utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index df13c12..0a27ca8 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -160,7 +160,9 @@ static void cl_help(char **argv) DEBUG_WARN("\t-e\t\t: Assume \"resistor SWD connection\" on FTDI: TDI\n" "\t\t\t connected to TMS, TDO to TDI with eventual resistor\n"); DEBUG_WARN("\t-E\t\t: Erase flash until flash end or for given size\n"); - DEBUG_WARN("\t-V\t\t: Verify flash against binary file\n"); + DEBUG_WARN("\t-w\t\t: Write binary file to target flash (default).\n"); + DEBUG_WARN("\t-V\t\t: Verify flash against binary file. Can be combined\n" + "\t\t\t with -w to verify right after programming.\n"); DEBUG_WARN("\t-r\t\t: Read flash and write to binary file\n"); DEBUG_WARN("\t-p\t\t: Supplies power to the target (where applicable)\n"); DEBUG_WARN("\t-R\t\t: Reset device\n"); @@ -184,7 +186,7 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv) opt->opt_flash_size = 16 * 1024 *1024; opt->opt_flash_start = 0xffffffff; opt->opt_max_swj_frequency = 4000000; - while((c = getopt(argc, argv, "eEhHv:d:f:s:I:c:Cln:m:M:tVtTa:S:jpP:rR")) != -1) { + while((c = getopt(argc, argv, "eEhHv:d:f:s:I:c:Cln:m:M:wVtTa:S:jpP:rR")) != -1) { switch(c) { case 'c': if (optarg)