aboutsummaryrefslogtreecommitdiff
path: root/bootloader.mk
diff options
context:
space:
mode:
authorWilliam Chang <[email protected]>2019-11-20 22:17:07 -0800
committerWilliam Chang <[email protected]>2019-11-20 22:17:07 -0800
commite7f4d56592b3975c38af329e77b4efd9108495e8 (patch)
tree0a416bccbf70bfdbdb9ffcdb3bf136b47378c014 /bootloader.mk
parent71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (diff)
parent8416a94ad27b3ff058576f09f35f0704a8b39ff3 (diff)
downloadqmk_firmware-e7f4d56592b3975c38af329e77b4efd9108495e8.tar.gz
qmk_firmware-e7f4d56592b3975c38af329e77b4efd9108495e8.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'bootloader.mk')
-rw-r--r--bootloader.mk40
1 files changed, 23 insertions, 17 deletions
diff --git a/bootloader.mk b/bootloader.mk
index 4bcf183fb7..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)
@@ -76,6 +78,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))