Amontec JTAG Key linux installation problems..

I am trying to install OpenOCD with the Amontec JTAGkey but are not having any success. Any help is appreciated!!! :stuck_out_tongue:

I have installed the libftd2xx.so.0.4.10 library from Amontec (and can see it with ldconfig -p |grep libftd2)

I can see the Amontec USB device with USB view and can see them in /proc/bus/usb/devices …

T: Bus=01 Lev=02 Prnt=04 Port=03 Cnt=01 Dev#= 9 Spd=12 MxCh= 0

D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1

P: Vendor=0403 ProdID=cff8 Rev= 5.00

S: Manufacturer=Amontec

S: Product=Amontec JTAGkey

S: SerialNumber=32Q1Q4X9

C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

I built openocd (svn) with

./configure --enable-ft2232_libftd2xx

when I run openocd I get the following errors…

# openocd -f OpenOCD-ARM926EJS.config

Open On-Chip Debugger 1.0 (2008-07-12-14:38) svn:799

$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $

Error: jtag.c:1689 handle_interface_command(): No valid jtag interface found (ft2232)

Error: jtag.c:1690 handle_interface_command(): compiled-in jtag interfaces:

Info: options.c:50 configuration_output_handler(): Runtime error, file “?”, line 8:

Info: options.c:50 configuration_output_handler(): No valid jtag interface found (ft2232)

compiled-in jtag interfaces:

Info: options.c:50 configuration_output_handler(): In procedure ‘unknown’ called at file “?”, line 1

Info: options.c:50 configuration_output_handler(): In procedure ‘interface’ called at file “OpenOCD-ARM926EJS.config”, line 7

Info: options.c:50 configuration_output_handler(): Runtime error, file “?”, line 8:

Info: options.c:50 configuration_output_handler(): No valid jtag interface found (ft2232)

compiled-in jtag interfaces:

Runtime error, file “?”, line 8:

No valid jtag interface found (ft2232)

compiled-in jtag interfaces:

In procedure ‘unknown’ called at file “?”, line 1

In procedure ‘interface’ called at file “OpenOCD-ARM926EJS.config”, line 7

Info: options.c:50 configuration_output_handler(): In procedure ‘unknown’ called at file “?”, line 1

Info: options.c:50 configuration_output_handler(): In procedure ‘interface’ called at file “OpenOCD-ARM926EJS.config”, line 7

Info: options.c:50 configuration_output_handler(): In procedure ‘unknown’ called at file “?”, line 1

Info: options.c:50 configuration_output_handler(): In procedure ‘script’ called at file “?”, line 1


It seems that it cannot see the JTAGkey. I don’t think it’s a permission problem because I’m running as root.

This is my config file:

# Reference: http://openfacts.berlios.de/index-en.ph … figuration

OpenOCD daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ft2232

ft2232_device_desc “Amontec JTAGkey”

Cannot use device descriptor AND serial number

ft2232_serial “32Q1Q4X9”

ft2232_layout jtagkey

The Amontec JATGkey has the VID & PID as shown

ft2232_vid_pid 0x0403 0xcff8

Try maximum speed

jtag_speed 0

use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config trst_and_srst

jtag scan chain

format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

jtag_nsrst_delay 200

jtag_ntrst_delay 200

#target configuration

daemon_startup attach

#target (run for 1 second then halt after a reset. Possible options are reset_halt, reset_run, reset_init, run_and_halt, run_and_init

target arm926ejs little run_and_halt 1

Hello Michael,

please can you test version 738 instead of the latest trunk version.

Best regards,

Michael

Actually I think I was trying to use the wrong configuration for the JTAGKEY.

I tried ./configure --enable-ft2232_ftd2xx --with-ftd2xx=/tmp/FTDI

and got further. (Although the FTDI headers (used during compile) and libraries available are version 0.4.13 and the Amontec library is 0.4.10)

Now I get the following error…

Open On-Chip Debugger 1.0 (2008-07-13-07:59) svn:738

$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $

Info: options.c:50 configuration_output_handler(): jtag_speed: 14, 14

Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-07-13-07:59) svn:738

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x0792611f (Manufacturer: 0x08f, Part: 0x7926, Version: 0x0)

Error: jtag.c:370 jtag_get_device(): jtag device number 1 not defined

It seems to be able to talk to the chip to get the Mfgr etc but not be able to get any further. The chip is a Freescale i.MX21 (ARM926EJ-S core)

OK I found another post that gave me the correct settings. It seems the i.MX21 requires:

jtag_device 4 0x1 0x1 0xe

That fixed it ! :slight_smile: