On Monday 03 February 2014 23:47:20 Knut Schwichtenberg wrote:
> Hi Markus,
> as I understand from Jörg it should work. I used avarice with M32 (Jtag)
> and XM32d4 (pdi). That took a little to work properly. I have not 328 to
> test, so there might be a problem. Please provide the debug trace as a
> bug report. Additional the avr-gdb version seems to be important.
Ok, now I launched avarice as follows:
avarice --debug --jtag3 --debugwire :4242 1> debug.log 2> debug.err
The two files created by this command are attached. avr-gdb is version 7.5.1
according to "avr-gdb --version".
This is the debugging session with avr-gdb which generated the above log
files:
grabner@mark:~/workspace/avrtest$ avr-gdb Debug/avrtest.elf
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-suse-linux-gnu --target=avr".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/mark/grabner/workspace/avrtest/Debug/avrtest.elf...done.
(gdb) target remote :4242
Remote debugging using :4242
__vectors () at ../../../libm/fplib/fp_powser.S:62
62 ../../../libm/fplib/fp_powser.S: Datei oder Verzeichnis nicht
gefunden.
(gdb) b main
warning: Can not parse XML memory map; XML support was disabled at compile
time
Breakpoint 1 at 0x306 (2 locations)
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x00000306 <main>
1.2 y 0x00000000
../../../libm/fplib/fp_powser.S:62
(gdb) c
Continuing.
Remote connection closed
(gdb)
This raises a few more questions:
*) What about this XML memory map? Could this be related to the problem?
*) It's interesting that the breakpoint gets two different addresses, is this
normal behaviour?
*) Is there a list of controllers known to work with
avarice+JTAGICE3+debugWIRE? I also have some other parts here for testing.
Thanks for your efforts & kind regards,
Markus
Found JTAG ICE, serno: J30200030256
command "sign-on" [0x01, 0x10]
0E 00 00 00 01 10 00
read: 0e 00 00 01 80 00
Got message seqno 0 (command_sequence == 0)
response: 01 80 00
command "get info (serial number)" [0x00, 0x00]
0E 00 01 00 00 00 00 81
read: 0e 01 00 00 81 00 4a 33 30 32 30 30 30 33 30 32 35 36
Got message seqno 1 (command_sequence == 1)
response: 00 81 00 4A 33 30 32 30 30 30 33 30 32 35 36
command "get parameter" [0x01, 0x02]
0E 00 02 00 01 02 00 00 00 05
read: 0e 02 00 01 84 01 02 01 25 bf 00 00
Got message seqno 2 (command_sequence == 2)
response: 01 84 01 02 01 25 BF 00 00
ICE hardware version: 2
ICE firmware version: 1.37 (rel. 191)
command "set parameter" [0x12, 0x01]
0E 00 03 00 12 01 00 00 00 01 01
read: 0e 03 00 12 80 00
Got message seqno 3 (command_sequence == 3)
response: 12 80 00
command "set parameter" [0x12, 0x01]
0E 00 04 00 12 01 00 00 01 01 02
read: 0e 04 00 12 80 00
Got message seqno 4 (command_sequence == 4)
response: 12 80 00
command "set parameter" [0x12, 0x01]
0E 00 05 00 12 01 00 01 00 01 05
read: 0e 05 00 12 80 00
Got message seqno 5 (command_sequence == 5)
response: 12 80 00
command "AVR sign-on" [0x12, 0x10]
0E 00 06 00 12 10 00 00
read: 0e 06 00 12 84 00 0f 95 00 00 00
Got message seqno 6 (command_sequence == 6)
response: 12 84 00 0F 95 00 00 00
AVR sign-on responded with device ID = 0x950F
Automatic device detection:
command "set parameter" [0x12, 0x01]
0E 00 07 00 12 01 00 02 00 1F 80 00 00 80 00 00 00 00 00 00 00 3F 00 00 00 01
00 04 04 01 01 00 00 00 00 22 21 1F 20 00 46
read: 0e 07 00 12 80 00
Got message seqno 7 (command_sequence == 7)
response: 12 80 00
command "set parameter" [0x12, 0x01]
0E 00 08 00 12 01 00 03 00 01 00
read: 0e 08 00 12 80 00
Got message seqno 8 (command_sequence == 8)
response: 12 80 00
command "start debugging" [0x12, 0x13]
0E 00 09 00 12 13 00 01
read: 0e 09 00 12 80 00
Got message seqno 9 (command_sequence == 9)
response: 12 80 00
command "reset" [0x12, 0x30]
0E 00 0A 00 12 30 00 01
read: 0e 00 00 00 12 40 05 3f 00 00 01 00 00
Event serial 0x0000
Got message seqno 65535 (command_sequence == 10)
got asynchronous event: 0x12, 0x40
read: 0e 0a 00 12 80 00
Got message seqno 10 (command_sequence == 10)
response: 12 80 00
ignoring break event
GDB: <qSupported:multiprocess+;qRelocInsn+>
->GDB: qXfer:memory-map:read+
GDB: <Hg0>
->GDB:
GDB: <?>
->GDB: S05
GDB: <Hc-1>
->GDB:
GDB: <qC>
->GDB:
GDB: <qAttached>
->GDB:
GDB: <qOffsets>
->GDB:
GDB: <g>
GDB: (Registers)Read 32 bytes from 0x800000
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0B 00 12 21 00 20 00 00 00 00 20 00 00 00
read: 0e 00 01 00 12 40 00 00 00 00 01 00 00
Event serial 0x0001
Got message seqno 65535 (command_sequence == 11)
got asynchronous event: 0x12, 0x40
read: 0e 0b 00 12 84 00 00 00 ff fe 12 ff ba 45 6b d7 f3 ff b7 bc df ff 62 01
f5 75 00 00 ff 00 00 00 03 01 11 40 00 00 00
Got message seqno 11 (command_sequence == 11)
response: 12 84 00 00 00 FF FE 12 FF BA 45 6B D7 F3 FF B7 BC DF FF 62 01 F5 75
00 00 FF 00 00 00 03 01 11 40 00 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0C 00 12 21 00 20 5D 00 00 00 03 00 00 00
read: 0e 0c 00 12 84 00 ff 08 00 00
Got message seqno 12 (command_sequence == 12)
response: 12 84 00 FF 08 00 00
command "read PC" [0x12, 0x35]
0E 00 0D 00 12 35 00
read: 0e 0d 00 12 83 00 00 00 00 00
Got message seqno 13 (command_sequence == 13)
response: 12 83 00 00 00 00 00
PC = 0
->GDB:
0000fffe12ffba456bd7f3ffb7bcdfff6201f5750000ff00000003011140000000ff0800000000
GDB: <qSymbol::>
->GDB:
GDB: <qTStatus>
->GDB:
GDB: <qXfer:memory-map:read::0,18a>
->GDB: l<memory-map>
<memory type="ram" start="0x800000" length="0x20000" />
<memory type="flash" start="0" length="0x8000">
<property name="blocksize">0x80</property>
</memory>
</memory-map>
GDB: <m306,27>
GDB: Read 39 bytes from 0x306
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0E 00 12 21 00 B0 00 03 00 00 80 00 00 00
read: 0e 0e 00 12 84 00 df 91 cf 91 08 95 cf 93 df 93 cd b7 de b7 69 df c9 df
78 94 8b e2 90 e0 2b e2 30 e0 f9 01 30 81 20 e8 23 27 fc 01 20 83 f5 cf 50 58
bb 27 aa 27 0e d0 84 c1 75 d1 30 f0 7a d1 20 f0 31 f4 9f 3f 11 f4 1e f4 6a c1
0e f4 e0 95 e7 fb 37 c1 e9 2f 86 d1 80 f3 ba 17 62 07 73 07 84 07 95 07 18 f0
71 f4 9e f5 b5 c1 0e f4 e0 95 0b 2e ba 2f a0 2d 0b 01 b9 01 90 01 0c 01 ca 01
a0 01 11 24 ff 27 00
Got message seqno 14 (command_sequence == 14)
response: 12 84 00 DF 91 CF 91 08 95 CF 93 DF 93 CD B7 DE B7 69 DF C9 DF 78 94
8B E2 90 E0 2B E2 30 E0 F9 01 30 81 20 E8 23 27 FC 01 20 83 F5 CF 50 58 BB 27
AA 27 0E D0 84 C1 75 D1 30 F0 7A D1 20 F0 31 F4 9F 3F 11 F4 1E F4 6A C1 0E F4
E0 95 E7 FB 37 C1 E9 2F 86 D1 80 F3 BA 17 62 07 73 07 84 07 95 07 18 F0 71 F4
9E F5 B5 C1 0E F4 E0 95 0B 2E BA 2F A0 2D 0B 01 B9 01 90 01 0C 01 CA 01 A0 01
11 24 FF 27 00
->GDB:
cf93df93cdb7deb769dfc9df78948be290e02be230e0f901308120e82327fc012083f5cf5058bb
GDB: <m32d,1>
GDB: Read 1 bytes from 0x32D
jtagRead ->GDB: 27
GDB: <m0,27>
GDB: Read 39 bytes from 0x0
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0F 00 12 21 00 B0 00 00 00 00 80 00 00 00
read: 0e 0f 00 12 84 00 42 c0 00 00 50 c0 00 00 4e c0 00 00 4c c0 00 00 4a c0
00 00 48 c0 00 00 46 c0 00 00 44 c0 00 00 42 c0 00 00 40 c0 00 00 3e c0 00 00
3c c0 00 00 3a c0 00 00 38 c0 00 00 36 c0 00 00 34 c0 00 00 33 c0 00 00 30 c0
00 00 2e c0 00 00 2c c0 00 00 2a c0 00 00 28 c0 00 00 26 c0 00 00 24 c0 00 00
22 c0 00 00 20 c0 00 00 05 a8 4c cd b2 d4 4e b9 38 36 a9 02 0c 50 b9 91 86 88
08 3c a6 aa aa 2a 00
Got message seqno 15 (command_sequence == 15)
response: 12 84 00 42 C0 00 00 50 C0 00 00 4E C0 00 00 4C C0 00 00 4A C0 00 00
48 C0 00 00 46 C0 00 00 44 C0 00 00 42 C0 00 00 40 C0 00 00 3E C0 00 00 3C C0
00 00 3A C0 00 00 38 C0 00 00 36 C0 00 00 34 C0 00 00 33 C0 00 00 30 C0 00 00
2E C0 00 00 2C C0 00 00 2A C0 00 00 28 C0 00 00 26 C0 00 00 24 C0 00 00 22 C0
00 00 20 C0 00 00 05 A8 4C CD B2 D4 4E B9 38 36 A9 02 0C 50 B9 91 86 88 08 3C
A6 AA AA 2A 00
->GDB:
42c0000050c000004ec000004cc000004ac0000048c0000046c0000044c0000042c0000040c000
GDB: <m27,19>
GDB: Read 25 bytes from 0x27
jtagRead ->GDB: 003ec000003cc000003ac0000038c0000036c0000034c00000
GDB: <m306,2>
GDB: Read 2 bytes from 0x306
jtagRead
command "read memory" [0x12, 0x21]
0E 00 10 00 12 21 00 B0 00 03 00 00 80 00 00 00
read: 0e 10 00 12 84 00 df 91 cf 91 08 95 cf 93 df 93 cd b7 de b7 69 df c9 df
78 94 8b e2 90 e0 2b e2 30 e0 f9 01 30 81 20 e8 23 27 fc 01 20 83 f5 cf 50 58
bb 27 aa 27 0e d0 84 c1 75 d1 30 f0 7a d1 20 f0 31 f4 9f 3f 11 f4 1e f4 6a c1
0e f4 e0 95 e7 fb 37 c1 e9 2f 86 d1 80 f3 ba 17 62 07 73 07 84 07 95 07 18 f0
71 f4 9e f5 b5 c1 0e f4 e0 95 0b 2e ba 2f a0 2d 0b 01 b9 01 90 01 0c 01 ca 01
a0 01 11 24 ff 27 00
Got message seqno 16 (command_sequence == 16)
response: 12 84 00 DF 91 CF 91 08 95 CF 93 DF 93 CD B7 DE B7 69 DF C9 DF 78 94
8B E2 90 E0 2B E2 30 E0 F9 01 30 81 20 E8 23 27 FC 01 20 83 F5 CF 50 58 BB 27
AA 27 0E D0 84 C1 75 D1 30 F0 7A D1 20 F0 31 F4 9F 3F 11 F4 1E F4 6A C1 0E F4
E0 95 E7 FB 37 C1 E9 2F 86 D1 80 F3 BA 17 62 07 73 07 84 07 95 07 18 F0 71 F4
9E F5 B5 C1 0E F4 E0 95 0B 2E BA 2F A0 2D 0B 01 B9 01 90 01 0C 01 CA 01 A0 01
11 24 FF 27 00
->GDB: cf93
GDB: <m0,2>
GDB: Read 2 bytes from 0x0
jtagRead
command "read memory" [0x12, 0x21]
0E 00 11 00 12 21 00 B0 00 00 00 00 80 00 00 00
read: 0e 11 00 12 84 00 42 c0 00 00 50 c0 00 00 4e c0 00 00 4c c0 00 00 4a c0
00 00 48 c0 00 00 46 c0 00 00 44 c0 00 00 42 c0 00 00 40 c0 00 00 3e c0 00 00
3c c0 00 00 3a c0 00 00 38 c0 00 00 36 c0 00 00 34 c0 00 00 33 c0 00 00 30 c0
00 00 2e c0 00 00 2c c0 00 00 2a c0 00 00 28 c0 00 00 26 c0 00 00 24 c0 00 00
22 c0 00 00 20 c0 00 00 05 a8 4c cd b2 d4 4e b9 38 36 a9 02 0c 50 b9 91 86 88
08 3c a6 aa aa 2a 00
Got message seqno 17 (command_sequence == 17)
response: 12 84 00 42 C0 00 00 50 C0 00 00 4E C0 00 00 4C C0 00 00 4A C0 00 00
48 C0 00 00 46 C0 00 00 44 C0 00 00 42 C0 00 00 40 C0 00 00 3E C0 00 00 3C C0
00 00 3A C0 00 00 38 C0 00 00 36 C0 00 00 34 C0 00 00 33 C0 00 00 30 C0 00 00
2E C0 00 00 2C C0 00 00 2A C0 00 00 28 C0 00 00 26 C0 00 00 24 C0 00 00 22 C0
00 00 20 C0 00 00 05 A8 4C CD B2 D4 4E B9 38 36 A9 02 0C 50 B9 91 86 88 08 3C
A6 AA AA 2A 00
->GDB: 42c0
GDB: <qTStatus>
->GDB:
GDB: <vCont?>
->GDB:
GDB: <Hc0>
->GDB:
GDB: <s>
command "single-step" [0x12, 0x34]
0E 00 12 00 12 34 00 01 01
read: 0e 12 00 12 80 00
Got message seqno 18 (command_sequence == 18)
response: 12 80 00
ignoring break event
command "read PC" [0x12, 0x35]
0E 00 13 00 12 35 00
read: 0e 00 02 00 12 40 43 00 00 00 01 00 00
Event serial 0x0002
Got message seqno 65535 (command_sequence == 19)
got asynchronous event: 0x12, 0x40
read: 0e 13 00 12 83 00 43 00 00 00
Got message seqno 19 (command_sequence == 19)
response: 12 83 00 43 00 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 14 00 12 21 00 20 5D 00 00 00 03 00 00 00
read: 0e 14 00 12 84 00 ff 08 00 00
Got message seqno 20 (command_sequence == 20)
response: 12 84 00 FF 08 00 00
->GDB: T0520:00;21:ff08;22:86000000;
GDB: <qTStatus>
->GDB:
GDB: <Z0,0,2>
BP ADD type: 1 addr: 0x0 ->GDB: OK
GDB: <Z0,306,2>
BP ADD type: 1 addr: 0x306 ->GDB: OK
GDB: <Hc0>
->GDB:
GDB: <c>
Breakpoint added in ICE. slot: 0 type: 1 addr: 0x0
command "set BP" [0x12, 0x43]
0E 00 15 00 12 43 00 00 00 00 00
read: 0e 15 00 12 80 00
Got message seqno 21 (command_sequence == 21)
response: 12 80 00
Breakpoint added in ICE. slot: 0 type: 1 addr: 0x306
command "set BP" [0x12, 0x43]
0E 00 16 00 12 43 00 06 03 00 00
read: 0e 16 00 12 80 00
Got message seqno 22 (command_sequence == 22)
response: 12 80 00
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
USB bulk write error: Connection timed out
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "go" [0x12, 0x32]
0E 00 17 00 12 32 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "stop debugging" [0x12, 0x14]
0E 00 17 00 12 14 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "AVR sign-off" [0x12, 0x11]
0E 00 17 00 12 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
command "sign-off" [0x01, 0x11]
0E 00 17 00 01 11 00
read() timed out
USB bulk read error: No such device or address (-6)
AVaRICE version 2.13svn20130629, Feb 1 2014 10:03:56
JTAG config starting.
Found a device, serial number: J30200030256
Reported device ID: 0x950F
Configured for device ID: 0x950F atmega328p
JTAG config complete.
Preparing the target device for On Chip Debugging.
Waiting for connection on port 4242.
Connection opened by host 127.0.0.1, port 45701.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
avarice-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avarice-user