summaryrefslogtreecommitdiff
path: root/ao-tools/ao-rawload
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-02-25 16:40:13 -0800
committerKeith Packard <keithp@keithp.com>2010-02-25 16:40:13 -0800
commit5d7a3a5fbc0af4621c67a6fd51a9c9d5ae688fa5 (patch)
tree753e553247421c90344e80aa927baabf3ae9e951 /ao-tools/ao-rawload
parent1e60deca147c85a064719dfad14ccabd1049bbbd (diff)
Fix and document the ao-rawload --run flag
This allows ram-based programs to be loaded and executed easily. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-rawload')
-rw-r--r--ao-tools/ao-rawload/ao-rawload.19
-rw-r--r--ao-tools/ao-rawload/ao-rawload.c4
2 files changed, 9 insertions, 4 deletions
diff --git a/ao-tools/ao-rawload/ao-rawload.1 b/ao-tools/ao-rawload/ao-rawload.1
index 6b6a6e2c..30d0467d 100644
--- a/ao-tools/ao-rawload/ao-rawload.1
+++ b/ao-tools/ao-rawload/ao-rawload.1
@@ -29,7 +29,7 @@ ao-rawload \- flash a program to a AltOS device
.SH DESCRIPTION
.I ao-rawload
loads the specified .ihx file, without modification, into the target
-device flash memory.
+device flash or ram (depending on the base address of the .ihx file).
.SH OPTIONS
.TP
\-T tty-device | --tty tty-device
@@ -51,10 +51,15 @@ TeleMetrum
Leaving out the product name will cause the tool to select a suitable
product, leaving out the serial number will cause the tool to match
one of the available devices.
+.TP
+\-r | --run
+After the file has been loaded, set the PC to the base address of the
+image and resume execution there.
+the .ihx file.
.SH USAGE
.I ao-rawload
reads the specified .ihx file into memory. It then connects to the
specified target device and writes the program to the target device
-flash memory.
+memory and, optionally, starts the program executing.
.SH AUTHOR
Keith Packard
diff --git a/ao-tools/ao-rawload/ao-rawload.c b/ao-tools/ao-rawload/ao-rawload.c
index 0098b658..a4746b19 100644
--- a/ao-tools/ao-rawload/ao-rawload.c
+++ b/ao-tools/ao-rawload/ao-rawload.c
@@ -49,7 +49,7 @@ main (int argc, char **argv)
int c;
int run = 0;
- while ((c = getopt_long(argc, argv, "T:D:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "rT:D:", options, NULL)) != -1) {
switch (c) {
case 'T':
tty = optarg;
@@ -67,7 +67,7 @@ main (int argc, char **argv)
}
filename = argv[optind];
if (filename == NULL) {
- fprintf(stderr, "usage: %s <filename.ihx>\n", argv[0]);
+ usage(argv[0]);
exit(1);
}
file = fopen(filename, "r");