I recently built and installed the on-chip debugger OpenOCD. Ubuntu already ships with an OpenOCD package, so you can skip the build process if you prefer. See the Ubuntu Community OpenOCD document for instructions.
I downloaded the OpenOCD source via “git”.
git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
Run the bootstrap to generate the configure scripts.
./bootstrap
Install the libftdi libraries.
sudo apt-get install libftdi1 libftdi-dev
Be sure to install the Doxygen libraries if you want to build the Doxygen generated documents.
Run the configure script. I chose to install in the default directory. Use the prefix directive to specify an alternative directory if you prefer. I found that I had to specify the –enable-maintainer-mode switch to get OpenOCD to compile correctly.
./configure --enable-maintainer-mode --enable-ft2232_libftdi
Build the code using make.
make
Build the PDF and HTML documentation if desired.
make pdf make html
Install and verify the installation.
sudo make install which openocd
Finally, install the documentation.
sudo make install-pdf sudo make install-html