Over the last two years, I have half-heartily tried to get source level debugging to work in Eclipse, first with Similavr and this year with a Dragon and real hardware. In between tries, I read articles and AVRFreak threads about other users’ experiences as well as learned how to use avr-gdb and avarice in commend windows. Finally, I got the right combination of tools, setup parameters and procedures to debug two eight bit microcontrollers in the Eclipse IDE environment. From threads on AVRFreaks, it seems that this event is a rare experience so I decided to start this thread to show what worked for me.
For my tool set, the primary difference from other articles was to choose stabs+ (stabs + gdb extensions) for the Debug Info Format and different options for the Eclipse Debug Configurations based on the information learned over the years. More details later.
My primary interest is in debugging the ATtiny and Atmega 8 bit series so I chose to use debugwire with the Dragon. I have successfully tried source-level debugging on an ATtiny84 and ATmega328 but do not know whether the procedure will work on other uCs.
For the purpose of this thread, I made the assumption that the reader has the Eclipse IDE, CDT plug-in, and avr-Eclipse plug-in installed. If not, you might be interested in the article at https://protostack.com.au/2010/12/avr-eclipse-environment-on-windows/
To get a general feel for debugging in Eclipse, check out
http://avr-eclipse.sourceforge.net/wiki/index.php/Debugging for the Eclipse IDE and
https://awtfy.com/2012/03/29/hardware-debugging-the-arduino-using-eclipse-and-the-avr-dragon/
that has added information about debugging in Arduino.
I also assume the WinAVR-20100110 set tool is used.
In the next couple of posts, I would like to present the development environment, hardware and procedure that made it work with the hope that others can try it out on different microcontrollers (uCs) and post their experiences.