summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-11-27 23:08:21 -0500
committerGitHub <noreply@github.com>2017-11-27 23:08:21 -0500
commit9fdc27626097ae03b767a09427efc90475d90955 (patch)
treea555c38f1b714af6e2c2c96187552757d08224b9 /keyboards
parent9113f3387a670373919fe62899b0ab27e9d89eba (diff)
Updates bootloader settings, adds file size check (#2029)
* pull fuse settings for bootloader jump * fix 32a chips * make automatic bootloader selection optional * quantify bootloaders * fixs #164, speeds up dfu reset * fix for chips w/o usb * missing an n * fix bootloader sizes, use words for addresses * fix bmini, pearl, and [[ issue, make things quiet * ignore avr errors on arm for now * update settings for the light * document bootloader stuff * add bootloader title
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/atreus/rules.mk21
-rw-r--r--keyboards/atreus62/config.h2
-rw-r--r--keyboards/atreus62/rules.mk15
-rw-r--r--keyboards/bfake/config.h1
-rw-r--r--keyboards/bfake/rules.mk7
-rw-r--r--keyboards/bmini/config.h1
-rw-r--r--keyboards/bmini/rules.mk7
-rw-r--r--keyboards/chimera_ortho/rules.mk17
-rw-r--r--keyboards/converter/usb_usb/ble/rules.mk1
-rw-r--r--keyboards/converter/usb_usb/rules.mk16
-rw-r--r--keyboards/deltasplit75/rules.mk15
-rw-r--r--keyboards/deltasplit75/v2/config.h2
-rw-r--r--keyboards/dichotemy/rules.mk19
-rw-r--r--keyboards/eco/config.h2
-rw-r--r--keyboards/eco/rules.mk15
-rw-r--r--keyboards/ergodox_ez/rules.mk15
-rw-r--r--keyboards/gherkin/keymaps/mjt/config.h2
-rw-r--r--keyboards/gherkin/rules.mk11
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/rules.mk14
-rwxr-xr-xkeyboards/handwired/reddot/rules.mk19
-rw-r--r--keyboards/handwired/space_oddity/config.h2
-rw-r--r--keyboards/handwired/space_oddity/rules.mk11
-rw-r--r--keyboards/handwired/traveller/rules.mk10
-rw-r--r--keyboards/handwired/woodpad/config.h2
-rw-r--r--keyboards/handwired/woodpad/rules.mk15
-rw-r--r--keyboards/iris/rev1/config.h2
-rw-r--r--keyboards/iris/rev2/config.h2
-rw-r--r--keyboards/iris/rules.mk15
-rw-r--r--keyboards/jj40/config.h1
-rwxr-xr-xkeyboards/jj40/program74
-rw-r--r--keyboards/jj40/rules.mk9
-rw-r--r--keyboards/lets_split/rev1/config.h3
-rw-r--r--keyboards/lets_split/rev2/config.h2
-rw-r--r--keyboards/lets_split/rules.mk15
-rw-r--r--keyboards/lets_split/sockets/config.h2
-rw-r--r--keyboards/levinson/rev1/config.h2
-rw-r--r--keyboards/levinson/rev2/config.h3
-rw-r--r--keyboards/levinson/rules.mk15
-rw-r--r--keyboards/mechmini/config.h1
-rw-r--r--keyboards/mechmini/rules.mk7
-rw-r--r--keyboards/minidox/rev1/config.h2
-rw-r--r--keyboards/minidox/rules.mk15
-rw-r--r--keyboards/mitosis/rules.mk18
-rw-r--r--keyboards/mt40/config.h1
-rwxr-xr-xkeyboards/mt40/program74
-rw-r--r--keyboards/mt40/rules.mk9
-rw-r--r--keyboards/nyquist/rev1/config.h2
-rw-r--r--keyboards/nyquist/rules.mk15
-rw-r--r--keyboards/orthodox/rev1/config.h2
-rw-r--r--keyboards/orthodox/rules.mk15
-rw-r--r--keyboards/pearl/config.h1
-rw-r--r--keyboards/pearl/rules.mk7
-rw-r--r--keyboards/planck/light/rules.mk2
-rw-r--r--keyboards/planck/rev3/rules.mk9
-rw-r--r--keyboards/planck/rev4/rules.mk8
-rw-r--r--keyboards/planck/rev5/rules.mk8
-rw-r--r--keyboards/planck/rules.mk21
-rw-r--r--keyboards/preonic/rules.mk20
-rw-r--r--keyboards/ps2avrGB/config.h1
-rw-r--r--keyboards/ps2avrGB/rules.mk7
-rw-r--r--keyboards/viterbi/rev1/config.h2
-rw-r--r--keyboards/viterbi/rules.mk15
-rw-r--r--keyboards/ymd96/config.h1
-rw-r--r--keyboards/ymd96/rules.mk7
64 files changed, 225 insertions, 432 deletions
diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk
index 0a254d0e79..2c8418beb7 100644
--- a/keyboards/atreus/rules.mk
+++ b/keyboards/atreus/rules.mk
@@ -5,7 +5,6 @@ ifdef TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
@@ -27,7 +26,6 @@ MCU = atmega32u4
# software delays.
F_CPU = 16000000
-
#
# LUFA specific
#
@@ -47,19 +45,20 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+ifdef TEENSY2
+ BOOTLOADER = halfkay
+else
+ BOOTLOADER = caterina
+endif
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h
index 90a4aa05a6..8d9248947c 100644
--- a/keyboards/atreus62/config.h
+++ b/keyboards/atreus62/config.h
@@ -38,8 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6 }
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk
index ca399e9c56..66f6660c6e 100644
--- a/keyboards/atreus62/rules.mk
+++ b/keyboards/atreus62/rules.mk
@@ -35,18 +35,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h
index c52d9175b8..c0e0face5a 100644
--- a/keyboards/bfake/config.h
+++ b/keyboards/bfake/config.h
@@ -41,7 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk
index d089858273..9165de4248 100644
--- a/keyboards/bfake/rules.mk
+++ b/keyboards/bfake/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
diff --git a/keyboards/bmini/config.h b/keyboards/bmini/config.h
index 90b315b7c5..b7a25e050e 100644
--- a/keyboards/bmini/config.h
+++ b/keyboards/bmini/config.h
@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/bmini/rules.mk b/keyboards/bmini/rules.mk
index 41a87973d4..73c361e2a8 100644
--- a/keyboards/bmini/rules.mk
+++ b/keyboards/bmini/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk
index 098bf28fa5..4f95949f9f 100644
--- a/keyboards/chimera_ortho/rules.mk
+++ b/keyboards/chimera_ortho/rules.mk
@@ -1,6 +1,5 @@
OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
@@ -45,19 +44,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk
index c951780e20..16090962d9 100644
--- a/keyboards/converter/usb_usb/ble/rules.mk
+++ b/keyboards/converter/usb_usb/ble/rules.mk
@@ -1,4 +1,3 @@
BLUETOOTH = AdafruitBLE
ADAFRUIT_BLE_ENABLE = yes
-OPT_DEFS += -DCATERINA_BOOTLOADER
F_CPU = 8000000
diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk
index b0e07c7649..7a8f24bb49 100644
--- a/keyboards/converter/usb_usb/rules.mk
+++ b/keyboards/converter/usb_usb/rules.mk
@@ -43,19 +43,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk
index e345d61f56..2a13dbdfc6 100644
--- a/keyboards/deltasplit75/rules.mk
+++ b/keyboards/deltasplit75/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h
index b677d09aa9..319a149fbc 100644
--- a/keyboards/deltasplit75/v2/config.h
+++ b/keyboards/deltasplit75/v2/config.h
@@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 }
#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1}
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/dichotemy/rules.mk b/keyboards/dichotemy/rules.mk
index c8a316f843..4e9db86875 100644
--- a/keyboards/dichotemy/rules.mk
+++ b/keyboards/dichotemy/rules.mk
@@ -1,6 +1,5 @@
OPT_DEFS += -DDICHOTEMY_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
DICHOTEMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
@@ -25,8 +24,6 @@ MCU = atmega32u4
# software delays.
F_CPU = 16000000
-
-#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
@@ -45,19 +42,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h
index 99b057496f..f6b78631ea 100644
--- a/keyboards/eco/config.h
+++ b/keyboards/eco/config.h
@@ -31,8 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 4
#define MATRIX_COLS 14
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk
index 6f4b4fefc4..35ee906b1e 100644
--- a/keyboards/eco/rules.mk
+++ b/keyboards/eco/rules.mk
@@ -34,18 +34,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index 3d6b18fea9..4d2c461085 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -54,18 +54,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = halfkay
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=512
-
# If you have Left LEDs (see
# https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for
# details), include the following define:
diff --git a/keyboards/gherkin/keymaps/mjt/config.h b/keyboards/gherkin/keymaps/mjt/config.h
index 9c9f038389..bb59ec213d 100644
--- a/keyboards/gherkin/keymaps/mjt/config.h
+++ b/keyboards/gherkin/keymaps/mjt/config.h
@@ -52,8 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 }
-#define CATERINA_BOOTLOADER
-
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
diff --git a/keyboards/gherkin/rules.mk b/keyboards/gherkin/rules.mk
index 6bb9edb35a..530898bd78 100644
--- a/keyboards/gherkin/rules.mk
+++ b/keyboards/gherkin/rules.mk
@@ -33,14 +33,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/handwired/MS_sculpt_mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk
index 53769f81f4..680c057d36 100644
--- a/keyboards/handwired/MS_sculpt_mobile/rules.mk
+++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk
@@ -5,21 +5,29 @@ SRC= babblePaste.c
ifdef ASTAR
CFLAGS=-D ASTAR
- OPT_DEFS += -DBOOTLOADER_SIZE=4096
MCU = atmega32u4
- OPT_DEFS += -DCATERINA_BOOTLOADER
SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
else
MCU = at90usb1286
- OPT_DEFS += -DBOOTLOADER_SIZE=2048
SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
endif
F_CPU = 16000000
ARCH = AVR8
F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+ifdef ASTAR
+ BOOTLOADER = caterina
+else
+ BOOTLOADER = atmel-dfu
+endif
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk
index 4929968410..00ca06dd40 100755
--- a/keyboards/handwired/reddot/rules.mk
+++ b/keyboards/handwired/reddot/rules.mk
@@ -36,30 +36,25 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
-
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
ifdef TEENSY2
+ BOOTLOADER = halfkay
OPT_DEFS += -DATREUS_TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
+ BOOTLOADER = caterina
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-# MCU name
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change yes to no to disable
diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h
index 88cc5ad00e..9c9361ced7 100644
--- a/keyboards/handwired/space_oddity/config.h
+++ b/keyboards/handwired/space_oddity/config.h
@@ -11,8 +11,6 @@
#define PRODUCT Space Odyssey
#define DESCRIPTION Keyboard
-#define CATERINA_BOOTLOADER
-
#define MOUSEKEY_INTERVAL 16
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk
index 170c64a30e..4dc93fad9e 100644
--- a/keyboards/handwired/space_oddity/rules.mk
+++ b/keyboards/handwired/space_oddity/rules.mk
@@ -33,14 +33,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk
index 62f94b9452..8568def354 100644
--- a/keyboards/handwired/traveller/rules.mk
+++ b/keyboards/handwired/traveller/rules.mk
@@ -37,15 +37,23 @@ ARCH = AVR8
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
ifdef TEENSY2
+ BOOTLOADER = halfkay
OPT_DEFS += -DATREUS_TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
+ BOOTLOADER = caterina
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
+
+
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h
index 39a466850e..b2eb7020fc 100644
--- a/keyboards/handwired/woodpad/config.h
+++ b/keyboards/handwired/woodpad/config.h
@@ -53,8 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
-#define CATERINA_BOOTLOADER
-
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk
index 7612f4b49c..11f096581e 100644
--- a/keyboards/handwired/woodpad/rules.mk
+++ b/keyboards/handwired/woodpad/rules.mk
@@ -35,19 +35,16 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/iris/rev1/config.h b/keyboards/iris/rev1/config.h
index 10f435a4fc..c9bc625289 100644
--- a/keyboards/iris/rev1/config.h
+++ b/keyboards/iris/rev1/config.h
@@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 }
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/iris/rev2/config.h b/keyboards/iris/rev2/config.h
index 4ba21a58a6..290fba4502 100644
--- a/keyboards/iris/rev2/config.h
+++ b/keyboards/iris/rev2/config.h
@@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D7, E6, B4, D2, D4 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/iris/rules.mk b/keyboards/iris/rules.mk
index 0280e9d1a6..db4bf3a1e4 100644
--- a/keyboards/iris/rules.mk
+++ b/keyboards/iris/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h
index 42a37c957f..02339a33f7 100644
--- a/keyboards/jj40/config.h
+++ b/keyboards/jj40/config.h
@@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TAPPING_TOGGLE 3
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/jj40/program b/keyboards/jj40/program
deleted file mode 100755
index 81552c2723..0000000000
--- a/keyboards/jj40/program
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-print('Searching for jj40... ', end='')
-
-dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-if dev is None:
- raise ValueError('Device not found')
-
-print('Found', end='\n\n')
-
-print('Device Information:')
-print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
-print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
-print('Manufacturer: %s' % (dev.iManufacturer))
-print('Serial: %s' % (dev.iSerialNumber))
-print('Product: %s' % (dev.iProduct), end='\n\n')
-
-print('Transferring control to bootloader... ', end='')
-
-dev.set_configuration()
-
-request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
-USBRQ_HID_SET_REPORT = 0x09
-HID_REPORT_OPTION = 0x0301
-
-
-try:
- dev.ctrl_transfer(
- request_type,
- USBRQ_HID_SET_REPORT,
- HID_REPORT_OPTION,
- 0,
- [0, 0, 0xFF] + [0] * 5
- )
-except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-# wait a bit until bootloader starts up
-time.sleep(2)
-
-print('OK')
-print('Programming...')
-if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
- print('\nDone!')
diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk
index c39ebf2225..c6279a2a51 100644
--- a/keyboards/jj40/rules.mk
+++ b/keyboards/jj40/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
# build options
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
@@ -39,11 +45,10 @@ KEY_LOCK_ENABLE = yes
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c
# programming options
-PROGRAM_CMD = ./keyboards/jj40/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index 7c128421dd..73f90e715d 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -39,9 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-
-#define CATERINA_BOOTLOADER
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h
index 1f0603d501..1c48f38e05 100644
--- a/keyboards/lets_split/rev2/config.h
+++ b/keyboards/lets_split/rev2/config.h
@@ -39,8 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-#define CATERINA_BOOTLOADER
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index 1bbc0367fa..f9dc127bc6 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -40,18 +40,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h
index 0543e8930d..70ebcb8c23 100644
--- a/keyboards/lets_split/sockets/config.h
+++ b/keyboards/lets_split/sockets/config.h
@@ -39,8 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6}
// #define MATRIX_COL_PINS { B6, B2, B3, C6, F7, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-#define CATERINA_BOOTLOADER
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/levinson/rev1/config.h b/keyboards/levinson/rev1/config.h
index 7c8b9b0b92..ddccbc47a9 100644
--- a/keyboards/levinson/rev1/config.h
+++ b/keyboards/levinson/rev1/config.h
@@ -38,8 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 }
-#define CATERINA_BOOTLOADER
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/levinson/rev2/config.h b/keyboards/levinson/rev2/config.h
index 27d451a3b2..51ae5cd3c7 100644
--- a/keyboards/levinson/rev2/config.h
+++ b/keyboards/levinson/rev2/config.h
@@ -38,9 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, D7, E6, B4 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-
-#define CATERINA_BOOTLOADER
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/levinson/rules.mk b/keyboards/levinson/rules.mk
index 0ca19e9a00..8e67497f4b 100644
--- a/keyboards/levinson/rules.mk
+++ b/keyboards/levinson/rules.mk
@@ -40,18 +40,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/mechmini/config.h b/keyboards/mechmini/config.h
index 96f4bb51e4..e7004608e1 100644
--- a/keyboards/mechmini/config.h
+++ b/keyboards/mechmini/config.h
@@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN E2
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/mechmini/rules.mk b/keyboards/mechmini/rules.mk
index d089858273..ed55ae1c43 100644
--- a/keyboards/mechmini/rules.mk
+++ b/keyboards/mechmini/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel-dfu
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
diff --git a/keyboards/minidox/rev1/config.h b/keyboards/minidox/rev1/config.h
index 9799c41994..b7272bdb05 100644
--- a/keyboards/minidox/rev1/config.h
+++ b/keyboards/minidox/rev1/config.h
@@ -26,8 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { B2, B6, B4, B5 }
#define MATRIX_COL_PINS { F4, D3, D2, D1, D4 }
-#define CATERINA_BOOTLOADER
-
#define USE_SERIAL
//#define EE_HANDS
diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk
index 0f9d303105..0c3a03bd73 100644
--- a/keyboards/minidox/rules.mk
+++ b/keyboards/minidox/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk
index 903edb1092..0db144ed32 100644
--- a/keyboards/mitosis/rules.mk
+++ b/keyboards/mitosis/rules.mk
@@ -1,6 +1,5 @@
OPT_DEFS += -DMITOSIS_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
@@ -25,7 +24,6 @@ MCU = atmega32u4
# software delays.
F_CPU = 16000000
-
#
# LUFA specific
#
@@ -45,19 +43,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h
index 394cc78981..6c82b2c74f 100644
--- a/keyboards/mt40/config.h
+++ b/keyboards/mt40/config.h
@@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_VAL_STEP 18
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
#define TAPPING_TERM 200
diff --git a/keyboards/mt40/program b/keyboards/mt40/program
deleted file mode 100755
index e8786f566d..0000000000
--- a/keyboards/mt40/program
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python2.7
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-print('Searching for planck clone keyboard... ', end='')
-
-dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-if dev is None:
- raise ValueError('Device not found')
-
-print('Found', end='\n\n')
-
-print('Device Information:')
-print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
-print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
-print('Manufacturer: %s' % (dev.iManufacturer))
-print('Serial: %s' % (dev.iSerialNumber))
-print('Product: %s' % (dev.iProduct), end='\n\n')
-
-print('Transferring control to bootloader... ', end='')
-
-dev.set_configuration()
-
-request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
-USBRQ_HID_SET_REPORT = 0x09
-HID_REPORT_OPTION = 0x0301
-
-
-try:
- dev.ctrl_transfer(
- request_type,
- USBRQ_HID_SET_REPORT,
- HID_REPORT_OPTION,
- 0,
- [0, 0, 0xFF] + [0] * 5
- )
-except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-# wait a bit until bootloader starts up
-time.sleep(2)
-
-print('OK')
-print('Programming...')
-if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
- print('\nDone!')
diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk
index 10023da0ee..9d230d2388 100644
--- a/keyboards/mt40/rules.mk
+++ b/keyboards/mt40/rules.mk
@@ -9,6 +9,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
# build options
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
@@ -26,11 +32,10 @@ RGBLIGHT_CUSTOM_DRIVER = yes
TAP_DANCE_ENABLE = no
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c
# programming options
-PROGRAM_CMD = ./keyboards/mt40/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h
index 3615768871..4430f254cb 100644
--- a/keyboards/nyquist/rev1/config.h
+++ b/keyboards/nyquist/rev1/config.h
@@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk
index f2bc59cc5d..971cd188a8 100644
--- a/keyboards/nyquist/rules.mk
+++ b/keyboards/nyquist/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h
index 26715f4096..d6564f281c 100644
--- a/keyboards/orthodox/rev1/config.h
+++ b/keyboards/orthodox/rev1/config.h
@@ -51,8 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { D2, F5, F6, F7, B6, B5, B4, D7, D6 }
/*/
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk
index 48d6551bc7..d7ea0d49dc 100644
--- a/keyboards/orthodox/rules.mk
+++ b/keyboards/orthodox/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h
index 99a93ee798..47a732f768 100644
--- a/keyboards/pearl/config.h
+++ b/keyboards/pearl/config.h
@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DESCRIPTION 40% keyboard
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk
index d089858273..9165de4248 100644
--- a/keyboards/pearl/rules.mk
+++ b/keyboards/pearl/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk
index 02c39c43a0..1225a5d28d 100644
--- a/keyboards/planck/light/rules.mk
+++ b/keyboards/planck/light/rules.mk
@@ -4,6 +4,4 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-OPT_DEFS += -DBOOTLOADER_SIZE=8192
-
MCU = at90usb1286 \ No newline at end of file
diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk
index 9ecde59583..e51af55c66 100644
--- a/keyboards/planck/rev3/rules.mk
+++ b/keyboards/planck/rev3/rules.mk
@@ -1,10 +1 @@
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk
index 0001fb50f7..7e64e7edc4 100644
--- a/keyboards/planck/rev4/rules.mk
+++ b/keyboards/planck/rev4/rules.mk
@@ -1,9 +1 @@
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
AUDIO_ENABLE = yes # Audio output on port C6
diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk
index 29eae4b495..3b22e0a01b 100644
--- a/keyboards/planck/rev5/rules.mk
+++ b/keyboards/planck/rev5/rules.mk
@@ -1,9 +1 @@
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
AUDIO_ENABLE = yes # Audio output on port C6 \ No newline at end of file
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
index 1fed5fa58a..439f7db645 100644
--- a/keyboards/planck/rules.mk
+++ b/keyboards/planck/rules.mk
@@ -34,6 +34,23 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+ifeq ($(strip $(KEYBOARD)), planck/rev3)
+ BOOTLOADER = atmel-dfu
+endif
+ifeq ($(strip $(KEYBOARD)), planck/rev4)
+ BOOTLOADER = atmel-dfu
+endif
+ifeq ($(strip $(KEYBOARD)), planck/rev5)
+ BOOTLOADER = qmk-dfu
+endif
+ifeq ($(strip $(KEYBOARD)), planck/light)
+ BOOTLOADER = qmk-dfu
+endif
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
@@ -46,9 +63,9 @@ MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
+MIDI_ENABLE = yes # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk
index acef4d9713..60087e9785 100644
--- a/keyboards/preonic/rules.mk
+++ b/keyboards/preonic/rules.mk
@@ -36,18 +36,20 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+ifeq ($(strip $(KEYBOARD)), preonic/rev1)
+ BOOTLOADER = atmel-dfu
+endif
+ifeq ($(strip $(KEYBOARD)), preonic/rev2)
+ BOOTLOADER = qmk-dfu
+endif
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h
index 57ec985193..f62de1653a 100644
--- a/keyboards/ps2avrGB/config.h
+++ b/keyboards/ps2avrGB/config.h
@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk
index 9e76993c4a..c7c12dcf17 100644
--- a/keyboards/ps2avrGB/rules.mk
+++ b/keyboards/ps2avrGB/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel-dfu
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes
diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/viterbi/rev1/config.h
index 68ca5f3626..3400ea31a1 100644
--- a/keyboards/viterbi/rev1/config.h
+++ b/keyboards/viterbi/rev1/config.h
@@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/viterbi/rules.mk b/keyboards/viterbi/rules.mk
index 8a1b94013e..1f77c63741 100644
--- a/keyboards/viterbi/rules.mk
+++ b/keyboards/viterbi/rules.mk
@@ -39,18 +39,15 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Boot Section Size in *bytes*
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h
index cdc403d5e2..e0a2aa1383 100644
--- a/keyboards/ymd96/config.h
+++ b/keyboards/ymd96/config.h
@@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk
index 9e76993c4a..c7c12dcf17 100644
--- a/keyboards/ymd96/rules.mk
+++ b/keyboards/ymd96/rules.mk
@@ -24,6 +24,12 @@ NO_SUSPEND_POWER_DOWN = yes
# processor frequency
F_CPU = 12000000
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel-dfu
+
# build options
BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = yes
@@ -35,7 +41,6 @@ RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
# custom matrix setup
CUSTOM_MATRIX = yes