avr: Only use the avrdude "wiring" protocol on atmega2560 devices

It appears the most common type of avrdude protocol for devices other
than the atmega2560 is the "arduino" protocol.  Update the build to
select a different protocol based on the avr processor type.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-01-05 10:02:15 -05:00
parent 29c83cec22
commit 5a86391f78
2 changed files with 7 additions and 1 deletions

View File

@@ -26,4 +26,4 @@ $(OUT)klipper.elf.hex: $(OUT)klipper.elf
flash: $(OUT)klipper.elf.hex
@echo " Flashing $^ to $(FLASH_DEVICE) via avrdude"
$(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi
$(Q)avrdude -p$(CONFIG_MCU) -cwiring -P"$(FLASH_DEVICE)" -D -U"flash:w:$(OUT)klipper.elf.hex:i"
$(Q)avrdude -p$(CONFIG_MCU) -c$(CONFIG_AVRDUDE_PROTOCOL) -P"$(FLASH_DEVICE)" -D -U"flash:w:$(OUT)klipper.elf.hex:i"