summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-08-27 12:11:59 -0400
committerJack Humbert <jack.humb@gmail.com>2017-08-27 12:11:59 -0400
commit677b89768b5ffba7261a16686ecf34f23d964580 (patch)
tree7327737ae5d5db2ffb8c5da41a6f82291284acd9
parent79603022422cec39ea44686c84a1050acd0c145e (diff)
downloadqmk_firmware-677b89768b5ffba7261a16686ecf34f23d964580.tar.gz
qmk_firmware-677b89768b5ffba7261a16686ecf34f23d964580.zip
add bin targets - closes #1648, fixes #1647
-rw-r--r--tmk_core/avr.mk5
-rw-r--r--tmk_core/chibios.mk3
2 files changed, 8 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 95aa973aa9..b8045a1d4d 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -163,6 +163,11 @@ avrdude: $(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
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 2a8d32fb99..61e0a847d7 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