From 240745dc05783c612e92bab153da5c46e037d675 Mon Sep 17 00:00:00 2001 From: bwisn Date: Sun, 6 Mar 2022 11:16:33 +0100 Subject: [PATCH] update bootloader --- keyboards/annepro2/annepro2.c | 24 ------------------------ keyboards/annepro2/c15/rules.mk | 2 ++ keyboards/annepro2/c18/rules.mk | 2 ++ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c index 37489defff34..a24d0106562e 100644 --- a/keyboards/annepro2/annepro2.c +++ b/keyboards/annepro2/annepro2.c @@ -21,9 +21,6 @@ #include "ap2_led.h" #include "protocol.h" -#define RAM_MAGIC_LOCATION 0x20001ffc -#define IAP_MAGIC_VALUE 0x0000fab2 - static const SerialConfig ledUartInitConfig = { .speed = 115200, }; @@ -44,27 +41,6 @@ static uint8_t ledMcuWakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7 ble_capslock_t BLECapsLock = {._dummy = {0}, .caps_lock = false}; -void bootloader_jump(void) { - // Send msg to shine to boot into IAP - annepro2SetIAP(); - - // wait for shine to boot into IAP - wait_ms(15); - - // Load ble into IAP - annepro2_ble_bootload(); - wait_ms(15); - - // Magic key to set keyboard to IAP - // It’s from reversing original boot loader - // If value is that it stays in boot loader aka IAP - *((uint32_t *)RAM_MAGIC_LOCATION) = IAP_MAGIC_VALUE; - - // Load the main MCU into IAP - __disable_irq(); - NVIC_SystemReset(); -} - void keyboard_pre_init_kb(void) { // Start LED UART sdStart(&SD0, &ledUartInitConfig); diff --git a/keyboards/annepro2/c15/rules.mk b/keyboards/annepro2/c15/rules.mk index ea4d1b441220..95002f487741 100644 --- a/keyboards/annepro2/c15/rules.mk +++ b/keyboards/annepro2/c15/rules.mk @@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx BOARD = ANNEPRO2_C15 +BOOTLOADER=annepro2 + # Options # Keys diff --git a/keyboards/annepro2/c18/rules.mk b/keyboards/annepro2/c18/rules.mk index 3858c7f46a47..4dffd055b596 100644 --- a/keyboards/annepro2/c18/rules.mk +++ b/keyboards/annepro2/c18/rules.mk @@ -16,6 +16,8 @@ MCU_STARTUP = ht32f523xx BOARD = ANNEPRO2_C18 +BOOTLOADER=annepro2 + # Options # Keys