-
Notifications
You must be signed in to change notification settings - Fork 41
/
burnBootloaderWithOpenOCD.txt
46 lines (43 loc) · 1.31 KB
/
burnBootloaderWithOpenOCD.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#### Instructions ##############################
#
# for burning bootloader with Raspberry Pi
# and OpenOCD
#-----------------------------------------------
#
# 1) Install OpenOCD on the pi with this guide:
# https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/compiling-openocd
# or using apt-get:
# sudo apt-get install openocd
#
# 2) Download bootloader:
# https://github.com/adafruit/uf2-samdx1/releases/download/v3.13.0/bootloader-itsybitsy_m0-v3.13.0.bin
#
# or latest from:
# https://github.com/adafruit/uf2-samdx1/releases
#
# 3) Put *.bin file in new folder on pi together with this script and rename this script to "openocd.cfg"
#
# 4) Connections for Raspberry Pi 3 B
# Power "combined" PCB via USB from pi
# and connect:
# Prog1:D (swdio) -> GPIO 25
# Prog1:C (swclk) -> GPIO 11
# Prog1:Reset -> 3.3v
#
# 5) run:
# cd \\|Insert name of folder on pi with this script
# sudo openocd
#
################################################
source [find interface/raspberrypi2-native.cfg]
transport select swd
set CHIPNAME at91samd21g18
source [find target/at91samdXX.cfg]
init
targets
reset halt
at91samd bootloader 0
program bootloader-itsybitsy_m0-v3.13.0.bin verify
at91samd bootloader 8192
reset
shutdown