Pages: [1]   Go Down
Author Topic: Debugging in Arduino  (Read 4228 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 1
Posts: 110
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear all, is there any program which can help in debugging the program?

Also are there any simulators for the Arduino?

Tnx

Logged

Louisville, CO
Offline Offline
Full Member
***
Karma: 2
Posts: 174
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using AVR Dragon/AVR Studio for debugging Arduino programs. Works quite well.
Logged

/felis

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6937
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

felis, does someone need a programmer to debug? I'm considering it. Is the software free? Thanks.
Logged


Louisville, CO
Offline Offline
Full Member
***
Karma: 2
Posts: 174
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

AVR Studio is free. AVR Dragon is a debugger as well as programmer.
Logged

/felis

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6937
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I had the AVR Dragon I would be able to poke around in arduino SRAM and Flash, stack and hash pointers, flags and unassembled code, correct?
Logged


Louisville, CO
Offline Offline
Full Member
***
Karma: 2
Posts: 174
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is hash pointer?
Logged

/felis

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6381
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have relatively good luck debugging Arduino sketches (well, libraries) by compiling on a unix system and poking at them with a standard debugger (gdb, etc)  You have to create a phony framework of arduino core routines, and watch out for differences in the size of "int", but it is pretty helpful...
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12487
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


noticed the other discussion in this subgroup - http://arduino.cc/forum/index.php/topic,50790.0.html
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
God Member
*****
Karma: 0
Posts: 594
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I had the AVR Dragon I would be able to poke around in arduino SRAM and Flash, stack and hash pointers, flags and unassembled code, correct?

Yes
Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6937
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome! I'm saving up money right now! Dragon, see you in 10 years!
Logged


SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6381
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm saving up ... Dragon, see you in 10 years!
A dragon is only about $50...
I wish the debug protocol were public, and an Arduino could be used to debug another arduino...
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 121
Posts: 8461
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
an Arduino could be used to debug another arduino...
That's exactly what I'm working on right now, well not a debugger as per the Dragon/JTAG, but a monitor.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: