avr: Check that FLASH_DEVICE is set on "make flash" command

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-09-05 21:22:41 -04:00
parent ff56c0fb74
commit 68fc6abf74
1 changed files with 1 additions and 0 deletions

View File

@ -25,4 +25,5 @@ $(OUT)klipper.elf.hex: $(OUT)klipper.elf
flash: $(OUT)klipper.elf.hex
@echo " Flashing $(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"