diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-27 00:20:47 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-07 21:30:26 -0700 |
commit | 0b1797312b34ba2b8121f82605f8d2c419167737 (patch) | |
tree | 898efa8e7754e8cb498181b9fe9e7cc47ecde49a /src/stm/ao_interrupt.c | |
parent | e2412e867138635d79ea0fa8d43efc0a6aa19784 (diff) |
altos: Run self loader when application sets boot addr to 0
This causes the flash loader startup code to fall into the loader when
the application sets the boot address to zero.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_interrupt.c')
-rw-r--r-- | src/stm/ao_interrupt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stm/ao_interrupt.c b/src/stm/ao_interrupt.c index 49156285..969e6a0f 100644 --- a/src/stm/ao_interrupt.c +++ b/src/stm/ao_interrupt.c @@ -42,10 +42,11 @@ const void *stm_interrupt_vector[]; void start(void) { #ifdef AO_BOOT_CHAIN - ao_boot_check_chain(); -#endif + if (ao_boot_check_chain()) { #ifdef AO_BOOT_PIN - ao_boot_check_pin(); + ao_boot_check_pin(); +#endif + } #endif /* Set interrupt vector table offset */ stm_nvic.vto = (uint32_t) &stm_interrupt_vector; |