X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Frules.mk;h=860fc1a9310da970ebecba597c150802f522f37e;hb=e1f1a65d6b878aafbe98fe5685a04b6277fdf192;hp=d06756638c32a5e2692cb1b77f040c56171cd1b2;hpb=1a02ebcc612e9a9c0d87e02295c7258de3a70ccc;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index d0675663..860fc1a9 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -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 @@ -440,7 +441,11 @@ flip-ee: $(TARGET).hex $(TARGET).eep $(REMOVE) $(TARGET)eep.hex dfu-ee: $(TARGET).hex $(TARGET).eep - dfu-programmer $(MCU) eeprom-flash $(TARGET).eep +ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) + dfu-programmer $(MCU) flash --eeprom $(TARGET).eep +else + dfu-programmer $(MCU) flash-eeprom $(TARGET).eep +endif dfu-programmer $(MCU) reset