Changed size argument to hex
authorjnosky <codegrinder69@hotmail.com>
Mon, 14 Nov 2011 21:16:57 +0000 (16:16 -0500)
committerjnosky <codegrinder69@hotmail.com>
Mon, 14 Nov 2011 21:16:57 +0000 (16:16 -0500)
Address was hex, size was decimal. Now uniform to be hex

flash/main.c

index 46a8ce1711e295651cf2c16e1bfae3c08bc6dd09..f1d0b4f845d0cd90f62ab313624c2cb60156621e 100644 (file)
@@ -21,6 +21,7 @@ static void usage(void)
 {
     puts("stlinkv1 command line: ./flash {read|write} /dev/sgX path addr <size>");
     puts("stlinkv2 command line: ./flash {read|write} path addr <size>");
+    puts("                       use hex format for addr and <size>");
 }
 
 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)
   {