Electronic – Firsthand experience with Linux AVR IDE

avravrdudedevelopmentlinux

I am looking for some input into getting a good integrated development environment set up for AVR programming under Linux (Assembly and C).

My studies gave me some limited practical experience with AVRs but I fear I am getting a bit rusty so want to get busy with some projects but also want to persist in performing all development under Linux.

I use Ladyada's USBtinyISP and have been programming my chips using AVRdude but have yet to find an IDE that works as I like under Linux so have been compiling and building via my Windows lappie and AVRstudio. (This is why I love Arduino, good IDE & works straight away!)

So, does anyone have any first hand experience using an IDE with Linux that they have successfully developed their AVR projects with start to finish?

Best Answer

The thing about linux based developers is that they usually have their own unique workflow (vim vs emacs, etc). In my opinion, linux is one big IDE that you add your own parts to. With that in mind:

If you are using a debian-based distro, run this in your command line: sudo apt-get install build-essential avr-gcc avrdude

Then find a text editor you like (google is your friend but here are a few: vim/gvim, emacs, geany, kate, jedit) and write some C. When you are ready to compile, jump onto avrfreaks and have a look at other peoples makefiles. You can probably just steal a makefile from someone else's project and modify the target device, XTAL frequency and source filenames. After you run make and have a .hex file, use avrdude to program your chip.

To go into detail would take much more space than I have, but that is the basic process. When you are comfortable with the process you can do extra cool stuff in the makefile like having a single command that compiles and downloads your code. Some text editors (like geany) let you set custom make commands to GUI menu options so you could have a compile+download button like I do.

Also, the fantastic thing about this process is that it is pretty much the same whether you are building for ARM, AVR, x86, SPARC, whatever. Once you have makefiles and gcc down, the rest of linux development is a piece of cake!