summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordi0ib <di0ib@users.noreply.github.com>2016-08-08 08:58:59 +0200
committerGitHub <noreply@github.com>2016-08-08 08:58:59 +0200
commit8fab141a024fd55a28366958716f4be1a10f9c03 (patch)
tree08dc769aff5f43ac07f26b94b75c43b14a557cb8
parenta36b2a0756761513a9853af78d61e8b666b34aa7 (diff)
downloadqmk_firmware-8fab141a024fd55a28366958716f4be1a10f9c03.tar.gz
qmk_firmware-8fab141a024fd55a28366958716f4be1a10f9c03.tar.xz
Convert hex to bin
For flashing via alternative methods like LUFA MassStorage bootloader.
-rw-r--r--tmk_core/avr.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 6c03e1650..b48173341 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -138,6 +138,11 @@ else
endif
dfu-programmer $(MCU) reset
+# 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;
+ $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin;
# Generate avr-gdb config/init file which does the following:
# define the reset signal, load the target file, connect to target, and set