Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I've got an Arduino Duemilanove and am programming it in C with AVR Studio. Is there any way to get a source level debugger to work with this setup?

share|improve this question
While you may have valid reasons for wanting source level debug, I would recommend not to become reliant on it. Most microcontrollers do not support interactive debugging and relying on it may restrict your choices in future. JTAG debugging is slow, so will usually interfere with real-time tasks. Where possible, use LEDs and UARTs for debug. Write portable code so that the bulk of the logic can be debugged on a PC. – Toby Jaffey Oct 16 '11 at 20:13
That is good advice Joby. I tend to treat source level debug as a nice to have, not an essential. I develop already like you say, keep it portable, debug most of the PC. Sometimes it's good to be able to just set a breakpoint and examine and change the variables there without having to add debug prints, recompile, redownload etc. – fred basset Oct 16 '11 at 20:19
I hope this isn't off topic but AVR Studio is Visual Studio. The Arduino Plugin for Visual Studio Pro has a unique Arduino Debugger. It's free at the moment and doesn't require any additional hardware to work so it's easy to try it out. – Visual Micro Oct 21 '12 at 1:09

1 Answer

up vote 1 down vote accepted

Yes, some AVRs provide JTAG which can be used with AVR-GDB to do source level debug.

http://winavr.sourceforge.net/AVR-GDB_and_AVaRICE_Guide.pdf

http://www.larsen-b.com/Article/315.html

share|improve this answer
Thanks, so you definitely need an AVR chip with a JTAG interface to get src level debug? – fred basset Oct 16 '11 at 19:29
I believe so, yes. – Toby Jaffey Oct 16 '11 at 19:38
Do you know if any of the standard Ardunio boards have a JTAG port? – fred basset Oct 16 '11 at 19:40
The microcontroller on the arduino.cc/en/Main/ArduinoBoardMega claims to support JTAG – Toby Jaffey Oct 16 '11 at 20:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.