projects
/
fw
/
stlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f10d08b
)
Added usage prompt to flash utility
author
Ned Konz
<ned@productcreationstudio.com>
Thu, 20 Oct 2011 01:55:56 +0000
(18:55 -0700)
committer
Ned Konz
<ned@productcreationstudio.com>
Thu, 20 Oct 2011 01:55:56 +0000
(18:55 -0700)
flash/main.c
patch
|
blob
|
history
diff --git
a/flash/main.c
b/flash/main.c
index 0fd7232b9916d58c1bed823b48ed70e004afa289..a443f95f6bb58b59460e3231a5a650d637763d6c 100644
(file)
--- a/
flash/main.c
+++ b/
flash/main.c
@@
-17,6
+17,11
@@
struct opts
size_t size;
};
+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>");
+}
static int get_opts(struct opts* o, int ac, char** av)
{
@@
-75,6
+80,7
@@
int main(int ac, char** av)
if (get_opts(&o, ac - 1, av + 1) == -1)
{
printf("invalid command line\n");
+ usage();
goto on_error;
}