]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/rules.mk
core: Add matrix_clear() and default impl.
[max/tmk_keyboard.git] / tmk_core / rules.mk
index a790f874bc9c93eb8d0fb3add10a177753767706..66b4cbd88eaf7dd840a0cbc1c2adc807e5140794 100644 (file)
@@ -124,6 +124,7 @@ CFLAGS += -O$(OPT)
 CFLAGS += -funsigned-char
 CFLAGS += -funsigned-bitfields
 CFLAGS += -ffunction-sections
+CFLAGS += -fdata-sections
 CFLAGS += -fno-inline-small-functions
 CFLAGS += -fpack-struct
 CFLAGS += -fshort-enums
@@ -419,12 +420,18 @@ flip: $(TARGET).hex
        batchisp -hardware usb -device $(MCU) -operation start reset 0
 
 dfu: $(TARGET).hex
+       @echo -n dfu-programmer: waiting
+       @until dfu-programmer $(MCU) get bootloader-version > /dev/null 2>&1; do \
+               echo  -n "."; \
+               sleep 1; \
+       done
+       @echo
+
 ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
        dfu-programmer $(MCU) erase --force
 else
        dfu-programmer $(MCU) erase
 endif
-       dfu-programmer $(MCU) erase
        dfu-programmer $(MCU) flash $(TARGET).hex
        dfu-programmer $(MCU) reset