This commit is contained in:
Your Name
2024-04-27 03:16:35 -05:00
parent 02a5a8d343
commit 820bf5fcfd
155 changed files with 145595 additions and 0 deletions

15
body/board/early_init.h Normal file
View File

@@ -0,0 +1,15 @@
// Early bringup
extern void *g_pfnVectors;
extern uint32_t enter_bootloader_mode;
void early_initialization(void) {
SystemInit();
// after it's been in the bootloader, things are initted differently, so we reset
if ((enter_bootloader_mode != BOOT_NORMAL) &&
(enter_bootloader_mode != ENTER_SOFTLOADER_MAGIC)) {
enter_bootloader_mode = BOOT_NORMAL;
NVIC_SystemReset();
}
// setup interrupt table
SCB->VTOR = (uint32_t)&g_pfnVectors; // TODO: check if SystemInit is enough!
}