Hello,
I'm trying to debug an AVR Atmega328p with the Atmel ICE using debugWire.
I'm able to connect to the debugger, open the file with Avr-gdb, and go
through the code. But after setting up breakpoints and 'continue', the
program doesn't on them. If I interrupt and go through the instructions i'm
able to see the break message. Don't know if is a problem with AVARICE, or
AVR-GDB, or is that I'm doing something wrong. Could you help me with this?
The versions running:
AVARICE 2.13svn20160229
AVR-GCC 6.3.0
AVR-GDB 7.12.1
AVARICE debug output
********************************************************************
AVaRICE version 2.13svn20160229, Apr 28 2017 19:48:31
Found HID PID:VID 0x03eb:0x2141, serno J41800000668
Probing for HID max. packet size
Setting max. packet size to 512 from DAP_Info
JTAG config starting.
HID thread started
command "sign-on" [0x01, 0x10]
0E 00 00 00 01 10 00
Received 0x81 0x11 0x00 0x06 0x0e 0x00
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
Received 0x81 0x11 0x00 0x12 0x0e 0x01
read: 0e 01 00 00 81 00 4a 34 31 38 30 30 30 30 30 36 36 38
Got message seqno 1 (command_sequence == 1)
response: 00 81 00 4A 34 31 38 30 30 30 30 30 36 36 38
Found a device, serial number: J41800000668
command "get parameter" [0x01, 0x02]
0E 00 02 00 01 02 00 00 00 05
Received 0x81 0x11 0x00 0x0c 0x0e 0x02
read: 0e 02 00 01 84 01 00 01 26 81 00 00
Got message seqno 2 (command_sequence == 2)
response: 01 84 01 00 01 26 81 00 00
ICE hardware version: 0
ICE firmware version: 1.38 (rel. 129)
command "set parameter" [0x12, 0x01]
0E 00 03 00 12 01 00 00 00 01 01
Received 0x81 0x11 0x00 0x06 0x0e 0x03
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
Received 0x81 0x11 0x00 0x06 0x0e 0x04
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
Received 0x81 0x11 0x00 0x06 0x0e 0x05
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
Received 0x81 0x11 0x00 0x0b 0x0e 0x06
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
Reported device ID: 0x950F
Configured for device ID: 0x950F atmega328p
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
Received 0x81 0x11 0x00 0x06 0x0e 0x07
read: 0e 07 00 12 80 00
Got message seqno 7 (command_sequence == 7)
response: 12 80 00
JTAG config complete.
Preparing the target device for On Chip Debugging.
command "set parameter" [0x12, 0x01]
0E 00 08 00 12 01 00 03 00 01 00
Received 0x81 0x11 0x00 0x06 0x0e 0x08
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
Received 0x81 0x11 0x00 0x06 0x0e 0x09
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
Received 0x81 0x11 0x00 0x06 0x0e 0x0a
read: 0e 0a 00 12 80 00
Got message seqno 10 (command_sequence == 10)
response: 12 80 00
read: 0e 00 2c 00 12 40 44 00 00 00 01 00 00 30
Event serial 0x002c
ignoring break event
Waiting for connection on port 4242.
Connection opened by host 127.0.0.1, port 50318.
GDB:
<qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+>
->GDB: qXfer:memory-map:read+
GDB: <vMustReplyEmpty>
->GDB:
GDB: <Hg0>
->GDB:
GDB: <qTStatus>
->GDB:
GDB: <?>
->GDB: S05
GDB: <qfThreadInfo>
->GDB:
GDB: <qL1160000000000000000>
->GDB:
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 2d 00 12 40 00 00 00 00 01 00 00 30
Event serial 0x002d
Got message seqno 65535 (command_sequence == 11)
got asynchronous event: 0x12, 0x40
Received 0x81 0x11 0x00 0x27 0x0e 0x0b
read: 0e 0b 00 12 84 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 ff 08 60 00 00
Got message seqno 11 (command_sequence == 11)
response: 12 84 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 FF 08 60 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0C 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x0c
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
Received 0x81 0x11 0x00 0x0a 0x0e 0x0d
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:
00000000000000000000000000000000000000000000000000000000ff08600000ff0800000000
GDB: <qL1160000000000000000>
->GDB:
GDB: <qSymbol::>
->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: <m82,2>
GDB: Read 2 bytes from 0x82
jtagRead
command "read memory" [0x12, 0x21]
0E 00 0E 00 12 21 00 B0 80 00 00 00 80 00 00 00
Received 0x81 0x11 0x00 0x87 0x0e 0x0e
read: 0e 0e 00 12 84 00 3d 9a 45 9a 00 00 45 98 00 00 fb cf f8 94 ff cf ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff 00
Got message seqno 14 (command_sequence == 14)
response: 12 84 00 3D 9A 45 9A 00 00 45 98 00 00 FB CF F8 94 FF CF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF 00
->GDB: 459a
GDB: <m86,2>
GDB: Read 2 bytes from 0x86
jtagRead ->GDB: 4598
GDB: <Z1,82,2>
BP ADD type: 1 addr: 0x82 ->GDB: OK
GDB: <Z1,86,2>
BP ADD type: 1 addr: 0x86 ->GDB: OK
GDB: <vCont?>
->GDB:
GDB: <Hc0>
->GDB:
GDB: <c>
Breakpoint added in ICE. slot: 0 type: 1 addr: 0x82
command "set BP" [0x12, 0x43]
0E 00 0F 00 12 43 00 82 00 00 00
Received 0x81 0x11 0x00 0x06 0x0e 0x0f
read: 0e 0f 00 12 80 00
Got message seqno 15 (command_sequence == 15)
response: 12 80 00
Breakpoint added in ICE. slot: 0 type: 1 addr: 0x86
command "set BP" [0x12, 0x43]
0E 00 10 00 12 43 00 86 00 00 00
Received 0x81 0x11 0x00 0x06 0x0e 0x10
read: 0e 10 00 12 80 00
Got message seqno 16 (command_sequence == 16)
response: 12 80 00
command "go" [0x12, 0x32]
0E 00 11 00 12 32 00
Received 0x81 0x11 0x00 0x07 0x0e 0x11
read: 0e 11 00 12 a0 00 10
Got message seqno 17 (command_sequence == 17)
response: 12 A0 00 10
command "go" [0x12, 0x32]
0E 00 12 00 12 32 00
Received 0x81 0x11 0x00 0x06 0x0e 0x12
read: 0e 12 00 12 80 00
Got message seqno 18 (command_sequence == 18)
response: 12 80 00
Waiting for input.
interrupted by GDB
command "stop" [0x12, 0x31]
0E 00 13 00 12 31 00 01
Received 0x81 0x11 0x00 0x06 0x0e 0x13
read: 0e 13 00 12 80 00
Got message seqno 19 (command_sequence == 19)
response: 12 80 00
read: 0e 00 2e 00 12 40 44 00 00 00 01 00 00 45
Event serial 0x002e
ignoring break event
jtagRead
command "read memory" [0x12, 0x21]
0E 00 14 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x14
read: 0e 14 00 12 84 00 fd 08 00 00
Got message seqno 20 (command_sequence == 20)
response: 12 84 00 FD 08 00 00
->GDB: T0220:00;21:fd08;22:00000000;
GDB: <qL1160000000000000000>
->GDB:
GDB: <z1,82,2>
BP DEL type: 1 addr: 0x82 DISABLED
->GDB: OK
GDB: <z1,86,2>
BP DEL type: 1 addr: 0x86 DISABLED
->GDB: OK
GDB: <Z1,82,2>
BP ADD type: 1 addr: 0x82 ENABLED
->GDB: OK
GDB: <Z1,86,2>
BP ADD type: 1 addr: 0x86 ENABLED
->GDB: OK
GDB: <s>
command "single-step" [0x12, 0x34]
0E 00 15 00 12 34 00 01 01
Received 0x81 0x11 0x00 0x06 0x0e 0x15
read: 0e 15 00 12 80 00
Got message seqno 21 (command_sequence == 21)
response: 12 80 00
read: 0e 00 2f 00 12 40 45 00 00 00 01 00 00 45
Event serial 0x002f
ignoring break event
command "read PC" [0x12, 0x35]
0E 00 16 00 12 35 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x16
read: 0e 16 00 12 83 00 45 00 00 00
Got message seqno 22 (command_sequence == 22)
response: 12 83 00 45 00 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 17 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x17
read: 0e 17 00 12 84 00 fd 08 00 00
Got message seqno 23 (command_sequence == 23)
response: 12 84 00 FD 08 00 00
->GDB: T0520:00;21:fd08;22:8a000000;
GDB: <m80,a>
GDB: Read 10 bytes from 0x80
jtagRead ->GDB: 3d9a459a000045980000
GDB: <m8008fe,2>
GDB: Read 2 bytes from 0x8008FE
jtagRead
command "read memory" [0x12, 0x21]
0E 00 18 00 12 21 00 20 FE 08 00 00 02 00 00 00
Received 0x81 0x11 0x00 0x09 0x0e 0x18
read: 0e 18 00 12 84 00 00 3c 00
Got message seqno 24 (command_sequence == 24)
response: 12 84 00 00 3C 00
->GDB: 003c
GDB: <m68,10>
GDB: Read 16 bytes from 0x68
jtagRead
command "read memory" [0x12, 0x21]
0E 00 19 00 12 21 00 B0 00 00 00 00 80 00 00 00
Received 0x81 0x11 0x00 0x87 0x0e 0x19
read: 0e 19 00 12 84 00 0c 94 34 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c
94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94
3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e
00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 0c 94 3e 00
0c 94 3e 00 0c 94 3e 00 0c 94 3e 00 11 24 1f be cf ef d8 e0 de bf cd bf 0e
94 40 00 0c 94 46 00 0c 94 00 00 00
Got message seqno 25 (command_sequence == 25)
response: 12 84 00 0C 94 34 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E
00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00
0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C
94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94 3E 00 0C 94
3E 00 0C 94 3E 00 0C 94 3E 00 11 24 1F BE CF EF D8 E0 DE BF CD BF 0E 94 40
00 0C 94 46 00 0C 94 00 00 00
->GDB: 11241fbecfefd8e0debfcdbf0e944000
GDB: <qL1160000000000000000>
->GDB:
GDB: <z1,82,2>
BP DEL type: 1 addr: 0x82 DISABLED
->GDB: OK
GDB: <z1,86,2>
BP DEL type: 1 addr: 0x86 DISABLED
->GDB: OK
GDB: <Z1,82,2>
BP ADD type: 1 addr: 0x82 ENABLED
->GDB: OK
GDB: <Z1,86,2>
BP ADD type: 1 addr: 0x86 ENABLED
->GDB: OK
GDB: <s>
command "single-step" [0x12, 0x34]
0E 00 1A 00 12 34 00 01 01
Received 0x81 0x11 0x00 0x06 0x0e 0x1a
read: 0e 1a 00 12 80 00
Got message seqno 26 (command_sequence == 26)
response: 12 80 00
read: 0e 00 30 00 12 40 41 00 00 00 01 00 00 3e
Event serial 0x0030
ignoring break event
command "read PC" [0x12, 0x35]
0E 00 1B 00 12 35 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x1b
read: 0e 1b 00 12 83 00 41 00 00 00
Got message seqno 27 (command_sequence == 27)
response: 12 83 00 41 00 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 1C 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x1c
read: 0e 1c 00 12 84 00 fd 08 00 00
Got message seqno 28 (command_sequence == 28)
response: 12 84 00 FD 08 00 00
->GDB: T0520:00;21:fd08;22:82000000;
GDB: <m80,2>
GDB: Read 2 bytes from 0x80
jtagRead
command "read memory" [0x12, 0x21]
0E 00 1D 00 12 21 00 B0 80 00 00 00 80 00 00 00
Received 0x81 0x11 0x00 0x87 0x0e 0x1d
read: 0e 1d 00 12 84 00 3d 9a 45 9a 00 00 45 98 00 00 fb cf f8 94 ff cf ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff 00
Got message seqno 29 (command_sequence == 29)
response: 12 84 00 3D 9A 45 9A 00 00 45 98 00 00 FB CF F8 94 FF CF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF 00
->GDB: 3d9a
GDB: <qL1160000000000000000>
->GDB:
GDB: <z1,82,2>
BP DEL type: 1 addr: 0x82 DISABLED
->GDB: OK
GDB: <z1,86,2>
BP DEL type: 1 addr: 0x86 DISABLED
->GDB: OK
GDB: <Z1,86,2>
BP ADD type: 1 addr: 0x86 ENABLED
->GDB: OK
GDB: <Hc0>
->GDB:
GDB: <s>
command "single-step" [0x12, 0x34]
0E 00 1E 00 12 34 00 01 01
Received 0x81 0x11 0x00 0x06 0x0e 0x1e
read: 0e 1e 00 12 80 00
Got message seqno 30 (command_sequence == 30)
response: 12 80 00
read: 0e 00 31 00 12 40 42 00 00 00 01 00 00 45
Event serial 0x0031
ignoring break event
command "read PC" [0x12, 0x35]
0E 00 1F 00 12 35 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x1f
read: 0e 1f 00 12 83 00 42 00 00 00
Got message seqno 31 (command_sequence == 31)
response: 12 83 00 42 00 00 00
jtagRead
command "read memory" [0x12, 0x21]
0E 00 20 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x20
read: 0e 20 00 12 84 00 fd 08 00 00
Got message seqno 32 (command_sequence == 32)
response: 12 84 00 FD 08 00 00
->GDB: T0520:00;21:fd08;22:84000000;
GDB: <m80,4>
GDB: Read 4 bytes from 0x80
jtagRead ->GDB: 3d9a459a
GDB: <Z1,82,2>
BP ADD type: 1 addr: 0x82 ENABLED
->GDB: OK
GDB: <Hc0>
->GDB:
GDB: <c>
command "go" [0x12, 0x32]
0E 00 21 00 12 32 00
Received 0x81 0x11 0x00 0x06 0x0e 0x21
read: 0e 21 00 12 80 00
Got message seqno 33 (command_sequence == 33)
response: 12 80 00
Waiting for input.
interrupted by GDB
command "stop" [0x12, 0x31]
0E 00 22 00 12 31 00 01
Received 0x81 0x11 0x00 0x06 0x0e 0x22
read: 0e 22 00 12 80 00
Got message seqno 34 (command_sequence == 34)
response: 12 80 00
read: 0e 00 32 00 12 40 44 00 00 00 01 00 00 45
Event serial 0x0032
ignoring break event
jtagRead
command "read memory" [0x12, 0x21]
0E 00 23 00 12 21 00 20 5D 00 00 00 03 00 00 00
Received 0x81 0x11 0x00 0x0a 0x0e 0x23
read: 0e 23 00 12 84 00 fd 08 00 00
Got message seqno 35 (command_sequence == 35)
response: 12 84 00 FD 08 00 00
->GDB: T0220:00;21:fd08;22:84000000;
GDB: <m80,4>
GDB: Read 4 bytes from 0x80
jtagRead ->GDB: 3d9a459a
GDB: <qL1160000000000000000>
->GDB:
GDB: <z1,82,2>
BP DEL type: 1 addr: 0x82 DISABLED
->GDB: OK
GDB: <z1,86,2>
BP DEL type: 1 addr: 0x86 DISABLED
->GDB: OK
GDB: <vKill;a410>
->GDB:
GDB: <k>
gdb exited.
command "cleanup" [0x12, 0x45]
0E 00 24 00 12 45 00
Received 0x81 0x11 0x00 0x06 0x0e 0x24
read: 0e 24 00 12 80 00
Got message seqno 36 (command_sequence == 36)
response: 12 80 00
command "go" [0x12, 0x32]
0E 00 25 00 12 32 00
Received 0x81 0x11 0x00 0x07 0x0e 0x25
read: 0e 25 00 12 a0 00 10
Got message seqno 37 (command_sequence == 37)
response: 12 A0 00 10
command "go" [0x12, 0x32]
0E 00 26 00 12 32 00
Received 0x81 0x11 0x00 0x06 0x0e 0x26
read: 0e 26 00 12 80 00
Got message seqno 38 (command_sequence == 38)
response: 12 80 00
command "stop debugging" [0x12, 0x14]
0E 00 27 00 12 14 00
Received 0x81 0x11 0x00 0x06 0x0e 0x27
read: 0e 27 00 12 80 00
Got message seqno 39 (command_sequence == 39)
response: 12 80 00
command "AVR sign-off" [0x12, 0x11]
0E 00 28 00 12 11 00
Received 0x81 0x11 0x00 0x06 0x0e 0x28
read: 0e 28 00 12 80 00
Got message seqno 40 (command_sequence == 40)
response: 12 80 00
command "sign-off" [0x01, 0x11]
0E 00 29 00 01 11 00
Received 0x81 0x11 0x00 0x06 0x0e 0x29
read: 0e 29 00 01 80 00
Got message seqno 41 (command_sequence == 41)
response: 01 80 00
*******************************************************************
AVR-GDB output
*******************************************************************
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 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-pc-linux-gnu --target=avr".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from LCD.elf...done.
(gdb) target remote :4242
Remote debugging using :4242
0x00000000 in __vectors ()
(gdb) list
1 #ifndef F_CPU
2 #define F_CPU 8000000UL
3 #endif
4
5 #include <avr/io.h>
6 #include <util/delay.h>
7
8 #define _NOP() asm("nop")
9
10 __attribute__((noreturn)) int main(void) {
(gdb)
11 DDRC |= (1<<PC5);
12
13 for(;;) {
14 PORTC |= (1<<PC5);
15 _NOP();
16 PORTC &= ~(1<<PC5);
17 _NOP();
18 }
19 }
(gdb) break 14
Breakpoint 1 at 0x82: file main.c, line 14.
(gdb) hb 16
Hardware assisted breakpoint 2 at 0x86: file main.c, line 16.
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x00000082 in main at main.c:14
2 hw breakpoint keep y 0x00000086 in main at main.c:16
(gdb) cont
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
^C
Program received signal SIGINT, Interrupt.
0x00000000 in __vectors ()
(gdb) info line
Line number 19 is out of range for "main.c".
(gdb) ni
0x0000008a in main () at main.c:17
17 _NOP();
(gdb) ni
Breakpoint 1, main () at main.c:14
14 PORTC |= (1<<PC5);
(gdb) cont
Continuing.
^C
Program received signal SIGINT, Interrupt.
main () at main.c:15
15 _NOP();
(gdb) quit
A debugging session is active.
Inferior 1 [Remote target] will be killed.
Quit anyway? (y or n) y
Thanks a lot,
Alberto
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
avarice-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avarice-user