Olimex LPC2378-STK with Olimex ARM-USB-TINY (JTAG FAILURE)

Hi everyone, I have looked through the forums for some answers regarding this error that I am currently facing…

Error: jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.

Error: jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anyway…

Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f

It does not really matter what cfg file I use, I get the same error every time. The Olimex Jtag connector red light remains on.

I have tried another jtag connector from my colleague with the same results…

I have tried using different power sources, reducing Jtag speed and that doest seem to matter as well.

Can anyone please advise this noob as to what steps to take to make this work, the board is only 2 days old :frowning:

thank you

On Windows or Linux ?

Andy

Have tried it on Windows XP and Vista

this is the config file I am using…

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0004

jtag_speed 10

#use combined on interfaces or targets that can’t set TRST/SRSTseparately

reset_config trst_and_srst separate

#jtag scan chain

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

jtag_device 4 0x1 0xf 0xe

#target configuration

daemon_startup reset

#target

#target arm7tdmi

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30

#target_script 0 reset oocd_flash2138.script

working_area 0 0x40000000 0x7fff nobackup

#flash configuration

#flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14746 calc_checksum

flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 12000 calc_checksum

#flash bank cfi 0x80000000 0x800000 2 2 0

For more information about the configuration files, take a look at:

#http://openfacts.berlios.de/index-en.ph … p+Debugger

please help

My config is identical and OpenOCD seems to connect. Are you sure you have the FT2232 drivers installed? In your control panel/System/Hardware lists you should see the Olimex serial port under ports and two entries for Olimex JTag under Universal Serial Bus Controllers. It has to install the drivers three times total.

Hi there,

yes it does have all the three drivers installed correctly when I first plugged in the ARM USB TINY. It does show up under Device Manager too.

I have sent the board back to Sparkfun for testing - I have a feeling its a hardware issue (board) as I have tried a known good jtag TINY.

On the contrary could it be software which could be causing the JTAG to communicate properly with the board other that the FT2232 drivers ?

Well, just in case, here’s a cut & paste of my config. There might be an extra period or something that we aren’t seeing.

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 3
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst separate

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

thanks PatM I will give it a go when the board arrives back from Sparkfun :slight_smile:

I am having a different problem getting this thing to work in Slackware 12.1. I followed the guide here http://bec-systems.com/web/content/view/74/9/ but I keep getting the error I posted below. I have managed to get this thing to work in Windows but I cant get rid of this error in Slackware.

SOMEONE PLEASE HELP!!!

root@darkstar:/home/lusher00/ARM/Code/demo_at91sam7_p64_blink_flash# openocd -f at91sam7s256-armusbocd.cfg

Open On-Chip Debugger 1.0 (2008-06-12-14:58) svn:699

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

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

Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-06-12-14:58) svn:699

Error: ft2232.c:1419 ft2232_init_ftd2xx(): unable to open ftdi device: 2

Error: ft2232.c:1434 ft2232_init_ftd2xx(): ListDevices: 2

Error: ft2232.c:1436 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY A

Error: ft2232.c:1436 ft2232_init_ftd2xx(): 1: Olimex OpenOCD JTAG TINY B

Hi armd,

Did you find a solution for this? I have the same problem and have tried lots of things as you listed.

Thanks,

Gil

Hi all,

I have the same problem on Windows Vista. I’m using openOCD 204, ARM-USB-TINY. Here’s what I get:

Error: ft2232.c:1341 ft2232_init_ftd2xx(): unable to open ftdi device: 2

Error: ft2232.c:1356 ft2232_init_ftd2xx(): ListDevices: 2

Error: ft2232.c:1358 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY B

Error: ft2232.c:1358 ft2232_init_ftd2xx(): 1: Xš:

This is the part of the config that matters:

#interface

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0004

jtag_speed 20

What is the solution?

Thanks,

Gil

I had the same problem that gdepaula had.

I found that I had to make sure that this line in the OpenOCD config file had to be right:

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

The string in the quotes above had to match the device string description as defined in the driver’s ftdibus.inf file in the [Strings] Section. For me, this line in ftdibus.inf is:

USB\VID_15BA&PID_0004&MI_00.DeviceDesc=“Olimex OpenOCD JTAG TINY A”

See how the strings match. Note that this has to be right in ftdibus.inf before you install the driver, so this strings get set up correctly in the windows registry.

I suspect that gdepaula may be able to get it to work by simply putting the line

ft2232_device_desc “Olimex OpenOCD JTAG TINY B”

instead of

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

in the OpenOCD config file, based on the error message produced by OpenOCD.

-Kurt

Thanks Kurt!

That solved that problem.

Now the IDE says it’s running but the board runs the program that it came with instead (LCD display, etc). All I’m trying to do is toggle an I/O line.

It looks like it didn’t flash the device and simply runs the old program.

