diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-27 00:20:47 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-04-27 00:20:47 -0700 |
commit | 411bfefa17ac4f7e7708667d4daf9454fb9a82d8 (patch) | |
tree | 75882d60f926d0c143ee101a0294bcc5996a01e5 /src/stm/ao_interrupt.c | |
parent | 3034bd83add91656ed903d9dd100494fb69dcf12 (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; |