atsamd: Add support to "make flash" to automatically enter the bootloader

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-08 21:09:35 -05:00
parent 079fdf8807
commit 6a16e1f4c5
1 changed files with 2 additions and 3 deletions

View File

@ -61,6 +61,5 @@ BOSSAC_OFFSET-$(CONFIG_MACH_SAMD21) := 0x2000
BOSSAC_OFFSET-$(CONFIG_MACH_SAMD51) := 0x4000 BOSSAC_OFFSET-$(CONFIG_MACH_SAMD51) := 0x4000
flash: $(OUT)klipper.bin lib/bossac/bin/bossac flash: $(OUT)klipper.bin lib/bossac/bin/bossac
@echo " Flashing $< to $(FLASH_DEVICE) via bossac" @echo " Flashing $< to $(FLASH_DEVICE)"
$(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi $(Q)$(PYTHON) ./scripts/flash_usb.py -t atsamd -d "$(FLASH_DEVICE)" -o $(BOSSAC_OFFSET-y) $(OUT)klipper.bin
$(Q)lib/bossac/bin/bossac -U -p "$(FLASH_DEVICE)" -a --offset=$(BOSSAC_OFFSET-y) -w $< -v -b -R