From 3538955778c253e68779605cc67c27e15d195729 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 16 Jul 2019 03:11:59 +0100 Subject: Usbasploader bootloader option addition (#6304) * Added USBasp bootloader option for USBasploader * author comment * ifdef fix :) * Add usbasp target * Update docs/flashing.md Co-Authored-By: fauxpark * Update docs/flashing.md Co-Authored-By: fauxpark * Update docs/flashing.md Co-Authored-By: fauxpark --- bootloader.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index 4bcf183fb7..9d73063d0f 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -76,6 +76,10 @@ ifeq ($(strip $(BOOTLOADER)), bootloadHID) OPT_DEFS += -DBOOTLOADER_BOOTLOADHID BOOTLOADER_SIZE = 4096 endif +ifeq ($(strip $(BOOTLOADER)), USBasp) + OPT_DEFS += -DBOOTLOADER_USBASP + BOOTLOADER_SIZE = 4096 +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -- cgit v1.2.3 From 54503168c93b6322975e3144c929cffe6c74d36c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 18 Sep 2019 09:48:58 +1000 Subject: Update bootloader.mk (#6698) --- bootloader.mk | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index 9d73063d0f..d615533947 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -19,12 +19,14 @@ # # Sets the bootloader defined in the keyboard's/keymap's rules.mk # Current options: -# atmel-dfu -# lufa-dfu -# qmk-dfu -# halfkay -# caterina -# bootloadHID +# +# halfkay PJRC Teensy +# caterina Pro Micro (Sparkfun/generic) +# atmel-dfu Atmel factory DFU +# lufa-dfu LUFA DFU +# qmk-dfu QMK DFU (LUFA + blinkenlight) +# bootloadHID HIDBootFlash compatible (ATmega32A) +# USBasp USBaspLoader (ATmega328P) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -32,40 +34,40 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 4096 + ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + BOOTLOADER_SIZE = 4096 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 8192 + BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 512 + BOOTLOADER_SIZE = 512 endif ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 1024 + BOOTLOADER_SIZE = 1024 endif endif ifeq ($(strip $(BOOTLOADER)), caterina) -- cgit v1.2.3 From 559ef215638e82de75e3e9221baf4909990f4f53 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 30 Dec 2019 07:53:23 +1100 Subject: Add LUFA mass storage `BOOTLOADER` "support" (#7729) --- bootloader.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index d615533947..e516e9ff9f 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -82,6 +82,13 @@ ifeq ($(strip $(BOOTLOADER)), USBasp) OPT_DEFS += -DBOOTLOADER_USBASP BOOTLOADER_SIZE = 4096 endif +ifeq ($(strip $(BOOTLOADER)), lufa-ms) + # DO NOT USE THIS BOOTLOADER IN NEW PROJECTS! + # It is extremely prone to bricking, and is only included to support existing boards. + OPT_DEFS += -DBOOTLOADER_MS + BOOTLOADER_SIZE = 6144 + FIRMWARE_FORMAT = bin +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -- cgit v1.2.3 From e2d4cd1a41c667da186891e3dbaf535c6b0717df Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Aug 2020 12:28:20 +1000 Subject: Add Kiibohd bootloader type to bootloader.mk (#9908) --- bootloader.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index e516e9ff9f..c22291e435 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,6 +27,7 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -89,6 +90,18 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -- cgit v1.2.3 From 70ce4ba56f5d805e71c2b1de7334d6492b5e350a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 22 Aug 2020 08:42:28 +1000 Subject: Revert "Add Kiibohd bootloader type to bootloader.mk (#9908)" (#10126) This reverts commit e2d4cd1a41c667da186891e3dbaf535c6b0717df. --- bootloader.mk | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index c22291e435..e516e9ff9f 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,7 +27,6 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -90,18 +89,6 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif -ifeq ($(strip $(BOOTLOADER)), kiibohd) - OPT_DEFS += -DBOOTLOADER_KIIBOHD - ifeq ($(strip $(MCU)), MK20DX128) - MCU_LDSCRIPT = MK20DX128BLDR4 - endif - ifeq ($(strip $(MCU)), MK20DX256) - MCU_LDSCRIPT = MK20DX256BLDR8 - endif - - DFU_ARGS = -d 1C11:B007 - DFU_SUFFIX_ARGS = -v 1C11 -p B007 -endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -- cgit v1.2.3 From b89b2030af655132e2708cbdffd7fb1b8e1aaeb4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Aug 2020 18:58:00 +1000 Subject: Kiibohd bootloader, take 2 (#10129) --- bootloader.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index e516e9ff9f..d5f803f896 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,6 +27,7 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -89,7 +90,19 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif - ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) endif + +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU_ORIG)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU_ORIG)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif -- cgit v1.2.3 From 70fce6564fe691912387d09344efa1d1ce5b949e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 27 Sep 2020 20:33:03 +1000 Subject: Add logic for AT90USBxx7 where needed (#10203) --- bootloader.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index d5f803f896..a7e596e476 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -35,30 +35,30 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif -- cgit v1.2.3 From d46b8ef67c91f1794c35a1a91ff9fc7dcba6b009 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 13 Oct 2020 03:19:50 +1100 Subject: Add STM32Duino to bootloader selection (#10558) --- bootloader.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootloader.mk') 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 -- cgit v1.2.3 From b0dbe7365b56d181928e8fee06d03df6ba92ea62 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 15 Oct 2020 12:55:31 +1100 Subject: Fix STM32duino bootloader (#10648) --- bootloader.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index ab1ced0ea4..5487f9ece6 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -110,7 +110,7 @@ endif ifeq ($(strip $(BOOTLOADER)), stm32duino) OPT_DEFS += -DBOOTLOADER_STM32DUINO - MCU_LDSCRIPT ?= STM32F103x8_stm32duino_bootloader + 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 -- cgit v1.2.3 From eba512596a0e7845b9cf7efdad19b820e9974e00 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 20 Jan 2021 14:04:21 +1100 Subject: Add stm32-dfu and apm32-dfu to bootloader.mk (#11019) * Add stm32-dfu and apm32-dfu to bootloader.mk * Update flashing docs * Update comment * Further wordsmithing --- bootloader.mk | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index 5487f9ece6..8b4bc7a0fc 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -20,15 +20,19 @@ # Sets the bootloader defined in the keyboard's/keymap's rules.mk # Current options: # -# halfkay PJRC Teensy -# caterina Pro Micro (Sparkfun/generic) -# atmel-dfu Atmel factory DFU -# lufa-dfu LUFA DFU -# qmk-dfu QMK DFU (LUFA + blinkenlight) -# bootloadHID HIDBootFlash compatible (ATmega32A) -# USBasp USBaspLoader (ATmega328P) -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) -# stm32duino STM32Duino (STM32F103x8) +# AVR: +# halfkay PJRC Teensy +# caterina Pro Micro (Sparkfun/generic) +# atmel-dfu Atmel factory DFU +# lufa-dfu LUFA DFU +# qmk-dfu QMK DFU (LUFA + blinkenlight) +# bootloadHID HIDBootFlash compatible (ATmega32A) +# USBasp USBaspLoader (ATmega328P) +# ARM: +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) +# stm32duino STM32Duino (STM32F103x8) +# stm32-dfu STM32 USB DFU in ROM +# apm32-dfu APM32 USB DFU in ROM # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -95,6 +99,20 @@ ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) endif +ifeq ($(strip $(BOOTLOADER)), stm32-dfu) + OPT_DEFS += -DBOOTLOADER_STM32_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif +ifeq ($(strip $(BOOTLOADER)), apm32-dfu) + OPT_DEFS += -DBOOTLOADER_APM32_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 314B -p 0106 +endif ifeq ($(strip $(BOOTLOADER)), kiibohd) OPT_DEFS += -DBOOTLOADER_KIIBOHD ifeq ($(strip $(MCU_ORIG)), MK20DX128) @@ -104,10 +122,10 @@ ifeq ($(strip $(BOOTLOADER)), kiibohd) MCU_LDSCRIPT = MK20DX256BLDR8 endif + # Options to pass to dfu-util when flashing 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 @@ -115,6 +133,7 @@ ifeq ($(strip $(BOOTLOADER)), 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 + # Options to pass to dfu-util when flashing + DFU_ARGS = -d 1EAF:0003 -a 2 -R DFU_SUFFIX_ARGS = -v 1EAF -p 0003 endif -- cgit v1.2.3 From d92ffd1157e3ecc4ae2dbf8548c45c8b0269f664 Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Sat, 30 Jan 2021 03:53:56 +0000 Subject: Adds AT90USB162 support (#11570) * at90usb162 support * fix missing bracket * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- bootloader.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bootloader.mk') diff --git a/bootloader.mk b/bootloader.mk index 8b4bc7a0fc..fd76446e99 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -40,7 +40,7 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) @@ -50,7 +50,7 @@ endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) @@ -60,7 +60,7 @@ endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) -- cgit v1.2.3