X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstmf0%2Fao_arch.h;h=1450545a10c015d9d33fd2c75f95d5f68eb57f07;hb=470be148d9a9dcd45609942d17fcf7c1555375f3;hp=d70a9110e91fa02ac481ced1e928fa1868b0ca6d;hpb=6fec7b5affd223c18bad78377d7655af958dffc2;p=fw%2Faltos diff --git a/src/stmf0/ao_arch.h b/src/stmf0/ao_arch.h index d70a9110..1450545a 100644 --- a/src/stmf0/ao_arch.h +++ b/src/stmf0/ao_arch.h @@ -41,9 +41,11 @@ #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") @@ -53,7 +55,8 @@ * 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;