altos/stmf0, stm32f0: Call ao_boot_chain to start application
authorKeith Packard <keithp@keithp.com>
Mon, 3 Aug 2020 00:29:44 +0000 (17:29 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 3 Aug 2020 00:30:56 +0000 (17:30 -0700)
This used to be done inside ao_boot_check_chain or ao_boot_check_pin,
but it made more sense to have it done in _start instead. stm and lpc
were adjusted, but stmf0 and stm32f4 were missed.

This caused boards using this process to wedge in the boot loader.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm32f4/ao_interrupt.c
src/stmf0/ao_interrupt.c

index 24f56abc5e730f90d0288fe1704e30f96cd3ef4d..20577b14e4c3b8262b83795de1cf6985ee308c0e 100644 (file)
@@ -45,8 +45,11 @@ void start(void)
 #ifdef AO_BOOT_CHAIN
        if (ao_boot_check_chain()) {
 #ifdef AO_BOOT_PIN
-               ao_boot_check_pin();
+               if (ao_boot_check_pin())
 #endif
+               {
+                       ao_boot_chain(AO_BOOT_APPLICATION_BASE);
+               }
        }
 #endif
        /* Enable FPU */
index 3d7dc7a82c653e2eff6be3327b4edd252ae6ad88..3ef51dfa63fddbe78185e181ae8a1baf6b5d8977 100644 (file)
@@ -186,8 +186,11 @@ void _start(void)
 #if AO_BOOT_CHAIN
        if (ao_boot_check_chain()) {
 #if AO_BOOT_PIN
-               ao_boot_check_pin();
+               if (ao_boot_check_pin())
 #endif
+               {
+                       ao_boot_chain(AO_BOOT_APPLICATION_BASE);
+               }
        }
 #endif
        /* Turn on syscfg */