OpenOCD Ubuntu Package
This package is based on the OpenOCD 0.4.0 release available at http://prdownload.berlios.de/openocd/openocd-0.4.0.tar.gz. It does not include support for the TinCanTools Flyswatter2. To compile OpenOCD with Flyswatter2 support, see Compiling OpenOCD Linux for Flyswatter2.
Installing the OpenOCD Package
Open a terminal window (Applications menu > Accessories > Terminal) and type:
sudo apt-get install openocd
The package installs config files to /usr/share/openocd/scripts, but OpenOCD looks for config files in /usr/local/share/openocd/scripts. Fix that now by creating a symbolic link in /usr/local/share to /usr/share/openocd. In the terminal window, type:
cd /usr/local/share sudo ln -s /usr/share/openocd .
You can run OpenOCD from a terminal window from any directory. Installing OpenOCD from the APT allows users to run OpenOCD without sudo. (If you compiled OpenOCD yourself you would need to take special steps to allow users to use OpenOCD without sudo.
In a terminal window, type:
openocd -f path_to/file.cfg [-f another_path_to/file2.cfg]
For example, to run OpenOCD for the TinCanTools Flyswatter and Hammer, type:
openocd -f interface/flyswatter.cfg -f board/hammer.cfg