Step by step debugging arduino

Hi,

I come to a point where standard serial debugging is not effective enough to debug my project. I searched but I havent found a definitive how-to. What do I need to have a step-by-step debugging solution hardware and software wise to be debug with the arduino?

I suggest a JTAG debugger. However I asked about JTAG debuggers a while ago and still nobody in this forum seems to have a good description on how to setup such a debugger with Linux. However I am pretty sure that JTAG is the way to go.

Anyway I have >10 klocs and still stick to serial. It is possible although somewhat harder than with a debugger. In the end you need to understand what your code is doing. If you do not understand it a debugger is only a poor substitute.

Udo

In the end you need to understand what your code is doing. If you do not understand it a debugger is only a poor substitute.

If you do not know what the code is supposed to do, how would you recognize when it it is not doing it? How could you possibly debug code without understanding what it does?

JTAG is great...if you've got somewhere on your UUT to connect it to.

Never yet come across an Arduino problem that couldn't be solved with serial debug and possibly a 'scope.

(The day job involves many 100s of KLOCs, if not MLOCs, and 99% of debugging is done with little more than with serial prints)

Well I hit that particular problem:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261506776

no serial print or scope could help me :slight_smile:

that being now partially workaround'd, I am looking for a better way to debug then serial print because when I enable log in my project, I break the 126976 byte maximum....

I found some post here and there but there is no definitive guide I guess on how to that :frowning:

Well I hit that particular problem

Never yet come across a compile-time error that needed single-step debug either.

it is more an arduino pre-processing voodoo bug/feature I believe...

anyway now the code is somewhat running but I am still having issue... I guess I could use some JTAG debugging...

it is more an arduino pre-processing voodoo bug/feature I believe...

Yes, that I realise, but why do you think JTAG or ICE or whatever would help you with it?

I guess if chip makers are creating debugging tool and suite, it may help me?

Not with cross-compiling problems, no, I don't think so.

I have a dragon and have run a 328 in debug mode through avr studio.

I did not find a good how-to but i fumbled my way through it.