How does one build openocd on Linux for amontec's jtagkey?

A little history, last week —

I got stuck trying to get r657-openocd up and running under Windows for my Phytec pxa270 board.

I get this error message in the command line window

target.c:435 target_process_reset<>: Timed out waiting for halt after reset followed by a hang of the command line window.

So this weekend –

I went looking for newer release (binary) to try under windows thinging perhaps a newer release might get it going here.

But r657 appears to be the latest available at http://www.yagarto.de/ for windows.

Now today –

I have switched to my 10.3 Suse Linux system figuring perhaps I will able to build and run the latest openocd version(s) and have full success.

After installing the linux usb drivers using the amontec instructions from here http://www.amontec.com/pub/amt_ann007.pdf

and then reading OpenOCD build instructions at

http://openfacts.berlios.de/index-en.ph … ng_OpenOCD

I did the the following to build openocd under linux

svn checkout svn://svn.berlios de/openocd/trunk openocd

cd openocd

./configure --enable -ft2232_libftd2xx

make

sudo make install

This built svn:706 on 6/9/2008 here.

then I run by …,

/Desktop/openocd>openocd -f pxa270.cfg

and then I see this error

Error: jtag.c:1684 handle_interface_command(): no valid jtag interface found (ft2232)

So it appears my setup or build on linuc somehow wrong for Openocd on Linux. What should I do?

FYI my pxa270 configuration file looks like this and seems be acceptable under the windows based r657 openocd.


#Daemon

telnet_port 3333

gdb_port 4444

daemon_startup reset

#Target

target xscale little reset_halt 0 pxa27x

#target_script 0 reset c:\Program Files\openocd-r657\source\pxa270flash.ocd

run_and_halt_time 0 100

#working_area 0 0xa0000000 0x10000 nobackup

working_area 0 0x5c000000 0x10000 nobackup

#JTAG

interface ft2232

jtag_device 7 0x1 0x7f 0x7e

jtag_nsrst_delay 250

jtag_ntrst_delay 250

reset_config trst_and_srst separate

jtag_speed 1

ft2232_device_desc “Amontec JTAGkey A”

ft2232_layout jtagkey

ft2232_vid_pid 0x0403 0xCff8

flash bank cfi 0×00000000 0×1000000 2 4 0

Opps left out a step (./bootstrap) that I in fact did to build openocd under linux.

  1. svn checkout svn://svn.berlios de/openocd/trunk openocd

  2. cd openocd

  3. ./bootstrap

  4. ./configure --enable-ft2232_libftd2xx

  5. make

  6. sudo make install

I wonder if my problem relates to the

step 4 with --enable-ft2232_libft2xx

have you tried running openocd as root ? you may find it is a permissions thing.

I assume you have installed the ftd2xx libraries also ?

ben

I am sure the line is not required

ft2232_device_desc “Amontec JTAGkey A”

My amontec is configured as follows under fedora

ft2232_vid_pid 0x0403 0xcff8 # amontec

if it still fails try without the A

ft2232_device_desc “Amontec JTAGkey”

you can use usbview to find the info about the device.

Cheers

Spen

I’ve noticed some JTagKey have a “A” and some don’t. the one I have plugged at the moment on thid machine doesn’t:

  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0xcff8
  bcdDevice            5.00
  iManufacturer           1 Amontec
  iProduct                2 Amontec JTAGkey
  iSerial                 3 32Q03AAW

It is in fact a permission issue. If you do sudo openocd [Config file], it will work. But if you do not want to use sudo then, you need to change the line in your /etc/fstab file to the following:

none /proc/bus/usb usbfs auto,users,devmode=0666 0 0.

Goodluck.

-daa