This is an old revision of the document!


OpenOCD with the Raspberry Pi


Following the manual by Lady Ada.

$ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev htop
$ git clone http://openocd.zylin.com/openocd
$ cd openocd/
$ ./bootstrap 
$ ./configure --enable-sysfsgpio --enable-bcm2835gpio
$ make
$ sudo make install
$ cd /usr/local/share/openocd/scripts/interface/
$ ls
$ cd ~
$ mkdir bootloader
$ cd bootloader

Download the needed bootloaders

$ wget https://github.com/arduino/ArduinoCore-samd/raw/master/bootloaders/zero/samd21_sam_ba.bin
$ wget https://github.com/Seeed-Studio/ArduinoCore-samd/blob/master/bootloaders/XIAOM0/bootloader-XIAO_m0-v3.7.0-33-g90ff611-dirty.bin
$ nano openocd.cfg
$ sudo openocd -f openocd.cfg
$ sudo nano /usr/local/share/openocd/scripts/interface/raspberrypi2-native.cfg

HEX files

Pinout

Arduino MKR ZERO

Seeeduino XIAO

SAMD21 M0-Mini


Programming Adapter

These Adapter are made with Super Glue and Pogo Pins.

Seeeduino XIAO Adapter

3.3V is take from the regular pins.

SAMD21 M0-Mini Adapter

Power and ground is connected over the regular pins.