Next: JTAG Hardware Dongles, Previous: Developers, Up: Top
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.
If you are a PACKAGER of OpenOCD if you
As a PACKAGER - you are at the top of the food chain. You solve problems for downstream users. What you fix or solve - solves hundreds if not thousands of user questions. If something does not work for you please let us know. That said, would also like you to follow a few suggestions:
It is your decision..
You can download the current SVN version with 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
Building OpenOCD requires a recent version of the GNU autotools. On my build system, I'm using autoconf 2.13 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 then 0.14.
In general, the D2XX driver provides superior performance (several times as fast), but has the draw-back of being binary-only - though that isn't that bad, as it isn't a kernel module, only a user space library.
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:
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).
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.
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 (12/26/2008) 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:
1) Check out the latest version of “openocd” from SVN.
2) Download & Unpack either the Windows or Linux FTD2xx Drivers (http://www.ftdichip.com/Drivers/D2XX.htm)
/home/duane/ftd2xx.win32 => the Cygwin/Win32 ZIP file contents.
/home/duane/libftd2xx0.4.16 => the Linux TAR file contents.
3) Configure with these options:
Cygwin FTCICHIP solution
./configure --prefix=/home/duane/mytools \
--enable-ft2232_ftd2xx \
--with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32
Linux FTDICHIP solution
./configure --prefix=/home/duane/mytools \
--enable-ft2232_ftd2xx \
--with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16
Cygwin/Linux LIBFTDI solution
Assumes:
1a) For Windows: The windows port of LIBUSB is in place.
1b) For Linux: libusb has been built and is inplace.
2) And libftdi has been built and installed
Note: libftdi - relies upon libusb.
./configure --prefix=/home/duane/mytools \
--enable-ft2232_libftdi
4) Then just type “make”, and perhaps “make install”.