Beginning AVR on Linux

My only uC experience is with PICAXE on Windows. Easiest way to do anything with a uC, right? It was very easy, and it could be called a little too easy, because it just didn’t get me much experience. I’m switching to Knoppix (Ubuntu & PCLOS didn’t work too good on my computer), and at the same time finding a lot more projects where the PICAXE just isn’t gonna cut it. I’ve looked at PIC, AVR, and Propeller, and so far as I can tell AVR is the best option (not sure about this though, feel free to suggest something else). I have a little Linux experience, but not enough to get anything AVR set up. If this wasn’t all bad enough, I have a pretty tight budget and no serial port (USB programmer required). Any help?

I reached the conclusion that, for me, AVR is best 8 bit micro years ago. (the “for me” is for Leon’s benefit here)

Linux is the hard way for any cross-compiler for micros.

Use XP until you are not a novice.

I assume you know of, have read…

http://www.avrfreaks.net/

Linux is the hard way for any cross-compiler for micros.

A little more explanation would be helpful here.

Use XP until you are not a novice.

At what? AVR or Linux?

I have been using Linux on and off for quite a while now, it’s just that I only now decided to make a full switch. Sorry, I guess I didn’t make that very clear, but Linux is the complication, not the problem.

I have AVRdude and GCC-AVR, and can get quite a bit more stuff like that easily enough (with Synaptic). It’s just that I don’t know what to do with it.

You may find avr-gcc packaged on your distribution already (its gcc-avr on Debian and derivatives).

Failing that, the AVR port of binutils and GCC build like any other GCC/Binutils cross compiler. Simply pass in --target=avr (and --enable-languages=c,c++ to GCC). avr-libc is the defacto C library.

The AVRISPmk2 (made by Atmel) is the most dependable programmer, and its only $30. Supported by AVRDUDE and AVR Studio.

theatrus:
You may find avr-gcc packaged on your distribution already (its gcc-avr on Debian and derivatives).

Failing that, the AVR port of binutils and GCC build like any other GCC/Binutils cross compiler. Simply pass in --target=avr (and --enable-languages=c,c++ to GCC). avr-libc is the defacto C library.

The AVRISPmk2 (made by Atmel) is the most dependable programmer, and its only $30. Supported by AVRDUDE and AVR Studio.

I have AVRdude, GCC-AVR, and binutils-AVR, I just don’t know what to to do with them. Are you talking about installing the programs to my computer? I already have GCC-AVR, binutils-AVR, and AVRdude. If this is something about the actual uC programming, it’s what I’m looking for but you’ll have to make your explanation a little more understandable to a beginner.

Looks like a good programmer.

This should work:

http://www.sparkfun.com/commerce/tutori … ials_id=93

The only differences for you will be the text editor (pick your favorite, Gedit, Kate, etc), and running “make” on the command line as opposed to the editor.

That’s what I was looking for. Thanks.

stevech:
Use XP until you are not a novice.

Um what? With an attitude like that, seems as if you'll be a novice forever stevech. No, don't use XP, use an operating system that will make programming your MCU easier, IE: NOT windows.

If you want to use linux or osx, but still want an IDE, give Eclipse and the AVR plugin a shot. Many people will complain about Eclipse and its bloatyness, but it will let you use the same IDE across osx, windows, and linux.

If you don’t want an IDE, then simply use the text editor of your choice, and avrdude to upload. Quote easy actually.

I’m fine without an IDE. If there’s anything I’m still a little shaky on, it’s the makefile.