aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/bootloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/chibios/bootloader.c')
-rw-r--r--tmk_core/common/chibios/bootloader.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c
index 6cabcc4b8..11f7abf43 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/tmk_core/common/chibios/bootloader.c
@@ -13,7 +13,23 @@
13# define STM32_BOOTLOADER_DUAL_BANK FALSE 13# define STM32_BOOTLOADER_DUAL_BANK FALSE
14#endif 14#endif
15 15
16#if STM32_BOOTLOADER_DUAL_BANK 16#ifdef BOOTLOADER_TINYUF2
17
18# define DBL_TAP_MAGIC 0xf01669ef // From tinyuf2's board_api.h
19
20// defined by linker script
21extern uint32_t _board_dfu_dbl_tap[];
22# define DBL_TAP_REG _board_dfu_dbl_tap[0]
23
24void bootloader_jump(void) {
25 DBL_TAP_REG = DBL_TAP_MAGIC;
26 NVIC_SystemReset();
27}
28
29void enter_bootloader_mode_if_requested(void) { /* not needed, no two-stage reset */
30}
31
32#elif STM32_BOOTLOADER_DUAL_BANK
17 33
18// Need pin definitions 34// Need pin definitions
19# include "config_common.h" 35# include "config_common.h"
@@ -79,7 +95,7 @@ void enter_bootloader_mode_if_requested(void) {
79 } 95 }
80} 96}
81 97
82#elif defined(KL2x) || defined(K20x) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS 98#elif defined(KL2x) || defined(K20x) || defined(MK66F18) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS
83/* Kinetis */ 99/* Kinetis */
84 100
85# if defined(BOOTLOADER_KIIBOHD) 101# if defined(BOOTLOADER_KIIBOHD)