Forum: Mikrocontroller und Digitale Elektronik at90can128 mit jtag ice mk1 und avarice debuggen


von Frank W. (Firma: DB1FW) (frankw) Benutzerseite


Lesenswert?

Hallo

hat es schon einer von Euch geschafft einen
At90can128 mit Jtag-Ice MK1 (Olimex) und avarice debuggen ?

Mit meinem Aufbau kann ich ohne Probleme eine Mega128 debuggen (Linux, 
avarice,gdb), und mit AVR-Studio kann ich auch den at90can128 debuggen ( 
Windows ). Kein Problem.
Aber wenn ich avarice und gdb verwenden will, dann klappt es beim 
at90can128 nicht :-(

Hat jemand das schon mal hinbekommen und hat ne Idee was ich tun könnte 
?

Anbei das Loggin mit Fehlermeldung des avarice.

---
AVaRICE version 2.7, Apr  9 2008 20:40:01

Defaulting JTAG bitrate to 1 MHz. Make sure that the target
frequency is at least 4 MHz or you will likely encounter failures
controlling the target.

JTAG config starting.
Attempting synchronisation at bitrate
115200

command[S, 1]: 53 45 20 20

command[S, 1]: 53 20 20
response: 41 56 52 4E 4F 43 44 41

command[B, 1]: 42 62 FF 20 20
response: 41

command[q, 1]: 71 7A 20 20
response: CE 41
Hardware Version: 0xce

command[q, 1]: 71 7B 20 20
response: 80 41
Software Version: 0x80

command[F, 1]: 46 20 20
response: 00 04 C1 41
Automatic device detection:
command[q, 1]: 71 A7 20 20
response: 3F 41

command[F, 1]: 46 20 20
response: 00 F1 F6 41

command[q, 1]: 71 A8 20 20
response: 10 41

command[q, 1]: 71 A9 20 20
response: 78 41

command[q, 1]: 71 AA 20 20
response: 09 41
JTAG id = 0x978103F : Ver = 0x0 : Device = 0x9781 : Manuf = 0x1f
Reported JTAG device ID: 0x9781
Configured for device ID: 0x9781 at90can128

command[�, 1]: A0 FF FF FF F1 DF 7C BB E8 FF FF FF F1 DF 7C BB E8 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 C3 33 BF F7 3F F7 3F
00 00 4D 1F 77 77 00 FF FF FF FF 07 43 C3 33 BC 77 77 F7 3F 00 00 4D 1F 
00 00 00 CD 3C F0 FF 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
22 57 3B 00 01 08 00 FE 00 00 FA 20 20
response: 41
JTAG config complete.
Preparing the target device for On Chip Debugging.

command[B, 1]: 42 86 FF 20 20
response: 41

command[�, 1]: A3 20 20
response: 41
jtagRead
command[R, 1]: 52 B3 00 00 00 00 20 20
response: FF 00 41

Disabling lock bits:
  LockBits -> 0xff

Enabling on-chip debugging:
jtagRead
command[R, 1]: 52 B2 02 00 00 00 20 20
response: FF 1D F7 00 41
  Extended Fuse byte -> 0xf7
      High Fuse byte -> 0x1d
       Low Fuse byte -> 0xff

command[�, 1]: A4 20 20
response: 41

command[x, 1]: 78 20 20
response:
41

command[B, 1]: 42 A0 00 20 20
response: 41

command[x, 1]: 78 20 20
response: 41
Waiting for connection on port 4242.
Connection opened by host 127.0.0.1, port 45570.
GDB: <Hc-1>
->GDB:
GDB: <qC>
->GDB:
GDB: <qOffsets>
->GDB:
GDB: <?>
->GDB: S05
GDB: <Hg0>
->GDB:
GDB: <p22>
->GDB:
GDB: <g>

GDB: (Registers)Read 32 bytes from 0x800000
jtagRead
command[R, 1]: 52 20 1F 00 00 00 20 20
response: 00 00 41
Timed Out (partial response)
JTAG ICE communication failed

von MatthiasR (Gast)


Lesenswert?

Eine Lösung habe ich leider auch nicht, aber ich kann das Problem 
bestätigen:

Ich erhalte die gleiche Fehlermeldung mit einem AT90CAN128 an einem 
selbstgebauten JTAGICE MkI-Clone. Ein paar Daten:

- JTAGICE ähnlich JTAG-Teil vom Evertool + FT232B
- Firmware aus AVRStudio 4.12 SP2 (Build 472)
- avarice 2.7
- Download/Verify über JTAG mit Avarice funktioniert
- Debugging mit AVRStudio habe ich zwar nicht ausgiebig getestet, 
scheint aber zu funktionieren
- Debugging mit Avarice bricht mit der Fehlermeldung "Timed Out (partial 
response) JTAG ICE communication failed" ab

