From d46b8ef67c91f1794c35a1a91ff9fc7dcba6b009 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 13 Oct 2020 03:19:50 +1100 Subject: [PATCH] Add STM32Duino to bootloader selection (#10558) --- bootloader.mk | 12 ++++++++++++ keyboards/cannonkeys/ortho48/bootloader_defs.h | 10 ---------- keyboards/cannonkeys/ortho48/rules.mk | 8 ++------ keyboards/cannonkeys/ortho60/bootloader_defs.h | 10 ---------- keyboards/cannonkeys/ortho60/rules.mk | 8 ++------ keyboards/cannonkeys/ortho75/bootloader_defs.h | 10 ---------- keyboards/cannonkeys/ortho75/rules.mk | 8 ++------ keyboards/cannonkeys/practice60/bootloader_defs.h | 10 ---------- keyboards/cannonkeys/practice60/rules.mk | 8 ++------ keyboards/cannonkeys/practice65/bootloader_defs.h | 10 ---------- keyboards/cannonkeys/practice65/rules.mk | 8 ++------ .../converter/siemens_tastatur/bootloader_defs.h | 10 ---------- keyboards/converter/siemens_tastatur/rules.mk | 8 ++------ .../handwired/onekey/bluepill/bootloader_defs.h | 10 ---------- keyboards/handwired/onekey/bluepill/rules.mk | 9 ++------- keyboards/handwired/t111/rules.mk | 9 ++------- keyboards/handwired/z150/rules.mk | 9 ++------- keyboards/wolfmarkclub/wm1/bootloader_defs.h | 11 ----------- keyboards/wolfmarkclub/wm1/rules.mk | 6 ++++-- keyboards/zvecr/split_blackpill/rules.mk | 9 ++------- 20 files changed, 36 insertions(+), 147 deletions(-) delete mode 100644 keyboards/cannonkeys/ortho48/bootloader_defs.h delete mode 100644 keyboards/cannonkeys/ortho60/bootloader_defs.h delete mode 100644 keyboards/cannonkeys/ortho75/bootloader_defs.h delete mode 100644 keyboards/cannonkeys/practice60/bootloader_defs.h delete mode 100644 keyboards/cannonkeys/practice65/bootloader_defs.h delete mode 100644 keyboards/converter/siemens_tastatur/bootloader_defs.h delete mode 100644 keyboards/handwired/onekey/bluepill/bootloader_defs.h delete mode 100644 keyboards/wolfmarkclub/wm1/bootloader_defs.h diff --git a/bootloader.mk b/bootloader.mk index a7e596e476..ab1ced0ea4 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -28,6 +28,7 @@ # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) # kiibohd Input:Club Kiibohd bootloader (only used on their boards) +# stm32duino STM32Duino (STM32F103x8) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -106,3 +107,14 @@ ifeq ($(strip $(BOOTLOADER)), kiibohd) DFU_ARGS = -d 1C11:B007 DFU_SUFFIX_ARGS = -v 1C11 -p B007 endif + +ifeq ($(strip $(BOOTLOADER)), stm32duino) + OPT_DEFS += -DBOOTLOADER_STM32DUINO + MCU_LDSCRIPT ?= STM32F103x8_stm32duino_bootloader + BOARD = STM32_F103_STM32DUINO + # STM32F103 does NOT have an USB bootloader in ROM (only serial), so setting anything here does not make much sense + STM32_BOOTLOADER_ADDRESS = 0x80000000 + + DFU_ARGS = -d 1EAF:0003 -a2 -R + DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +endif diff --git a/keyboards/cannonkeys/ortho48/bootloader_defs.h b/keyboards/cannonkeys/ortho48/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/cannonkeys/ortho48/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 5e18d91ca4..6e468c49a3 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/keyboards/cannonkeys/ortho60/bootloader_defs.h b/keyboards/cannonkeys/ortho60/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/cannonkeys/ortho60/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index 80b31a12f4..ea9bd6b2df 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/keyboards/cannonkeys/ortho75/bootloader_defs.h b/keyboards/cannonkeys/ortho75/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/cannonkeys/ortho75/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index ae196fd850..e132ccaf18 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/keyboards/cannonkeys/practice60/bootloader_defs.h b/keyboards/cannonkeys/practice60/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/cannonkeys/practice60/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 3713b6078d..3f9ca1448f 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/keyboards/cannonkeys/practice65/bootloader_defs.h b/keyboards/cannonkeys/practice65/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/cannonkeys/practice65/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index 5fd4892dc5..344844b0ef 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/keyboards/converter/siemens_tastatur/bootloader_defs.h b/keyboards/converter/siemens_tastatur/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/converter/siemens_tastatur/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index 03e6b0f49d..451d07e676 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino SRC = matrix.c diff --git a/keyboards/handwired/onekey/bluepill/bootloader_defs.h b/keyboards/handwired/onekey/bluepill/bootloader_defs.h deleted file mode 100644 index 6b8fa9f727..0000000000 --- a/keyboards/handwired/onekey/bluepill/bootloader_defs.h +++ /dev/null @@ -1,10 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103* does NOT have an USB bootloader in ROM (only serial), -// so setting anything here does not make much sense -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 66ce517445..019b1130d9 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,13 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 - +# Bootloader selection +BOOTLOADER = stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/t111/rules.mk b/keyboards/handwired/t111/rules.mk index e6776a643c..1c391242ba 100644 --- a/keyboards/handwired/t111/rules.mk +++ b/keyboards/handwired/t111/rules.mk @@ -1,12 +1,7 @@ MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO -STM32_BOOTLOADER_ADDRESS = 0x80000000 - -DFU_ARGS = -d 1EAF:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk index fd1d382033..d86e9f6e46 100644 --- a/keyboards/handwired/z150/rules.mk +++ b/keyboards/handwired/z150/rules.mk @@ -1,12 +1,7 @@ MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO -STM32_BOOTLOADER_ADDRESS = 0x80000000 - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/wolfmarkclub/wm1/bootloader_defs.h b/keyboards/wolfmarkclub/wm1/bootloader_defs.h deleted file mode 100644 index 393d70fdc6..0000000000 --- a/keyboards/wolfmarkclub/wm1/bootloader_defs.h +++ /dev/null @@ -1,11 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ - -// STM32F103 does not have a USB bootloader in ROM -- the WM1 -// has a usermode USB mass storage device bootloader at the normal -// boot address -- `0x08000000`. -#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/wolfmarkclub/wm1/rules.mk b/keyboards/wolfmarkclub/wm1/rules.mk index fcd4da1aff..9394bbd716 100644 --- a/keyboards/wolfmarkclub/wm1/rules.mk +++ b/keyboards/wolfmarkclub/wm1/rules.mk @@ -1,11 +1,13 @@ # MCU name MCU = STM32F103 +# Bootloader selection +BOOTLOADER = stm32duino + # GENERIC STM32F103C8T6 board - mass storage bootloader MCU_LDSCRIPT = wm1_f103 -BOARD = STM32_F103_STM32DUINO -PROGRAM_CMD=echo 'CLI flashing not supported' >&2 +PROGRAM_CMD = echo 'CLI flashing not supported' >&2 # Build Options # change yes to no to disable diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index 6feec7dd97..55bca894ef 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -1,13 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO -STM32_BOOTLOADER_ADDRESS = 0x80000000 - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # Build Options # change yes to no to disable