Even simpler jump to bootloader

anne_pro
Michiel Visser 2019-06-24 23:47:16 +02:00
parent 75082e8bae
commit 4e333e9ff6
2 changed files with 3 additions and 10 deletions

View File

@ -91,13 +91,3 @@ void keyboard_post_init_kb(void) {
matrix_init_user();
}
/* Instead of doing some magic to get to the bootloader, just press ESC and reset */
void bootloader_jump(void) {
/* Disable interrupts as changing the vector table can mess them up */
__disable_irq();
/* Move the vector table back to the bootloader */
SCB->VTOR = 0x08000000;
/* Reset the system into the bootloader */
NVIC_SystemReset();
}

View File

@ -32,6 +32,9 @@
#define BOARD_STM32L151_ANNE_PRO
#define BOARD_NAME "STM32L151 Anne Pro"
/* Address of the bootloader */
#define STM32_BOOTLOADER_ADDRESS 0x08000000
/*
* Board oscillators-related settings.
* NOTE: HSE not fitted.