[\--tty \fItty-device\fP]
[\-D \fIaltos-device\fP]
[\--device \fIaltos-device\fP]
+[\--cal \fIradio-calibration\fP]
\fIfile.ihx\fP
\fIdevice serial number\fP
.SH DESCRIPTION
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
+\-c radio-calibration | --cal radio-calibration
+This programs the radio calibration value into the image for hardware
+which doesn't have any eeprom storage for this value. The value here
+can be computed given the current radio calibration value, the
+measured frequency and the desired frequency:
+.IP
+ cal' = cal * (desired/measured)
+.IP
+The default calibration value is 1186611.
.SH USAGE
.I ao-load
reads the specified .ihx file into memory, locates the matching .map
#include <unistd.h>
#include <getopt.h>
#include "ccdbg.h"
+#include "cc.h"
static const struct option options[] = {
{ .name = "tty", .has_arg = 1, .val = 'T' },
{ .name = "device", .has_arg = 1, .val = 'D' },
+ { .name = "run", .has_arg = 0, .val = 'r' },
{ 0, 0, 0, 0},
};
static void usage(char *program)
{
- fprintf(stderr, "usage: %s [--tty <tty-name>] [--device <device-name>] file.ihx\n", program);
+ fprintf(stderr, "usage: %s [--tty <tty-name>] [--device <device-name>] [--run] file.ihx\n", program);
exit(1);
}
char *tty = NULL;
char *device = NULL;
int c;
+ int run = 0;
while ((c = getopt_long(argc, argv, "T:D:", options, NULL)) != -1) {
switch (c) {
case 'D':
device = optarg;
break;
+ case 'r':
+ run = 1;
+ break;
default:
usage(argv[0]);
break;
ccdbg_close(dbg);
exit(1);
}
+ if (run) {
+ ccdbg_set_pc(dbg, image->address);
+ ccdbg_resume(dbg);
+ }
ccdbg_close(dbg);
exit (0);
}
ao_usb.c
TELE_COMMON_SRC = \
- ao_gps_print.c \
+ ao_dbg.c \
ao_packet.c \
ao_packet_slave.c \
ao_state.c
#
TELE_RECEIVER_SRC =\
ao_monitor.c \
+ ao_gps_print.c \
ao_packet_master.c \
ao_rssi.c
__xdata struct ao_task ao_gps_task;
-static void
-gps_dump(void) __reentrant
-{
- ao_mutex_get(&ao_gps_mutex);
- ao_gps_print(&ao_gps_data);
- putchar('\n');
- ao_gps_tracking_print(&ao_gps_tracking_data);
- putchar('\n');
- ao_mutex_put(&ao_gps_mutex);
-}
-
-__code struct ao_cmds ao_gps_cmds[] = {
- { 'g', gps_dump, "g Display current GPS values" },
- { 0, gps_dump, NULL },
-};
-
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
- ao_cmd_register(&ao_gps_cmds[0]);
}
__xdata struct ao_task ao_gps_task;
-static void
-gps_dump(void) __reentrant
-{
- ao_mutex_get(&ao_gps_mutex);
- ao_gps_print(&ao_gps_data);
- putchar('\n');
- ao_gps_tracking_print(&ao_gps_tracking_data);
- putchar('\n');
- ao_mutex_put(&ao_gps_mutex);
-}
-
-__code struct ao_cmds ao_gps_cmds[] = {
- { 'g', gps_dump, "g Display current GPS values" },
- { 0, gps_dump, NULL },
-};
-
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
- ao_cmd_register(&ao_gps_cmds[0]);
}