X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=flash%2Fmain.c;h=5637489236c7785c806efbebbcc9e2f9e90bda6d;hb=83a5eb2ed34ed78edacd92a69f366b89728ac5d0;hp=44157816e9084b93359b3ae19bcba82725cafbfd;hpb=794a560ebf95fcc97a56b89827d273cf0f726c87;p=fw%2Fstlink diff --git a/flash/main.c b/flash/main.c index 4415781..5637489 100644 --- a/flash/main.c +++ b/flash/main.c @@ -23,6 +23,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) @@ -48,7 +49,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) {