mirror of https://github.com/Desuuuu/klipper.git
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:
parent
29c83cec22
commit
5a86391f78
|
@ -43,6 +43,12 @@ config MCU
|
|||
default "atmega1280" if MACH_atmega1280
|
||||
default "atmega2560" if MACH_atmega2560
|
||||
|
||||
config AVRDUDE_PROTOCOL
|
||||
string
|
||||
default "wiring" if MACH_atmega2560
|
||||
default "avr109" if MACH_at90usb1286
|
||||
default "arduino"
|
||||
|
||||
choice
|
||||
prompt "Processor speed"
|
||||
config AVR_FREQ_20000000
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue