Olimex-USB-Tiny stopped working?

Started by shwouchk September 21, 2007
Hi!

I use an Olimex-usb-tiny Jtag debugger for my LPC-P2138 board, also
from olimex.

Recently I had some problems with my OS (Sabayon linux), and had to
reinstall it.
After the reinstall, I can't get it to work. I suspect this might be
because I changed from ftd2xx to libftdi and also use a newer openocd
version... (I tried using ftd2xx but openocd won't compile with it)

here are the errors I get:
$ ./openocd -d 3 -f ../arm7_ft2232.cfg
Info: ../../src/openocd.c:93 main(): Open On-Chip Debugger
(2007-09-05 09:00 CEST)
Debug: ../../../src/jtag/jtag.c:1407 jtag_init(): -
Debug: ../../../src/jtag/ft2232.c:1427 ft2232_init_libftdi():
'ft2232' interface using libftdi with 'jtagkey' layout (15ba:0004)
Debug: ../../../src/jtag/ft2232.c:1469 ft2232_init_libftdi():
current latency timer: 10
Debug: ../../../src/jtag/ft2232.c:1655 jtagkey_init(): 80 08 1b
Debug: ../../../src/jtag/ft2232.c:1713 jtagkey_init(): 82 09 0f
Debug: ../../../src/jtag/ft2232.c:255 ft2232_speed(): 86 00 00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1253 jtag_examine_chain(): JTAG
communication failure, check connection, JTAG interface, target power etc.
Error: ../../../src/jtag/jtag.c:1440 jtag_init(): trying to validate
configured JTAG chain anyway...
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug: ../../../src/jtag/jtag.c:295 jtag_call_event_callbacks():
jtag event: TRST asserted
Debug: ../../../src/jtag/jtag.c:1197 jtag_reset_callback(): -
Error: ../../../src/jtag/jtag.c:1346 jtag_validate_chain(): Error
validating JTAG scan chain, IR mismatch, scan returned 0x00
Error: ../../../src/jtag/jtag.c:1448 jtag_init(): Could not validate
JTAG chain, exit
and here is my config file:
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY"
#ft2232_layout olimex-jtag
ft2232_layout jtagkey
ft2232_vid_pid 0x15ba 0x0004
ft2232_latency 10

#jtag_speed 10
#jtag_nsrst_delay 300
#jtag_ntrst_delay 300

#use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst srst_pulls_trst
reset_config trst_and_srst srst_pulls_trst

#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 attach
daemon_startup reset

#target
#target arm7tdmi
#target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
#target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
target arm7tdmi little reset_run 0 lpc2000
#target arm7tdmi little run_and_halt 0 lpc2000
run_and_halt_time 0 30

# flash-options LPC2138
# target_script 0 reset openocd_lpc2138_flash.script
#working_area 0 0x40000000 0x4000 nobackup
working_area 0 0x40000000 0x40000 nobackup

# LPC2138 @ 60MHz / 0x7D000 from 500*1024 (not 512!)
# flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 60000 calc_checksum

# LPC2138 @ 14.756MHz / 0x7D000 from 500*1024 (not 512!)
flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 14756 calc_checksum
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

An Engineer's Guide to the LPC2100 Series

--- In l..., "tsvetanusunov" wrote:
>
> Hi,
>
> not being OpenOCD expert (I can check tomorrow with our guy who
> compile our OpenOCD CD) but on first sight you use wrong layout
>
> > 'ft2232' interface using libftdi with 'jtagkey' layout (15ba:0004)
>
> this is for JTAGKEY not OLIMEX layout
>
> > interface ft2232
> > ft2232_device_desc "Olimex OpenOCD JTAG TINY"
> > #ft2232_layout olimex-jtag
>
> why commented?
>
> > ft2232_layout jtagkey
>
> wrong?
>
> Best regards
> Tsvetan / Olimex
>

Hi!

This was just me playing around with different configs, to see if by
chance something will work... everything which is commented is
something I tried, and I also played with some of the numbers that
are/n't commented...

If you could talk to your guy, I would be very grateful.