summaryrefslogtreecommitdiff
path: root/keyboards/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/matrix')
-rw-r--r--keyboards/matrix/abelx/abelx.c5
-rw-r--r--keyboards/matrix/abelx/boards/abelx_bd/board.c3
-rw-r--r--keyboards/matrix/abelx/bootloader_defs.h7
-rw-r--r--keyboards/matrix/abelx/rules.mk12
-rw-r--r--keyboards/matrix/m12og/rev1/rev1.c5
-rw-r--r--keyboards/matrix/m12og/rev1/rules.mk3
-rw-r--r--keyboards/matrix/m20add/bootloader_defs.h5
-rw-r--r--keyboards/matrix/m20add/m20add.c24
-rw-r--r--keyboards/matrix/m20add/rules.mk3
-rw-r--r--keyboards/matrix/noah/bootloader_defs.h5
-rw-r--r--keyboards/matrix/noah/noah.c5
-rw-r--r--keyboards/matrix/noah/rules.mk3
12 files changed, 32 insertions, 48 deletions
diff --git a/keyboards/matrix/abelx/abelx.c b/keyboards/matrix/abelx/abelx.c
index 77e749ee40..9585948e0c 100644
--- a/keyboards/matrix/abelx/abelx.c
+++ b/keyboards/matrix/abelx/abelx.c
@@ -97,3 +97,8 @@ void shutdown_user(void)
// set the magic number for resetting to the bootloader
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
}
+
+void bootloader_jump(void) {
+ shutdown_user();
+ NVIC_SystemReset();
+}
diff --git a/keyboards/matrix/abelx/boards/abelx_bd/board.c b/keyboards/matrix/abelx/boards/abelx_bd/board.c
index 68cf23cddc..db40a8e37b 100644
--- a/keyboards/matrix/abelx/boards/abelx_bd/board.c
+++ b/keyboards/matrix/abelx/boards/abelx_bd/board.c
@@ -208,9 +208,6 @@ static void stm32_gpio_init(void) {
* else.
*/
void __early_init(void) {
- extern void enter_bootloader_mode_if_requested(void);
- enter_bootloader_mode_if_requested();
-
stm32_gpio_init();
stm32_clock_init();
}
diff --git a/keyboards/matrix/abelx/bootloader_defs.h b/keyboards/matrix/abelx/bootloader_defs.h
deleted file mode 100644
index 20b8f73e6f..0000000000
--- a/keyboards/matrix/abelx/bootloader_defs.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Address for jumping to bootloader on STM32 chips. */
-/* It is chip dependent, the correct number can be looked up here:
- * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
- * This also requires a patch to chibios:
- * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
- */
-#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
diff --git a/keyboards/matrix/abelx/rules.mk b/keyboards/matrix/abelx/rules.mk
index 98b6cfa65e..7a5d01e5cb 100644
--- a/keyboards/matrix/abelx/rules.mk
+++ b/keyboards/matrix/abelx/rules.mk
@@ -25,18 +25,13 @@ ARMV = 7
USE_FPU = yes
-# Vector table for application
-# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
-OPT_DEFS =
-
-# Options to pass to dfu-util when flashing
-#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
-#DFU_SUFFIX_ARGS = -p DF11 -v 0483
+# Bootloader selection
+BOOTLOADER = custom
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
@@ -44,7 +39,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in
diff --git a/keyboards/matrix/m12og/rev1/rev1.c b/keyboards/matrix/m12og/rev1/rev1.c
index e3277bee27..53183c7d2d 100644
--- a/keyboards/matrix/m12og/rev1/rev1.c
+++ b/keyboards/matrix/m12og/rev1/rev1.c
@@ -20,6 +20,11 @@ void board_init(void) {
writePinLow(A8);
}
+void bootloader_jump(void) {
+ // This board doesn't use the standard DFU bootloader, and no information is available regarding how to enter bootloader mode. All we can do here is reset.
+ NVIC_SystemReset();
+}
+
void keyboard_post_init_kb(void) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(5, 255, 255);
diff --git a/keyboards/matrix/m12og/rev1/rules.mk b/keyboards/matrix/m12og/rev1/rules.mk
index 0e0584b8c9..d9733e8c5e 100644
--- a/keyboards/matrix/m12og/rev1/rules.mk
+++ b/keyboards/matrix/m12og/rev1/rules.mk
@@ -5,6 +5,9 @@ MCU_LDSCRIPT = m12og_v1
BOARD = m12og_v1
+# Bootloader selection
+BOOTLOADER = custom
+
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/matrix/m20add/bootloader_defs.h b/keyboards/matrix/m20add/bootloader_defs.h
deleted file mode 100644
index 4da3d39a32..0000000000
--- a/keyboards/matrix/m20add/bootloader_defs.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Address for jumping to bootloader on STM32 chips. */
-/* It is chip dependent, the correct number can be looked up here:
- * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
- */
-#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c
index 21f4f9b1ba..cdcafb9779 100644
--- a/keyboards/matrix/m20add/m20add.c
+++ b/keyboards/matrix/m20add/m20add.c
@@ -53,28 +53,14 @@ bool led_update_kb(led_t led_state) {
return res;
}
-// override the default implementation to avoid re-initialization
-void i2c_init(void)
-{
- static bool initialized = false;
- if (initialized) {
- return;
- } else {
- initialized = true;
- }
-
- // Try releasing special pins for a short time
- palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT);
- palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT);
-
- chThdSleepMilliseconds(10);
- palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
- palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
-}
-
#define REBOOT_MAGIC 0x41544B42
void shutdown_user(void)
{
// set the magic number for resetting to the bootloader
*(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
}
+
+void bootloader_jump(void) {
+ shutdown_user();
+ NVIC_SystemReset();
+}
diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk
index 1ecbd9d308..86bd6b9371 100644
--- a/keyboards/matrix/m20add/rules.mk
+++ b/keyboards/matrix/m20add/rules.mk
@@ -10,6 +10,9 @@ MCU_LDSCRIPT = m20add_boot
# or <this_dir>/boards
BOARD = ST_NUCLEO64_F411RE
+# Bootloader selection
+BOOTLOADER = custom
+
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/matrix/noah/bootloader_defs.h b/keyboards/matrix/noah/bootloader_defs.h
deleted file mode 100644
index 4da3d39a32..0000000000
--- a/keyboards/matrix/noah/bootloader_defs.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Address for jumping to bootloader on STM32 chips. */
-/* It is chip dependent, the correct number can be looked up here:
- * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
- */
-#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c
index 2143dee3be..89c25707af 100644
--- a/keyboards/matrix/noah/noah.c
+++ b/keyboards/matrix/noah/noah.c
@@ -4,6 +4,11 @@
#include "noah.h"
+void bootloader_jump(void) {
+ // This board doesn't use the standard DFU bootloader, and no information is available regarding how to enter bootloader mode. All we can do here is reset.
+ NVIC_SystemReset();
+}
+
#ifdef RGBLIGHT_ENABLE
#include <string.h>
#include "rgblight.h"
diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk
index b9f642e8cd..7971d628d6 100644
--- a/keyboards/matrix/noah/rules.mk
+++ b/keyboards/matrix/noah/rules.mk
@@ -10,6 +10,9 @@ MCU_LDSCRIPT = noah_boot
# or <this_dir>/boards
BOARD = ST_NUCLEO64_F411RE
+# Bootloader selection
+BOOTLOADER = custom
+
# Build Options
# change yes to no to disable
#