Skip to content

Instantly share code, notes, and snippets.

@JJTech0130
Created May 28, 2021 23:34
Show Gist options
  • Save JJTech0130/3e4a5d6678e99b029ab5ac79c48f7569 to your computer and use it in GitHub Desktop.
Save JJTech0130/3e4a5d6678e99b029ab5ac79c48f7569 to your computer and use it in GitHub Desktop.
# Select the Broadcom SPI interface for Raspberry Pi (SWD transport)
interface bcm2835spi
# Set the SPI speed in kHz
bcm2835spi_speed 31200 # 31.2 MHz
# Select correct chip
set CHIPNAME at91samd21g18
source [find target/at91samdXX.cfg]
# Initialize
init
targets
reset halt
# Write bootloader
at91samd bootloader 0
program samd21_sam_ba_arduino_mkrvidor4000.bin verify
at91samd bootloader 8192
# Shutdown
reset
shutdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment