1
0
Fork 0

add bin targets - closes #1648, fixes #1647

This commit is contained in:
Jack Humbert 2017-08-27 12:11:59 -04:00
parent 7960302242
commit 677b89768b
2 changed files with 8 additions and 0 deletions

View file

@ -162,6 +162,11 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
fi 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. # Convert hex to bin.
flashbin: $(BUILD_DIR)/$(TARGET).hex flashbin: $(BUILD_DIR)/$(TARGET).hex
$(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin

View file

@ -155,3 +155,6 @@ DFU_UTIL ?= dfu-util
dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;