X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Fao-stmload%2Fao-stmload.c;h=71d1ec572409e6ebd54d71a7ea40e90db22869aa;hp=a11d93de68974c1c0e417f8f69c44cd412536e00;hb=d93a65a90f19e4816231e03b1f399af6e3742aee;hpb=14204e3d147ad99cc249ad8de254809180fe5c38;ds=sidebyside diff --git a/ao-tools/ao-stmload/ao-stmload.c b/ao-tools/ao-stmload/ao-stmload.c index a11d93de..71d1ec57 100644 --- a/ao-tools/ao-stmload/ao-stmload.c +++ b/ao-tools/ao-stmload/ao-stmload.c @@ -32,6 +32,8 @@ #include "cc-usb.h" #include "cc.h" #include "ao-stmload.h" +#include "ao-selfload.h" +#include "ao-verbose.h" #define AO_USB_DESC_STRING 3 @@ -249,13 +251,13 @@ static const struct option options[] = { { .name = "device", .has_arg = 1, .val = 'D' }, { .name = "cal", .has_arg = 1, .val = 'c' }, { .name = "serial", .has_arg = 1, .val = 's' }, - { .name = "verbose", .has_arg = 0, .val = 'v' }, + { .name = "verbose", .has_arg = 1, .val = 'v' }, { 0, 0, 0, 0}, }; static void usage(char *program) { - fprintf(stderr, "usage: %s [--stlink] [--verbose] [--device=] [-tty=] [--cal=] [--serial=] file.{elf,ihx}\n", program); + fprintf(stderr, "usage: %s [--stlink] [--verbose=] [--device=] [-tty=] [--cal=] [--serial=] file.{elf,ihx}\n", program); exit(1); } @@ -316,7 +318,7 @@ main (int argc, char **argv) struct ao_sym *file_symbols; int num_file_symbols; - while ((c = getopt_long(argc, argv, "T:D:c:s:Sv", options, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "T:D:c:s:Sv:", options, NULL)) != -1) { switch (c) { case 'T': tty = optarg; @@ -346,7 +348,7 @@ main (int argc, char **argv) } } - ao_self_verbose = verbose; + ao_verbose = verbose; if (verbose > 1) ccdbg_add_debug(CC_DEBUG_BITBANG);