Hammer How to use Jtag

files needed:
 * [[Media:openocd.tar.gz]]
 * [[Media:libftd2xx0.4.13.tar.gz]]

1) rmmod fdti_sio since the normal ubuntu driver grabs the hardware on plugin

2) ubuntu also needs usbfs turned on: mount -t usbfs usbfs /proc/bus/usb (as root)

3) extract the libftd2xx files using the following command: tar zxvf libftd2xx0.4.13.tar.gz

4) extract the openocd tarball using the command: tar zxvf openocd.tar.gz

5) copy the fd2xx.h and WinTypes.h files from libftd2xx directory to the openocd/src/jtag/ directory

6) copy the libftd2xx.so.0.4.13 file from the libftd2xx directory to /usr/lib directory

7) create symlinks for the libftd2xx by using the following commands:

cd /usr/lib ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4 ln -s libftd2xx.so.0.4.13 libftd2xx.so.0 ln -s libftd2xx.so.0.4.13 libftd2xx.so

8) change directory to the openocd source directory

9) to recompile openocd, one must first run the command: ./bootstrap

10) then configure the build using the command: ./configure --enable-ft2232_ftd2xx    NOTE: if you receive an error "configure: exit 77" during the configure process          please use app-get to install the build-essentials package with the           following command: apt-get install build-essential

I searched and found the following fix: * apt-get install build-essential

11) start the build using the command: make

12) put the resulting openocd executable in a dir with hammer.cfg, hammer.ocd, apex.bin (the orig from the cd)

13) ./openocd -f hammer.cfg (as root if you are on ubuntu 6.06 LTS)

14) This will load apex into ram & run it. then you can flash the original apex.bin back.

note: it seems that openocd likes to be run as root.