summaryrefslogtreecommitdiff
path: root/src/stm-flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm-flash')
-rw-r--r--src/stm-flash/Makefile2
-rw-r--r--src/stm-flash/ao_pins.h5
-rw-r--r--src/stm-flash/ao_stm_flash.c8
3 files changed, 13 insertions, 2 deletions
diff --git a/src/stm-flash/Makefile b/src/stm-flash/Makefile
index 3c7b4966..e4a2f321 100644
--- a/src/stm-flash/Makefile
+++ b/src/stm-flash/Makefile
@@ -17,6 +17,8 @@ INC = \
#
ALTOS_SRC = \
ao_interrupt.c \
+ ao_boot_chain.c \
+ ao_boot_pin.c \
ao_product.c \
ao_romconfig.c \
ao_task.c \
diff --git a/src/stm-flash/ao_pins.h b/src/stm-flash/ao_pins.h
index ca53d844..382ef353 100644
--- a/src/stm-flash/ao_pins.h
+++ b/src/stm-flash/ao_pins.h
@@ -65,10 +65,13 @@
#define HAS_TASK_INFO 0
#define HAS_VERSION 0
+#define AO_BOOT_CHAIN 1
+#define AO_BOOT_PIN 1
+
#define AO_BOOT_APPLICATION_GPIO stm_gpioa
#define AO_BOOT_APPLICATION_PIN 0
#define AO_BOOT_APPLICATION_VALUE 1
#define AO_BOOT_APPLICATION_MODE 0
-#define AO_BOOT_APPLICATION_BASE 0x2000
+#define AO_BOOT_APPLICATION_BASE ((uint32_t *) 0x2000)
#endif /* _AO_PINS_H_ */
diff --git a/src/stm-flash/ao_stm_flash.c b/src/stm-flash/ao_stm_flash.c
index 16dd1189..968da9f1 100644
--- a/src/stm-flash/ao_stm_flash.c
+++ b/src/stm-flash/ao_stm_flash.c
@@ -25,8 +25,14 @@ ao_panic(uint8_t reason)
for (;;);
}
+void
+ao_application(void)
+{
+ ao_boot_reboot(AO_BOOT_APPLICATION_BASE);
+}
+
__code struct ao_cmds ao_flash_cmds[] = {
- { ao_reboot_application, "A\0Switch to application" },
+ { ao_application, "A\0Switch to application" },
{ 0, NULL },
};