SparkFun Electronics Forum Index SparkFun Electronics
MicroController Ideas and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I simulate the avr code going to arduino?

 
Post new topic   Reply to topic    SparkFun Electronics Forum Index -> Code
View previous topic :: View next topic  
Author Message
josheeg



Joined: 10 Jan 2007
Posts: 107
Location: pceeg.sourceforge.net

PostPosted: Fri Sep 05, 2008 10:02 am    Post subject: How can I simulate the avr code going to arduino? Reply with quote

How can I simulate the avr code going to arduino?

it would need the gcc c code going to the c compiler to be saved somewhere...

then the compiler options to create debug enabeled output.

then some windows & linux software to watch the registers change and step through it in a graphical way...

:Smile please help a tutorial would be great. :'(
_________________
pceeg.sourceforge.net check it out!
Back to top
View user's profile Send private message
leon_heller



Joined: 01 May 2005
Posts: 3774
Location: St. Leonards-on-Sea, E. Sussex, UK.

PostPosted: Fri Sep 05, 2008 10:10 am    Post subject: Reply with quote

You can use AVR Studio for simulation.

Leon
_________________
Leon Heller
Amateur radio call-sign: G1HSM
Back to top
View user's profile Send private message Send e-mail
josheeg



Joined: 10 Jan 2007
Posts: 107
Location: pceeg.sourceforge.net

PostPosted: Fri Sep 05, 2008 10:16 am    Post subject: I agree I could use avr studio in windows but... Reply with quote

I agree I could use avr studio in windows but... I need more information to do it and do it in my ubuntu computer I can compile from source things
_________________
pceeg.sourceforge.net check it out!
Back to top
View user's profile Send private message
stevech



Joined: 05 Jun 2004
Posts: 1186

PostPosted: Fri Sep 05, 2008 1:27 pm    Post subject: Re: I agree I could use avr studio in windows but... Reply with quote

josheeg wrote:
I agree I could use avr studio in windows but... I need more information to do it and do it in my ubuntu computer I can compile from source things


You may have to bite the bullet and use Windows XP.
Back to top
View user's profile Send private message
leon_heller



Joined: 01 May 2005
Posts: 3774
Location: St. Leonards-on-Sea, E. Sussex, UK.

PostPosted: Fri Sep 05, 2008 2:15 pm    Post subject: Reply with quote

You could use GDB for simulation under Linux. Studio would be much easier, of course.

Leon
_________________
Leon Heller
Amateur radio call-sign: G1HSM
Back to top
View user's profile Send private message Send e-mail
josheeg



Joined: 10 Jan 2007
Posts: 107
Location: pceeg.sourceforge.net

PostPosted: Fri Sep 05, 2008 3:23 pm    Post subject: I got some help searching and simuavr & DDD seam like av Reply with quote

I got some help searching and simuavr & DDD seam like avrstudio. Now how to get the arduino software IDE to output the c code and compile it with debugging information etc... elf... humm anyone try this before or know of a tutorial?
_________________
pceeg.sourceforge.net check it out!
Back to top
View user's profile Send private message
inventore123



Joined: 18 Aug 2007
Posts: 257

PostPosted: Tue Sep 09, 2008 12:09 am    Post subject: Reply with quote

gdb and simulavr are the backend of AVR studio. With gdb and simulavr you can do the same things you can do with AVR studio.
Ubuntu has in its repository some ready packages. Look for gcc-avr, binutils-avr, avr-libc, avrdude, gdb-avr, simulavr. Just install them, that's it Cool
The downside is that you don't have a GUI, you probably need to simulate your code from the command line.
Back to top
View user's profile Send private message
josheeg



Joined: 10 Jan 2007
Posts: 107
Location: pceeg.sourceforge.net

PostPosted: Tue Sep 09, 2008 5:23 am    Post subject: ddd is a graphical debugger Reply with quote

ddd is a graphical debugger their is a fue more on it's links page so your saying all of them would talk to eatchother if I used snaptic package maniger in ubuntu or debian?
_________________
pceeg.sourceforge.net check it out!
Back to top
View user's profile Send private message
inventore123



Joined: 18 Aug 2007
Posts: 257

PostPosted: Tue Sep 09, 2008 11:24 am    Post subject: Reply with quote

I only have experience with gcc-avr, binutils-avr, avr-libc and avrdude.
It is surely possible to debug an AVR from the command line by using gdb-avr and simulavr, but I never tried.
About ddd, it is the first time I hear about it.
I suggest you to try installing all those packages, first try debugging with gdb from the command line, and when you get it working, try with ddd.
Back to top
View user's profile Send private message
bakketti



Joined: 27 Jun 2007
Posts: 1

PostPosted: Sat Sep 13, 2008 9:04 am    Post subject: Reply with quote

The end of this Linux Journal article has some command line details for using gdb and simulavr. I've been meaning to try... Let me know how it works!

http://www.linuxjournal.com/article/7289
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SparkFun Electronics Forum Index -> Code All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group