Hi all!

I'm interested in using the JTAGICE3 for programming (with avrdude) and 
debugging (with avarice). After setting up appropriate udev rules, programming 
works fine, but debugging seems to be limited to some very basic operations. 
Since there is no "official" avarice release including JTAGICE3 support yet, 
I'm not sure what is already supposed to work. Here is what I did and what I 
got (with svn://svn.code.sf.net/p/avarice/code/trunk/avarice, revision 343):

1.) executed "avarice --jtag3 --debugwire :4242" -> output:

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.

2.) executed "avr-gdb Debug/avrtest.elf" (a simple test program compiled with 
eclipse)

3.) executed "target remote :4242" in the gdb shell

4.) executed "stepi" and "info registers pc" in the gdb shell several times -> 
the program counter is increased as expected

5.) executed "continue" in the gdb shell -> the program runs on the ATmega328P 
(verified by the LEDs connected to it)

So far it works, but when I try to set a breakpoint and continue the program 
then, avarice prints the message "USB bulk write error: Connection timed out", 
and avr-gdb reports "Remote communication error. Target disconnected.". When I 
try to restart avarice, it prints "cannot read serial number "Connection timed 
out"". Only after disconnecting and reconnecting the USB cable from the 
JTAGICE3, I can repeat the above sequence at step 1.)

Using the --debug option for avarice produces tons of extra output (which I 
can provide if needed), one interesting bit are some version numbers included 
in the output:
ICE hardware version: 2
ICE firmware version: 1.37 (rel. 191)

>From the above observations I conclude that the debugWIRE connection basically 
works, but more advanced features such as breakpoints are not yet (correctly) 
supported. I therefore have the following questions:

1.) Is there something wrong with the usage of avarice/avr-gdb for debugging 
on an ATmega328P in the above example?

2.) Is a JTAGICE3 firmware upgrade required for avarice to work properly?

3.) Is debugging on an ATmega328P with avarice/avr-gdb already supposed to 
work, and did anybody succeed in running a useful debugging session with this 
configuration?

4.) According to "http://sourceforge.net/p/avarice/code/HEAD/tree";, the most 
recent modification is from June 2013. What are the future plans for avarice 
development?

If this configuration is indeed not yet supported, I'd be happy to help if I 
can (I have some experience with low level USB programming).


        Thanks & kind regards,
               Markus


------------------------------------------------------------------------------
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
avarice-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avarice-user

Reply via email to