If you are interested in getting actual work done rather than building OpenOCD, then check if your interface supplier provides binaries for you. Chances are that that binary is from some SVN version that is more stable than SVN trunk where bleeding edge development takes place.
You are a PACKAGER of OpenOCD if you
As a PACKAGER, you will experience first reports of most issues. When you fix those problems for your users, your solution may help prevent hundreds (if not thousands) of other questions from other users.
If something does not work for you, please work to inform the OpenOCD developers know how to improve the system or documentation to avoid future problems, and follow-up to help us ensure the issue will be fully resolved in our future releases.
That said, the OpenOCD developers would also like you to follow a few suggestions:
You can download the current SVN version with an SVN client of your choice from the following repositories:
svn://svn.berlios.de/openocd/trunk
or
http://svn.berlios.de/svnroot/repos/openocd/trunk
Using the SVN command line client, you can use the following command to fetch the latest version (make sure there is no (non-svn) directory called "openocd" in the current directory):
svn checkout svn://svn.berlios.de/openocd/trunk openocd
If you prefer GIT based tools, the git-svn package works too:
git svn clone -s svn://svn.berlios.de/openocd
Building OpenOCD from a repository requires a recent version of the GNU autotools (autoconf >= 2.59 and automake >= 1.9). For building on Windows, you have to use Cygwin. Make sure that your PATH environment variable contains no other locations with Unix utils (like UnxUtils) - these can't handle the Cygwin paths, resulting in obscure dependency errors (This is an observation I've gathered from the logs of one user - correct me if I'm wrong).
You further need the appropriate driver files, if you want to build support for a FTDI FT2232 based interface:
libftdi is supported under Windows. Do not use versions earlier than 0.14. To use the newer FT2232H chips, supporting RTCK and USB high speed (480 Mbps), you need libftdi version 0.16 or newer.
Some people say that FTDI's libftd2xx code provides better performance. However, it is binary-only, while OpenOCD is licenced according to GNU GPLv2 without any exceptions. That means that distributing copies of OpenOCD built with the FTDI code would violate the OpenOCD licensing terms. You may, however, build such copies for personal use.
To build OpenOCD (on both Linux and Cygwin), use the following commands:
./bootstrap
Bootstrap generates the configure script, and prepares building on your system.
./configure [options, see below]
Configure generates the Makefiles used to build OpenOCD.
make make install
Make builds OpenOCD, and places the final executable in ./src/, the last step, “make install” is optional.
The configure script takes several options, specifying which JTAG interfaces should be included (among other things):
If you want to access the parallel port using the PPDEV interface you have to specify both the --enable-parport AND the --enable-parport_ppdev option since the --enable-parport_ppdev option actually is an option to the parport driver (see http://forum.sparkfun.com/viewtopic.php?t=3795 for more info).
The same is true for the --enable-parport_giveio option, you have to use both the --enable-parport AND the --enable-parport_giveio option if you want to use giveio instead of ioperm parallel port access method.
There are 2 methods of using the FTD2232, either (1) using the FTDICHIP.COM closed source driver, or (2) the open (and free) driver libftdi. Some claim the (closed) FTDICHIP.COM solution is faster, which is the motivation for supporting it even though its licensing restricts it to non-redistributable OpenOCD binaries, and it is not available for all operating systems used with OpenOCD.
The FTDICHIP drivers come as either a (win32) ZIP file, or a (Linux) TAR.GZ file. You must unpack them “some where” convient. As of this writing FTDICHIP does not supply means to install these files “in an appropriate place”. As a result, there are two “./configure” options that help.
Below is an example build process:
/home/duane/ftd2xx.win32 => the Cygwin/Win32 ZIP file contents /home/duane/libftd2xx0.4.16 => the Linux TAR.GZ file contents
./configure --prefix=/home/duane/mytools \ --enable-ft2232_ftd2xx \ --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32
./configure --prefix=/home/duane/mytools \ --enable-ft2232_ftd2xx \ --with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16
Then configure the libftdi solution like this:
./configure --prefix=/home/duane/mytools \ --enable-ft2232_libftdi