summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-03-07 06:40:08 +0000
committerQMK Bot <hello@qmk.fm>2021-03-07 06:40:08 +0000
commit37d1fa53e0222db740862e2e9908953fe5ce1e32 (patch)
tree066bf76c180812285530619f80cee2c634b3dbf6 /tmk_core
parentf48d95b415ac31fcbc65131691fa39444a6f1a94 (diff)
parent85560685345d5147529dfd0d6a5806d28d044094 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/avr.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 06c308e553..f9c56e06de 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -283,6 +283,9 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf
$(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof
bootloader:
+ifneq ($(strip $(BOOTLOADER)), qmk-dfu)
+ $(error Please set BOOTLOADER = qmk-dfu first!)
+endif
make -C lib/lufa/Bootloaders/DFU/ clean
bin/qmk generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/DFU/Keyboard.h
$(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))