#define __interrupt(n)
#define __at(n)
-#define ao_arch_reboot() \
- (stm_scb.aircr = ((STM_SCB_AIRCR_VECTKEY_KEY << STM_SCB_AIRCR_VECTKEY) | \
- (1 << STM_SCB_AIRCR_SYSRESETREQ)))
+static inline void ao_arch_reboot(void) {
+ stm_flash.cr = (1 << STM_FLASH_CR_OBL_LAUNCH);
+ stm_scb.aircr = ((STM_SCB_AIRCR_VECTKEY_KEY << STM_SCB_AIRCR_VECTKEY) |
+ (1 << STM_SCB_AIRCR_SYSRESETREQ));
+}
#define ao_arch_nop() asm("nop")
* ao_romconfig.c
*/
-#define AO_ROMCONFIG_SYMBOL __attribute__((section(".romconfig"))) const
+#define AO_ROMCONFIG_SYMBOL __attribute__((section(".init.1"))) const
+#define AO_USBCONFIG_SYMBOL __attribute__((section(".init.2"))) const
extern const uint16_t ao_romconfig_version;
extern const uint16_t ao_romconfig_check;