From: jnosky Date: Mon, 14 Nov 2011 21:16:57 +0000 (-0500) Subject: Changed size argument to hex X-Git-Url: https://git.gag.com/?p=fw%2Fstlink;a=commitdiff_plain;h=67db39b0b31dc76dcc83405f7dba28ee04f90432 Changed size argument to hex Address was hex, size was decimal. Now uniform to be hex --- diff --git a/flash/main.c b/flash/main.c index 46a8ce1..f1d0b4f 100644 --- a/flash/main.c +++ b/flash/main.c @@ -21,6 +21,7 @@ static void usage(void) { puts("stlinkv1 command line: ./flash {read|write} /dev/sgX path addr "); puts("stlinkv2 command line: ./flash {read|write} path addr "); + puts(" use hex format for addr and "); } static int get_opts(struct opts* o, int ac, char** av) @@ -46,7 +47,7 @@ static int get_opts(struct opts* o, int ac, char** av) i = 1; } - o->size = strtoul(av[i + 3], NULL, 10); + o->size = strtoul(av[i + 3], NULL, 16); } else if (strcmp(av[0], "write") == 0) {