diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-11-14 16:11:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 16:11:29 -0500 |
commit | ec3e065f0d2c65175384699cb11fa388250fa914 (patch) | |
tree | e66837d6af1a30b739303bfa06043edf12f9fcc1 /tmk_core | |
parent | 3c15c48e6a5c584d225d369ea458f9a3f9cd3d57 (diff) |
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
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/avr.mk | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 80e8b2be64..94e9a7bdbb 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 + |