Arduino vs avrdude vs other

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
xpyd3r
 
Posts: 11
Joined: Sun Apr 13, 2008 4:02 pm

Arduino vs avrdude vs other

Post by xpyd3r »

I got both an Arduino and the TinyISP, I so far have only played around with the arduino software, and plan to play with avrdude, but I was wondering what the general consensus is on the best AVR programmer software and why?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

arduino uses avrdude underneat so...

xpyd3r
 
Posts: 11
Joined: Sun Apr 13, 2008 4:02 pm

Post by xpyd3r »

so if i learned to program with avrdude I would pretty much be set with programming any avrs, arduino included?

User avatar
westfw
 
Posts: 2010
Joined: Fri Apr 27, 2007 1:01 pm

Post by westfw »

Ardunio is wonderful way to prototype general microcontroller projects, but it won't necessarily teach you anything about "normal" avr development process. If you want to do that, you should probably be using AVRStudio on windows (and a manually installed gcc if you plan to use C.)

xpyd3r
 
Posts: 11
Joined: Sun Apr 13, 2008 4:02 pm

Post by xpyd3r »

I don't have windows, so am I pretty much limited to avrdude?

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Post by mtbf0 »

what i love about the arduino is that it allows me to be lazy. don't have to worry about forward references or function prototypes. don't have to write a makefile. and the board is a known working quantity.

i like the boarduino because it's breadboardable, (and cheap), and have versions lying around with and without the resonator installed depending on the project. i recently got some rbbb's because they can be shortened if you don't need all of the power supply circuitry, (i'm working on a small battery powered project that'll be moved to a minipov if i ever get done), and they're a little narrower than the boarduino, (and cheap).

that said, usually the first thing i do when my sketches start up is to stop all the timers on the chip and i never use the arduino i/o calls. the arduino programming framework is really wasteful of processor cycles and, since they tie up all the timers, i/o processing is kind of hobbled.

of course, you don't have to use the arduino environment at all. you could write your code in c, c++ or assembler, compile and link using gcc and upload to the arduino using avrdude, uisp or whatever. you can upload via the serial bootloader or using an isp programmer like the avrtinyisp.

the arduino is a great platform and, if you're not using any of the available shields, the boarduino is even better, (and cheaper).

mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Post by mtbf0 »

xpyd3r wrote:I don't have windows, so am I pretty much limited to avrdude?
no. i run the arduino environment on a toshiba laptop running suse linux 10.something and on an eeepc running the xandros version that it came with. for the eeepc i downloaded all the gcc stuff from debian etch repositories and had to build avrdude myself in order to get support for the usbtinyisp.

all the development software is also available to run on macs as well.

by the way, avrdude is a pretty small piece of the whole puzzle, in addition to it, your development environment will include avr-binutils, avr-gcc, BANNED, and make. lucky for you, when you installed the arduino stuff, all of the rest, including avrdude, came along for the ride.

User avatar
nomuse
 
Posts: 26
Joined: Fri Jul 18, 2008 7:30 am

Post by nomuse »

Yah, let's be clear (new user itching to share all what he's just learned). :)

The Arduino environment is a wonderful thing to start out with as it is a complete user environment; the Arduino board already contains USB/serial port, a status LED or two, clock crystal, power regulator, and a chip with a bootloader already burnt in (which means it can be programmed without needing an isp or other programmer -- just a serial port will do).

The Arduino software is a combined program editor, compiler, debugger, and in-system programmer. Basically, you writes the code, you pushes the button, the environment does the rest of the work. And a great many of the functions you want are automatically included for you -- all you have to do is type the mnemonic.



When you start looking at a "naked" avr, you are looking at a more complex tool chain. First you write code -- in C or assembly, mostly. Then compile it -- avr-gcc is the common tool. That makes a hex executable tailored for your specific chip (if you did it right!) Avrdude is another part of that process, as it basically communicates with the tinyisp (or other programmer) to erase the chip, load that compiled code into it, verify it, etc. And then there's libraries, debuggers -- and other stuff I barely understand.

Fortunately, several different versions of a complete tool chain have been assembled for you by various people. AVR studio (for Winders. Sigh). On the Mac, AVR-OSX (needs some hacking to recognize the tinyisp) or AVRMacPack. Pretty much double-click install of the whole tool package.

The "Stick the code into the chip" part, once you've got everything installed and configured, is not that much worse than pushing the button on the Arduino environment. On the Mac, once you've written the makefile, it's basically open Terminal, navigate to the project folder, and type "make."

Writing the code itself is a little more rigorous. avr-gcc (or the compiler of your choice) does less of the work of handling definitions, making sure you have the right includes, determining which parts of memory variables are getting stuck into, and so forth. It's a lot more geeky, basically.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”