summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenna Fox <a@creativepony.com>2012-10-02 15:00:47 +1000
committerJenna Fox <a@creativepony.com>2012-10-02 15:00:47 +1000
commit22921f350f088d3c5001ac3c8b9a503b4ed51aef (patch)
tree51657cd2f7ba67523a79a2bd83603600536f71f7
parent3e75a53ba6991af1499f8355d97ac4da33e642a0 (diff)
downloadmicronucleus-22921f350f088d3c5001ac3c8b9a503b4ed51aef.tar.gz
micronucleus-22921f350f088d3c5001ac3c8b9a503b4ed51aef.tar.bz2
micronucleus-22921f350f088d3c5001ac3c8b9a503b4ed51aef.zip
Improved usage printout on CLI tool
-rw-r--r--commandline/examples/micronucleus.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/commandline/examples/micronucleus.c b/commandline/examples/micronucleus.c
index 8bca517..8349845 100644
--- a/commandline/examples/micronucleus.c
+++ b/commandline/examples/micronucleus.c
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
int run = 0;
int file_type = FILE_TYPE_INTEL_HEX;
int arg_pointer = 1;
- char* usage = "usage: micronucleus [--run] [--dump-progress] [--type intel-hex|raw] [<intel-hexfile>|-]";
+ char* usage = "usage: micronucleus [--run] [--dump-progress] [--type intel-hex|raw] filename";
progress_step = 0;
progress_total_steps = 5; // steps: waiting, connecting, parsing, erasing, writing, (running)?
dump_progress = 0;
@@ -85,6 +85,15 @@ int main(int argc, char **argv) {
}
} else if (strcmp(argv[arg_pointer], "--help") == 0 || strcmp(argv[arg_pointer], "-h") == 0) {
puts(usage);
+ puts("");
+ puts(" --type [intel-hex, raw]: Set upload file type to either intel hex or raw");
+ puts(" bytes (intel hex is default)");
+ puts(" --dump-progress: Output progress data in computer-friendly form");
+ puts(" for driving GUIs");
+ puts(" --run: Ask bootloader to run the program when finished");
+ puts(" uploading provided program");
+ puts(" filename: Path to intel hex or raw data file to upload,");
+ puts(" or \"-\" to read from stdin");
return EXIT_SUCCESS;
} else if (strcmp(argv[arg_pointer], "--dump-progress") == 0) {
dump_progress = 1;