How to Install OpenOCD V0.8.0 (Linux)
OpenOCD (Open On-Chip Debugger) is an open-source software that provides debugging and in-system programming for embedded target devices using JTAG interface.
OpenOCD provides also the ability to flash NAND and NOR FLASH memory devices that are attached to the processor on the target system. Flash programming is supported for external CFI compatible flashes (Intel and AMD/Spansion command set) and several internal flashes (LPC2000, AT91SAM7, STR7x, STR9x, LM3 and STM32x). Official website: http://openocd.sourceforge.net
First, install some stuff needed to build
sudo apt-get install libftdi-dev libftdi1 libtool git-core asciidoc build-essential flex bison libgmp3-dev libmpfr-dev autoconf texinfo libncurses5-dev libexpat1 libexpat1-dev tk tk8.4 tk8.4-dev
Second, create a working directory and clone it.
cd /home/username/Downloads mkdir openocd git clone git://git.code.sf.net/p/openocd/code repository cd repository
To see all the available stable version:
git tag
Switch from master to the latest stable release, at this time v.0.8.0
git checkout v0.8.0
Install packages:
sudo apt-get install libtool automake libusb-1.0.0-dev texinfo libusb-dev
libusb-dev will enable automatically the support for
Olimex ARM-JTAG-EW Programmer yes (auto)
libusb-1.0.0-dev will enable automatically the support for
MPSSE mode of FTDI based devices yes (auto)
ST-Link JTAG Programmer yes (auto)
TI ICDI JTAG Programmer yes (auto)
texinfo is also needed to avoid the error
Before compiling
Because we are building from repository
./bootstrap
To see the list of all the supported options: ./configure –help
This time any interface based on the parallel port are not enabled
./configure
At the end we will get the summary reporting the supported devices
OpenOCD configuration summary -------------------------------------------------- MPSSE mode of FTDI based devices yes (auto) ST-Link JTAG Programmer yes (auto) TI ICDI JTAG Programmer yes (auto) Keil ULINK JTAG Programmer yes (auto) Altera USB-Blaster II Compatible yes (auto) Segger J-Link JTAG Programmer yes (auto) OSBDM (JTAG only) Programmer yes (auto) eStick/opendous JTAG Programmer yes (auto) Andes JTAG Programmer yes (auto) Versaloon-Link JTAG Programmer yes (auto) USBProg JTAG Programmer yes (auto) Raisonance RLink JTAG Programmer yes (auto) Olimex ARM-JTAG-EW Programmer yes (auto) CMSIS-DAP Compliant Debugger no
Time to compile and install
make
sudo make install
The executable will be installed in: /usr/local/bin/openocd whilescripts will be in: /usr/local/share/openocd/scripts