From 6a16e1f4c5f7c4ea4307cdca9e500d21fa842e99 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 8 Mar 2019 21:09:35 -0500 Subject: [PATCH] atsamd: Add support to "make flash" to automatically enter the bootloader Signed-off-by: Kevin O'Connor --- src/atsamd/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/atsamd/Makefile b/src/atsamd/Makefile index 7fbfcbcf..2ed3a6b4 100644 --- a/src/atsamd/Makefile +++ b/src/atsamd/Makefile @@ -61,6 +61,5 @@ BOSSAC_OFFSET-$(CONFIG_MACH_SAMD21) := 0x2000 BOSSAC_OFFSET-$(CONFIG_MACH_SAMD51) := 0x4000 flash: $(OUT)klipper.bin lib/bossac/bin/bossac - @echo " Flashing $< to $(FLASH_DEVICE) via bossac" - $(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi - $(Q)lib/bossac/bin/bossac -U -p "$(FLASH_DEVICE)" -a --offset=$(BOSSAC_OFFSET-y) -w $< -v -b -R + @echo " Flashing $< to $(FLASH_DEVICE)" + $(Q)$(PYTHON) ./scripts/flash_usb.py -t atsamd -d "$(FLASH_DEVICE)" -o $(BOSSAC_OFFSET-y) $(OUT)klipper.bin