{i} The current FC source code will use OpenOCD 0.3.1 or OpenOCD 0.4.0 when configured for Amotec JTAG flashing. A make fc-flash-jtag will use OpenOCD when everything needed has been found by configure. This document covers only OpenOCD version 0.4.0.

This tutorial deals with building, installing and setting up the open source tool OpenOCD for flashing and debugging the LPC2148 ARM7TDMI-S MCU on our FC.

OpenOCD is an on-chip debugging, in-system programming and boundary-scan testing tool for ARM systems and uses an IEEE 1149-1 compliant JTAG TAP bus master to access the target devices.

User interaction is realized through a telnet command line interface and a gdb (the GNU debugger) remote protocol server.

Basic Tools and Libs you will need:

Build-Essentials:

Third Party Libraries:

Getting, configure and build the 0.4.0 release

You can either grab a tarball from the OpenOCD site at berlios or clone their git-archive from git://openocd.git.sourceforge.net/gitroot/openocd/openocd.

Configure your build

Change to the directory where you have checked out your source before.

cd /{your openocd source}

If this is the first time you touch you freshly checked out OpenOCD source, you have to create a few scripts before you can play with it.

So first we need to call "bootstrap" which creates the build scripts for us

/!\ if you took the 0.4.0 tarball, you will probably not find the bootstrap script. -> so just go to the next step....

  ./bootstrap

Now you can configure your version of OpenOCD.

Normally you will only need two config-switches to configure your OpenOCD build.

--prefix=/{your install path}
--enable-{your jtag device}

To get an overview if your JTAG device is supported by OpenOCD type...

./configure --help

So we are ready to configure our build.

Mine (taken from teh debian default set) looks like this:

./configure --prefix=/opt/openocd  --enable-maintainer-mode --disable-werror --enable-parport --enable-parport_ppdev --enable- ft2232_libftdi --enable-ep93xx --enable-at91rm9200 --enable-usbprog --enable-presto_libftdi --enable-jlink --enable-vsllink --enable-rlink --enable-arm-jtag-ew

If the configuration was successful you need to build and install your application.

"make install" will do the job.

./make install

Usage

The JTAG Page in the Flashing Documentation has usage instructions

Development/BuildYourOwn/OpenOCD (last edited 2010-10-15 17:49:11 by TimoBoettcher)