I worked some time with OpenOCD and then I made a break of some weeks. Now I receive these error messages when I start debugger:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST) Error: jtag.c:1301 jtag_examine_chain(): number of discovered devices in JTAGchain (578) doesn’t match configuration (1) Error: jtag.c:1302 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, …) Error: jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anyway… Info: server.c:67 add_connection(): accepted ‘telnet’ connection from 0
The configuration file is as follows:
#daemon configuration telnet_port 4444 gdb_port 3333 #interface interface parport parport_port 0x378 parport_cable wiggler jtag_speed 5 #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 #jtag scan chain #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag_device 4 0x1 0xf 0xe jtag_nsrst_delay 333 jtag_ntrst_delay 333 #target configuration target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 run_and_halt_time 0 30 daemon_startup reset #target #target arm7tdmi target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 run_and_halt_time 0 30 working_area 0 0x40000000 0x40000 nobackup #flash configuration #flash bank lpc2000 0x0 0x20000 0 0 lpc2000_v2 0 12000 calc_checksum flash bank lpc2000 0x0 0x20000 0 0 0 lpc2000_v2 12000 calc_checksum
As can be seen, the OpenOCD accepts connection to the telnet, but when I start debug from Eclipse (Yagarto IDE and toolchain) the connection can’t be established.
Can someone help me? Can this be damage in the target PCB? The target have program in the flash and works correctly without debugger.
OpenOCD always (almost) accepts telnet connections, even if the JTAG connection is not working.
In your case there is a JTAG problem. It can be the hardware, it can be the cabling, it can be misconfigured jumpers on the board or it can be the jtag device configuration in OpenOCD.
The PCB is jumper less. Some time ago (after installing of the OpenOCD 2.04) OpenOCD started giving an error message that the configuration does not match and I saw that it finds in jtag chain IDCODE=0xC (sorry, but now I can’t reproduce it!) and then: “trying to validate configured JTAG chain anyway…”. Then all worked as usual. For a time (after installing of the OpenOCD 2.31) the situation became as I described in the previous post.
Error: jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
Since there is no JTAG communication all the other error events occur because of it.
You may want to try changing
jtag_speed 0
to a higher value, since 0 is for maximum speed. You communication errors could just be because the clock is too fast for your setup. For my normal setup I usually need it at 3 or higher.
I tested with speeds 3, 5, 6, 7, 8, 12 but the state is the same.
The same I tested on another PCB and the result was the same.
Regards,
Marcho
I am sorry that did not help, Marcho. That is one common cause of JTAG communication failure, and I have seen it myself a few times. Your configuration script is very similar to the one that I use with the Olimex wiggler clone, so I can not offer any suggestions there. I suppose that it could be something wrong with the parallel port in your PC, but at this point it may require probing with an oscilloscope to figure out what is wrong?