0
Offline
Jr. Member
Karma: 0
Posts: 92
Arduino rocks
|
 |
« on: October 09, 2010, 08:50:13 am » |
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
Faraday Member
Karma: 16
Posts: 3196
20 LEDs are enough
|
 |
« Reply #1 on: October 09, 2010, 09:30:58 am » |
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
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35483
Seattle, WA USA
|
 |
« Reply #2 on: October 09, 2010, 09:41:30 am » |
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
Online
Brattain Member
Karma: 137
Posts: 19026
I don't think you connected the grounds, Dave.
|
 |
« Reply #3 on: October 09, 2010, 10:08:48 am » |
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.
|
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 137
Posts: 19026
I don't think you connected the grounds, Dave.
|
 |
« Reply #5 on: October 09, 2010, 11:14:07 am » |
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.
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 92
Arduino rocks
|
 |
« Reply #6 on: October 09, 2010, 11:24:05 am » |
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
Online
Brattain Member
Karma: 137
Posts: 19026
I don't think you connected the grounds, Dave.
|
 |
« Reply #7 on: October 09, 2010, 11:25:47 am » |
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.
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 92
Arduino rocks
|
 |
« Reply #8 on: October 09, 2010, 12:34:18 pm » |
I guess if chip makers are creating debugging tool and suite, it may help me?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #9 on: October 09, 2010, 03:08:44 pm » |
Not with cross-compiling problems, no, I don't think so.
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
ottawa, canada
Offline
God Member
Karma: 3
Posts: 971
Arduino rocks
|
 |
« Reply #10 on: October 10, 2010, 11:58:23 am » |
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
|
|
|
|
|
|