Install the tools we need to get and compile OpenOCD:
sudo apt-get update
sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev
Download the latest source code for OpenOCD with:
git clone http://openocd.zylin.com/openocd
Configure for the Pi and it's gpio:
cd openocd
./bootstrap
./configure --enable-sysfsgpio --enable-bcm2835gpio
Make and install:
make
sudo make install
Make the following connections between the AmiLoop and the Pi
AmiLoop | ↔ | Raspberry Pi | Pin # |
---|---|---|---|
Vin |
↔ | 3.3v |
1 |
GND |
↔ | GND |
20 |
IO |
↔ | GPIO 8 |
24 |
CLK |
↔ | GPIO 11 |
23 |
The end result should look like this (ignore brown wire in picture):
From the root of this repository run the following command:
openocd -f amiloopv4.cfg
To flash the older v3 firmware instead, use this command:
openocd -f amiloopv3.cfg
To flash a different hex file, make a copy of one of the cfg files and modify the file name on line 11