Skip to content

Commit

Permalink
Require BOOTLOADER = qmk-dfu for :bootloader target (qmk#12136)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Mar 7, 2021
1 parent 0763269 commit 8556068
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tmk_core/avr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 8556068

Please sign in to comment.