Ich hatte erst den Verdacht, dass es Probleme mit dem 
USB-RS232-Konverter gibt. Handelt es sich bei dem Olimex-Jtag-Ice MK1 um 
die "normale" RS232-Ausführung? - Dann hätte es offensichtlich nichts 
damit zu tun, ob es über eine "echte" RS232 oder über einen FT232 
geht...

Hier nochmal ein (etwas gekürztes) Avarice-log (vielleicht kann ja 
jemand, der sich mit den "Innereien" von Avarice auskennt, etwas damit 
anfangen):
1
AVaRICE version 2.7, Nov  8 2007 19:57:44
2
3
Defaulting JTAG bitrate to 1 MHz. Make sure that the target
4
frequency is at least 4 MHz or you will likely encounter failures
5
controlling the target.
6
7
JTAG config starting.
8
Attempting synchronisation at bitrate 115200
9
10
command[S, 1]: 53 45 20 20
11
Out of sync, reponse was `00'
12
13
command[S, 1]: 53 20 20
14
Out of sync, reponse was `e0'
15
16
command[S, 2]: 53 45 20 20
17
Out of sync, reponse was `e0'
18
19
command[S, 1]: 53 20 20
20
Out of sync, reponse was `e0'
21
22
command[S, 3]: 53 45 20 20
23
Out of sync, reponse was `e0'
24
25
command[S, 1]: 53 20 20
26
Out of sync, reponse was `e0'
27
Attempting synchronisation at bitrate 19200
28
29
command[S, 1]: 53 45 20 20
30
Out of sync, reponse was `e0'
31
32
command[S, 1]: 53 20 20
33
response: 41 56 52 4E 4F 43 44 41
34
35
command[B, 1]: 42 62 FF 20 20
36
response: 41
37
38
command[q, 1]: 71 7A 20 20
39
response: CC 41
40
Hardware Version: 0xcc
41
42
command[q, 1]: 71 7B 20 20
43
response: 7F 41
44
Software Version: 0x7f
45
46
command[F, 1]: 46 20 20
47
response: 00 02 9D 41
48
Automatic device detection:
49
command[q, 1]: 71 A7 20 20
50
response: 3F 41
51
52
command[F, 1]: 46 20 20
53
response: 00 02 9D 41
54
55
command[q, 1]: 71 A8 20 20
56
response: 10 41
57
58
command[q, 1]: 71 A9 20 20
59
response: 78 41
60
61
command[q, 1]: 71 AA 20 20
62
response: 09 41
63
JTAG id = 0x978103F : Ver = 0x0 : Device = 0x9781 : Manuf = 0x1f
64
Reported JTAG device ID: 0x9781
65
Configured for device ID: 0x9781 at90can128
66
67
 [...]
68
69
command[x, 1]: 78 20 20
70
response: 41
71
Waiting for connection on port 4242.
72
Connection opened by host 127.0.0.1, port 16947.
73
GDB: <Hc-1>
74
->GDB:
75
GDB: <qC>
76
->GDB:
77
GDB: <qOffsets>
78
->GDB:
79
GDB: <?>
80
->GDB: S05
81
GDB: <Hg0>
82
->GDB:
83
GDB: <p22>
84
->GDB:
85
GDB: <g>
86
87
GDB: (Registers)Read 32 bytes from 0x800000
88
jtagRead
89
command[R, 1]: 52 20 1F 00 00 00 20 20
90
response: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41
91
jtagRead
92
command[R, 1]: 52 20 02 00 00 5D 20 20
93
response: 00 00 00 00 41
94
95
command[2, 1]: 32 20 20
96
response: 00 00 01 41
97
PC = 0
98
->GDB: 000000000000000000000000000000000000000000000000000000000000000000000000000000
99
GDB: <qSymbol::>
100
->GDB:
101
GDB: <Z0,1ba,2>
102
BP ADD type: 1  addr: 0x1ba  ADDED
103
->GDB: OK
104
GDB: <vCont?>
105
->GDB:
106
GDB: <Hc0>
107
->GDB:
108
GDB: <c>
109
updateBreakpoints
110
jtagWrite
111
command[W, 1]: 57 60 00 00 00 DD 20 20
112
response:
113
114
command[h, 1]: 68 00 20 20
115
response: 41
116
117
command[G, 1]: 47 20 20
118
response:
119
Waiting for input.
120
JTAG box sent B: Break Status Register = 0x0020
121
122
command[2, 1]: 32 20 20
123
response: 00 00 DE 41
124
jtagRead
125
command[R, 1]: 52 20 02 00 00 5D 20 20
126
response: 00 00 00 00 41
127
->GDB: T0520:00;21:0000;22:ba010000;
128
GDB: <z0,1ba,2>
129
BP DEL type: 1  addr: 0x1ba REMOVED 0
130
->GDB: OK
131
GDB: <m1b2,27>
132
133
GDB: Read 39 bytes from 0x1B2
134
jtagRead
135
command[R, 1]: 52 A0 13 00 00 D9 20 20
136
response: EF CA E1 D0 BF DE BF CD 94 0E 00 BA 94 0E 01 31 94 0E 02 B6 94 0E 07 9D 94 0E 02 D8 94 78 E0 80 E0 91 94 0E 00 C9 E1 84 00 41
137
->GDB: caefd0e1debfcdbf0e94ba000e9431010e94b6020e949d070e94d802789480e091e00e94c90084
138
GDB: <m1d9,19>
139
140
GDB: Read 25 bytes from 0x1D9
141
jtagRead
142
command[R, 1]: 52 A0 0C 00 00 EC 20 20
143
response: E1 84 E0 91 94 0E 00 C9 01 8E 5F 0F 4F 1F 91 80 0C 82 23 88 F3 E1 91 80 0C 60 00 41
144
->GDB: e191e00e94c9008e010f5f1f4f8091820c8823e1f38091600c
145
GDB: <Hc0>
146
->GDB:
147
GDB: <s>
148
149
command[1, 1]: 31 20 20
150
response: 41
151
152
command[2, 1]: 32 20 20
153
response: 00 00 BB 41
154
155
command[2, 1]: 32 20 20
156
response: 00 00 BB 41
157
jtagRead
158
command[R, 1]: 52 20 02 00 00 5D 20 20
159
response: 00 00 00 00 41
160
->GDB: T0520:00;21:0000;22:74010000;
161
GDB: <m800001,2>
162
163
GDB: Read 2 bytes from 0x800001
164
jtagRead
165
command[R, 1]: 52 20 01 00 00 01 20 20
166
response: 00 00 00 41
167
->GDB: 0000
168
GDB: <Z0,1ba,2>
169
BP ADD type: 1  addr: 0x1ba  ADDED
170
->GDB: OK
171
GDB: <Hc0>
172
->GDB:
173
GDB: <s>
174
175
command[1, 1]: 31 20 20
176
response: 41
177
178
command[2, 1]: 32 20 20
179
response: 00 00 BC 41
180
181
command[2, 1]: 32 20 20
182
response: 00 00 BC 41
183
jtagRead
184
command[R, 1]: 52 20 02 00 00 5D 20 20
185
response: 00 00 00 00 41
186
->GDB: T0520:00;21:0000;22:76010000;
187
GDB: <s>
188
189
command[1, 1]: 31 20 20
190
response: 41
191
192
command[2, 1]: 32 20 20
193
response: 00 00 BE 41
194
195
command[2, 1]: 32 20 20
196
response: 00 00 BE 41
197
jtagRead
198
command[R, 1]: 52 20 02 00 00 5D 20 20
199
response: 00 00 00 00 41
200
->GDB: T0520:00;21:0000;22:7a010000;
201
GDB: <m174,27>
202
203
GDB: Read 39 bytes from 0x174
204
jtagRead
205
command[R, 1]: 52 A0 13 00 00 BA 20 20
206
response: E3 83 93 80 00 CC E1 88 93 80 00 C9 95 08 2F 98 91 80 00 C8 FF 85 CF FC 93 90 00 CE 95 08 93 CF 93 DF 01 FC 81 80 23 88 00 41
207
->GDB: 83e38093cc0088e18093c9000895982f8091c80085fffccf9093ce000895cf93df93fc01808188
208
GDB: <m19b,19>
209
210
GDB: Read 25 bytes from 0x19B
211
jtagRead
212
command[R, 1]: 52 A0 0C 00 00 CD 20 20
213
response: 23 88 F0 39 01 EF 94 0E 00 C1 81 89 96 21 23 88 F7 D1 91 DF 91 CF 95 08 EF CA 00 41
214
->GDB: 2339f0ef010e94c100898121968823d1f7df91cf910895caef
215
GDB: <m800001,2>
216
217
GDB: Read 2 bytes from 0x800001
218
jtagRead
219
command[R, 1]: 52 20 01 00 00 01 20 20
220
response: 00 00 00 41
221
->GDB: 0000
222
GDB: <z0,1ba,2>
223
BP DEL type: 1  addr: 0x1ba REMOVED 0
224
->GDB: OK
225
GDB: <Z0,1ba,2>
226
BP ADD type: 1  addr: 0x1ba  ADDED
227
->GDB: OK
228
GDB: <s>
229
230
command[1, 1]: 31 20 20
231
response: 41
232
233
command[2, 1]: 32 20 20
234
response: 00 00 BF 41
235
236
command[2, 1]: 32 20 20
237
response: 00 00 BF 41
238
jtagRead
239
command[R, 1]: 52 20 02 00 00 5D 20 20
240
response: 00 00 41
241
Timed Out (partial response)
242
JTAG ICE communication failed

von Frank W. (Firma: DB1FW) (frankw) Benutzerseite


Lesenswert?

Hallo !


MatthiasR wrote:
> Ich hatte erst den Verdacht, dass es Probleme mit dem
> USB-RS232-Konverter gibt. Handelt es sich bei dem Olimex-Jtag-Ice MK1 um
> die "normale" RS232-Ausführung? - Dann hätte es offensichtlich nichts
> damit zu tun, ob es über eine "echte" RS232 oder über einen FT232
> geht...


Mein Olimex-Jtag-Ice MK1 ist die "normale RS232-Ausführung".

Ich hatte folgenden Aufbau :

1)  Linux Rechner mit avarice - direkt seriell angeschlossen.
    Fehler tritt auf

2 ) Windows Rechner mit avrstudio - über USB-RS232-Konvertert 
angeschlossen
    Debuggen funktioniert.

Es scheint also als ob der USB-RS232 Konvertert nicht der Grund für 
unser Problem ist.


Ich hatte Kontakt mit einem avarice Entwickler.
Er würde versuchen den Bug zu finden und den avarice anzupassen.
Dazu braucht er aber Unterstützung.
Wir brauchen ein logging der Kommunikation "PC<->JTAG-Ice" von der 
seriellen Schnittstelle bei der funktionierenden Verwendung mit den 
AVR-Studio und dem at90can128.

Wenn er so ein Logging hat würde er schauen was bei der Komunikation 
AVR-Studio <-> ICE anders ist als bei   avarice <->  ice.

Mein Problem ist - ich habe keine Ahnung wie man ein logging der 
seriellen Komunikation  AVR-Studio <-> ICE   bekommen kann.

Hat jemand ne Idee ?

Gruss
Frank

von Martin T. (mthomas) (Moderator) Benutzerseite


Lesenswert?


von Frank W. (Firma: DB1FW) (frankw) Benutzerseite


Lesenswert?

Martin Thomas wrote:
> http://www.microsoft.com/germany/technet/sysinternals/utilities/Portmon.mspx


Na das sieht doch mal gut aus !!!
Werde ich heute abend testen.

Danke

von Thomas Sauter (Gast)


Lesenswert?

Hallo zusammen,

habe genau das selbe Problem. Habt Ihr eine Lösung gefunden?

Gruß,

Thomas

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.