After my earlier emails I have been trying to narrow things down a bit.

I have switched from running OpenOCD on Linux inside VirtualBox, to running it 
natively on XP. I have not been able to reproduce the situation that needed the 
JTAGKey-Tiny to be replugged, but I still get random communication errors.
I also switched from the long USB cable I was using to a 50cm one, no 
difference.

I am using OpenOCD 0.4.0 that I found here:
http://www.freddiechopin.info/index.php/en/download/category/4-openocd

To setup, I power on the board and hit a key at the U-Boot countdown so it is 
left at the prompt. I then start OpenOCD and attach by telnet.
These tests are done with "poll off" and cpu halted, but neither seems to make 
a difference.

Below is a load of output (and at the bottom, an OpenOCD crash bug).
I will be re-reading the user guide tomorrow and fiddling with all the timeouts 
and options I can find, but any clues would be very welcome.

If I try jtag arp_init repeatedly, most of the time it looks ok:

>jtag arp_init
JTAG tap: penta.tap tap/device found: 0x04040009 (mfg: 0x004, part: 0x4040, 
ver: 0x0)
JTAG tap: dm355.jrc tap/device found: 0x0b73b02f (mfg: 0x017, part: 0xb73b, 
ver: 0x0)
JTAG tap: dm355.etb enabled
JTAG tap: dm355.arm enabled
1

But around 1 in 4 times I get bad stuff, which varies, here are some examples:

> jtag arp_init
JTAG tap: penta.tap tap/device found: 0x04040009 (mfg: 0x004, part: 0x4040, 
ver: 0x0)
JTAG tap: dm355.jrc tap/device found: 0x0b73b02f (mfg: 0x017, part: 0xb73b, 
ver: 0x0)
Unexpected idcode after end of chain: 320 0x8000007f
double-check your JTAG setup (interface, speed, missing TAPs, ...)
error: -100
in procedure 'jtag' called at file "command.c", line 650
called at file "command.c", line 361
in procedure 'ocd_bouncer'
called at file "embedded:startup.tcl", line 19
called at file "embedded:startup.tcl", line 20

> jtag arp_init
JTAG tap: penta.tap tap/device found: 0x82040009 (mfg: 0x004, part: 0x2040, 
ver: 0x8)
JTAG tap: penta.tap       UNEXPECTED: 0x82040009 (mfg: 0x004, part: 0x2040, 
ver: 0x8)
JTAG tap: penta.tap  expected 1 of 1: 0x04040009 (mfg: 0x004, part: 0x4040, 
ver: 0x0)
JTAG tap: dm355.jrc tap/device found: 0x0b79d817 (mfg: 0x40b, part: 0xb79d, 
ver: 0x0)
JTAG tap: dm355.jrc       UNEXPECTED: 0x0b79d817 (mfg: 0x40b, part: 0xb79d, 
ver: 0x0)
JTAG tap: dm355.jrc  expected 1 of 1: 0x0b73b02f (mfg: 0x017, part: 0xb73b, 
ver: 0x0)
Trying to use configured scan chain anyway...
Bypassing JTAG setup events due to errors

> jtag arp_init
JTAG tap: penta.tap tap/device found: 0x04040009 (mfg: 0x004, part: 0x4040, 
ver: 0x0)
JTAG tap: dm355.jrc tap/device found: 0x0b73b02f (mfg: 0x017, part: 0xb73b, 
ver: 0x0)
Unexpected idcode after end of chain: 352 0x800000ff
Unexpected idcode after end of chain: 384 0x0000007f
double-check your JTAG setup (interface, speed, missing TAPs, ...)
error: -100
in procedure 'jtag' called at file "command.c", line 650
called at file "command.c", line 361
in procedure 'ocd_bouncer'
called at file "embedded:startup.tcl", line 19
called at file "embedded:startup.tcl", line 20

I did another test writing and reading from ARM TCM:
> mww 0x4000 0xaaaaaaaa 160
> mdw 0x4000 160 (many times)

Usually I get back lots of aa's. sometimes they are not, some examples:

0x00004020: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa ffffffff 
aaaaaaaa
...
0x000041e0: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa 01010002 
01010002
0x00004200: 01010002 01010002 01010002 01010002 01010002 01010002 01010002 
01010002
0x00004220: 01010002 80808002 01010002 01010002 aaaaaaaa aaaaaaaa aaaaaaaa 
aaaaaaaa

0x00004160: aaaaaaaa ffffffff c0001fe2 c0001fea c0001fe2 c0001fea c0001fea 
c0001fe2
0x00004180: c0001fea c0001fea aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa 
aaaaaaaa

0x00004060: aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa eaaa5a62 eaaa5a6b eaaa5aba 
eaaa5808
0x00004080: eaaa586d eaaa586e eaaa583c eaaa5871 eaaa5871 eaaa5829 eaaa587d 
eaaa587d
0x000040a0: eaaad83d eaaad83e aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa 
aaaaaaaa

And finally, a crash bug report:
If jtag arp_init fails and I try a memory access, OpenOCD crashes:

> jtag arp_init
JTAG tap: penta.tap tap/device found: 0x04040009 (mfg: 0x004, part: 0x4040, 
ver: 0x0)
JTAG tap: dm355.jrc tap/device found: 0x0b73b02f (mfg: 0x017, part: 0xb73b, 
ver: 0x0)
Unexpected idcode after end of chain: 288 0x800000ff
Unexpected idcode after end of chain: 320 0x8000007f
Unexpected idcode after end of chain: 352 0x0000007f
Unexpected idcode after end of chain: 608 0x800000ff
double-check your JTAG setup (interface, speed, missing TAPs, ...)
error: -100
in procedure 'jtag' called at file "command.c", line 650
called at file "command.c", line 361
in procedure 'ocd_bouncer'
called at file "embedded:startup.tcl", line 19
called at file "embedded:startup.tcl", line 20
> mdw 0x4000 16
Connection closed by foreign host.

Console output at the time is:
...
Warn : Unexpected idcode after end of chain: 608 0x800000ff
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
error: -100
Assertation failed!

Program: C:\Program Files\OpenOCD\0.4.0\bin\openocd.exe
File: ../../../../src/jtag/drivers/driver.c, Line 345

Expression: target_tap_match

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

--
Jon Povey
[email protected]

Racelogic is a limited company registered in England. Registered number 2743719 
.
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .

The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to