Go Down

Topic: Step by step debugging arduino (Read 2294 times) previous topic - next topic

Mart

Oct 09, 2010, 03:50 pm Last Edit: Oct 09, 2010, 03:51 pm by Mart Reason: 1
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?

Udo Klein

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
Check out my experiments http://blog.blinkenlight.net

PaulS

Quote
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?

AWOL

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)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Mart

#4
Oct 09, 2010, 06:06 pm Last Edit: Oct 09, 2010, 06:09 pm by Mart Reason: 1
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 :)

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

- avr dragon?
- http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATAVRISP2-ND

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

AWOL

Quote
Well I hit that particular problem


Never yet come across a compile-time error that needed single-step debug either.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Mart

#6
Oct 09, 2010, 06:24 pm Last Edit: Oct 09, 2010, 06:25 pm by Mart Reason: 1
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...

AWOL

Quote
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?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Mart

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

Groove

Not with cross-compiling problems, no, I don't think so.
Per Arduino ad Astra

bill2009

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.

Go Up