avarice with avr-gdb

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I have a problem using avarice with avr-gdb.

Once this was working, but now I tried multiple times and I always receive this "Remote connection closed" message immediately after I start the remote connection to avarice with avr-gdb.

I see that the sw is running on the atmega32, because the LEDs are blinking.

 

avarice command and output:

[faeren@archlinux avarice-svn]$ avarice -1 -j /dev/ttyUSB0 :4242 -P atmega32 -d
AVaRICE version 2.14svn20200906, Sep  9 2020 14:10:27

Defaulting JTAG bitrate to 250 kHz.

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
Timed out.

command[ , 2]: 20

command[q, 3]: 71 7A 20 20
response: C0 41
Hardware Version: 0xc0

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

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

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

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

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

command[q, 1]: 71 AA 20 20
response: 49 41
JTAG id = 0x4950203F : Ver = 0x4 : Device = 0x9502 : Manuf = 0x1f
Reported JTAG device ID: 0x9502
Looking for device: atmega32
Configured for device ID: 0x9502 atmega32 -- Matched with atmega32

command[�, 1]: A0 FF 6F FF FF FF FF FF FF FF 66 FF FF FF FF BF FA 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 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 57 00 80 00 04 00 3F 00 00 00 20 20
response: 41
JTAG config complete.
Preparing the target device for On Chip Debugging.

command[B, 1]: 42 86 FD 20 20
response: 41
jtagRead
command[R, 1]: 52 B2 02 00 00 00 20 20
response: FF FF FF 00 41

Enabling on-chip debugging:
jtagWrite
command[W, 1]: 57 B2 00 00 00 01 20 20
response:

command[h, 1]: 68 7F 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 54286.
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[R, 1]: 52 20 1F 00 00 00 20 20
response: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 00 46

 

avr-gdb command and output:

[faeren@archlinux WellAVRsw]$ avr-gdb main.elf
GNU gdb (GDB) 9.2
Copyright (C) 2020 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/....
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/....

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from main.elf...
(gdb) target remote localhost:4242
Remote debugging using localhost:4242
Remote connection closed
(gdb)

 

Thanks for you support!