diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-22 20:35:57 -0500 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-07 21:30:26 -0700 |
commit | dfc268e0021e1cd3045f73339a749d292a6a6300 (patch) | |
tree | 3736895bb7debeff7a6363ce263b085d6ec4b531 /src/core/ao_cmd.c | |
parent | 8ded61d59888c79ef1f94e664b5fb770841a801a (diff) |
altos: Use flash loader on all STM products
Includes the boot chain stuff
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_cmd.c')
-rw-r--r-- | src/core/ao_cmd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/ao_cmd.c b/src/core/ao_cmd.c index 7da2384f..188b8bb4 100644 --- a/src/core/ao_cmd.c +++ b/src/core/ao_cmd.c @@ -385,6 +385,18 @@ ao_cmd(void) } } +#if HAS_BOOT_LOADER + +#include <ao_boot.h> + +static void +ao_loader(void) +{ + flush(); + ao_boot_loader(); +} +#endif + __xdata struct ao_task ao_cmd_task; __code struct ao_cmds ao_base_cmds[] = { @@ -397,6 +409,9 @@ __code struct ao_cmds ao_base_cmds[] = { #if HAS_VERSION { version, "v\0Version" }, #endif +#if HAS_BOOT_LOADER + { ao_loader, "X\0Switch to boot loader" }, +#endif { 0, NULL }, }; |