Any hints? Jumpers on the board? I’ve checked them. config file? I use the one they provided. Need more info?

The board and tool chain: Olimex LPC-2214-RB, openocd, Eclipse, yagarto, windows Vista, Tiny Jtag.

Problem solved with this config:

telnet_port 4444

gdb_port 3333

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0004

jtag_speed 20

reset_config trst_and_srst separate

jtag_device 4 0x1 0xf 0xe

jtag_nsrst_delay 333

jtag_ntrst_delay 333

daemon_startup reset

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30

target_script 0 reset oocd_flash2294.script

working_area 0 0x40000000 0x4000 nobackup

flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14746 calc_checksum

Thanks,

Gil

Does anyone know if the Olimex tiny USB Arm will work with the Vista 64-bit version? I cannot get the software to recognize the usb drivers. On my old xp last year it took me days to get it to work and now it seems to be taking days to get it to work on my new pc. I didn’t pick Vista but I am stuck with it.

I point it to the PLACE IN GCCFD but it doesn’t seem to like those files.

regards to all.

Tried the above reccomendations, and getting some errors still

Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 20, 20
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
Error:   ft2232.c:236 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (0 < 81)
Error:   ft2232.c:423 ft2232_send_and_recv(): couldn't read from FT2232

Here’s my .cfg file I’m using:

telnet_port 4444 
gdb_port 3333 

interface ft2232 
ft2232_device_desc "Olimex OpenOCD JTAG TINY B" 
ft2232_layout "olimex-jtag" 
ft2232_vid_pid 0x15BA 0x0004 

jtag_speed 20 

reset_config trst_and_srst separate 

jtag_device 4 0x1 0xf 0xe 

jtag_nsrst_delay 333 
jtag_ntrst_delay 333 

daemon_startup reset 

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 

run_and_halt_time 0 30 

# commands below are specific to AT91sam7 Flash Programming
# ---------------------------------------------------------

#target_script specifies the flash programming script file
target_script 0 reset sam7flash.script

#working_area <target#> <address> <size> <'backup'|'nobackup'>
working_area 0 0x40000000 0x4000 nobackup

#flash bank at91sam7 0 0 0 0 <target#>
flash bank at91sam7 0 0 0 0 0

Prog: Arm-usb-tiny Toolchain: CD (WinAVR-OpenOCD-Eclipse) Board: SAM7H256

What’s worse, the LED I was trying to blink is now blinking. So potentially something I tried in the last two hours worked and I screwed it up…

Manually hacked the .inf files to make them complient to what they’re expected to be… seems to work somewhat.

Only problem: It says it properly loads the bin onto the chip, but hangs:

'C:\olimex\openocd\bin\'openocd-ftd2xx.exe -f 'C:\olimex\openocd\bin\'armusbocd_tiny.cfg
Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 2, 2
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
Info:    target.c:237 target_init_handler(): executing reset script 'sam7flash.script'
Info:    options.c:50 configuration_output_handler(): core state: ARM
Info:    options.c:50 configuration_output_handler(): flash 'at91sam7' found at 0x00100000
Info:    options.c:50 configuration_output_handler(): erased sectors 0 through 0 on flash bank 0 in 0.046002s
Info:    options.c:50 configuration_output_handler(): cleared protection for sectors 0 through 1 on flash bank 0
Info:    options.c:50 configuration_output_handler(): wrote 1904 byte from file main.bin in 0.282016s (6.593154 kb/s)

If I force close the programmer tool and unplug/replug the header board’s power (reset doesn’t work) then the program I loaded works fine. But I doubt that’s the normal configuration, so… any ideas?

For ref, here’s my .cfg now:

telnet_port 4444 
gdb_port 3333 


interface ft2232 
ft2232_device_desc "Olimex OpenOCD JTAG TINY A" 
ft2232_layout "olimex-jtag" 
ft2232_vid_pid 0x15BA 0x0004 

jtag_speed 2 # 20
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#reset_config <signals> [combination] [trst_type] [srst_type]
reset_config trst_and_srst separate

#jtag_device <IR length> <IR capture> <IR mask> <IDCODE instruction>
jtag_device 4 0x1 0xf 0xe

#daemon_startup <'attach'|'reset'>
daemon_startup reset

#target <type> <endianess> <reset_mode> <jtag#> [variant]
target arm7tdmi little run_and_init 0 arm7tdmi_r4

#run_and_halt_time <target#> <time_in_ms>
run_and_halt_time 0 30

# commands below are specific to AT91sam7 Flash Programming
# ---------------------------------------------------------

#target_script specifies the flash programming script file
target_script 0 reset sam7flash.script

#working_area <target#> <address> <size> <'backup'|'nobackup'>
working_area 0 0x40000000 0x4000 nobackup

#flash bank at91sam7 0 0 0 0 <target#>
flash bank at91sam7 0 0 0 0 0