wiki:Debugging/OpenOCD

Version 9 (modified by Chris Johns, on Apr 16, 2018 at 12:00:43 AM) (diff)

--

OpenOCD

OpenOCD, the Open On-Chip Debugger has been created by Dominic Rath as part of a diploma thesis at the University of Applied Sciences, FH-Augsburg. The main site is http://openocd.org/ and you can view the OpenOCD User Manual here.

  1. Xilinx Zynq
  2. NXP LPC17xx/178x/408x
  3. Texas Instruments TMS570/TMS570LS3137
  4. Raspberry Pi
  5. BeagleBone Black

Building OpenOCD from GIT

The following is a quick example detailing how to build OpenOCD from GIT. Please refer to the OpenOCD documentation for any further detail and specific help.

$ git clone git://repo.or.cz/openocd.git openocd.git
$ cd openocd.git
$ ./bootstrap
$ cd ..
$ mkdir build
$ cd build
$ ../openocd.git/configure --enable-maintainer-mode --enable-ftdi --disable-werror --prefix=/opt/work/openocd
$ gmake -j 8
$ gmake install

Notes:

  1. The prefix /opt/work/openocd if just an example path, select a suitable local path for your host.
  2. On FreeBSD the --disable-werror option needs to be used to disable warnings being treated as errors.
  3. You need --enable-ftdi option to support the Flyswatter2 pod. Other pod may require other options.