From 677b89768b5ffba7261a16686ecf34f23d964580 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 27 Aug 2017 12:11:59 -0400 Subject: add bin targets - closes #1648, fixes #1647 --- tmk_core/avr.mk | 5 +++++ tmk_core/chibios.mk | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 95aa973aa..b8045a1d4 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -162,6 +162,11 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ fi +# Convert hex to bin. +bin: $(BUILD_DIR)/$(TARGET).hex + $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; + # Convert hex to bin. flashbin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 2a8d32fb9..61e0a847d 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -155,3 +155,6 @@ DFU_UTIL ?= dfu-util dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin + +bin: $(BUILD_DIR)/$(TARGET).bin sizeafter + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; \ No newline at end of file -- cgit v1.2.3-70-g09d2