Pages: [1]   Go Down
Author Topic: Step by step debugging arduino  (Read 1914 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: October 09, 2010, 08:51:05 am by Mart » Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Check out my experiments http://blog.blinkenlight.net

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 48993
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26183
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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 smiley-sad
« Last Edit: October 09, 2010, 11:09:57 am by Mart » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26183
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well I hit that particular problem

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

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
« Last Edit: October 09, 2010, 11:25:12 am by Mart » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26183
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Per Arduino ad Astra

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 990
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: