From ec3e065f0d2c65175384699cb11fa388250fa914 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 14 Nov 2017 16:11:29 -0500 Subject: QMK DFU bootloader generation (#2009) * adds :bootloader target * update planck and preonic revisions * remove references to .h files for planck * update preonic keymap * only add keyboard.h files that exist * add production target * hook things up with the new lufa variables * update rules for planck/preonic * back backlight key turn of status led when pressed * add manufacturer/product strings to bootloader --- tmk_core/avr.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tmk_core/avr.mk') diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 80e8b2be6..94e9a7bdb 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -244,3 +244,23 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof +bootloader: + make -C lib/lufa/Bootloaders/DFU/ clean + echo "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n" > lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "MANUFACTURER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "PRODUCT" $(ALL_CONFIGS) -h | tail -1` Bootloader >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "QMK_ESC_OUTPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "QMK_ESC_INPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "QMK_LED" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo `grep "QMK_SPEAKER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h + make -C lib/lufa/Bootloaders/DFU/ + echo "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex" + cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex + +production: $(BUILD_DIR)/$(TARGET).hex bootloader + @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex + @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex + echo "File sizes:" + $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex + -- cgit v1.2.3-24-g4f1b