From 4e333e9ff6706608ede9d702dd047183d951eda7 Mon Sep 17 00:00:00 2001 From: Michiel Visser Date: Mon, 24 Jun 2019 23:47:16 +0200 Subject: [PATCH] Even simpler jump to bootloader --- keyboards/anne_pro/anne_pro.c | 10 ---------- keyboards/anne_pro/boards/STM32L151_ANNE_PRO/board.h | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/keyboards/anne_pro/anne_pro.c b/keyboards/anne_pro/anne_pro.c index 1881907ef0..daa6fcba25 100644 --- a/keyboards/anne_pro/anne_pro.c +++ b/keyboards/anne_pro/anne_pro.c @@ -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(); -} diff --git a/keyboards/anne_pro/boards/STM32L151_ANNE_PRO/board.h b/keyboards/anne_pro/boards/STM32L151_ANNE_PRO/board.h index 3115120998..d15eab57ad 100644 --- a/keyboards/anne_pro/boards/STM32L151_ANNE_PRO/board.h +++ b/keyboards/anne_pro/boards/STM32L151_ANNE_PRO/board.h @@ -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.