SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By josheeg
#54921
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...

::) please help a tutorial would be great. :'(
User avatar
By leon_heller
#54922
You can use AVR Studio for simulation.

Leon
By josheeg
#54923
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
By stevech
#54929
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.
User avatar
By leon_heller
#54932
You could use GDB for simulation under Linux. Studio would be much easier, of course.

Leon
By josheeg
#54935
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?
By inventore123
#55048
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 8)
The downside is that you don't have a GUI, you probably need to simulate your code from the command line.
By josheeg
#55058
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?
By inventore123
#55075
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.
By bakketti
#55304
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