# Atmel AVR development in Gentoo?

## barfo

I've just set up a new gentoo system and am looking into using it for my home uP development, rather than my windows laptop.  I imagine I can setup avrlib and compilers without problem, however am interested in any IDEs that support avr development.  Is it safe to assume that I can configure Anjuta to compile avr code?  Are there any linux-native development suites similar to CodeVision?

Also, how reliable is AVRdude with homemade programmers?  I'm afraid of finding a great review of a programmer/software kit and building it, then finding that it has quirks with some controllers or other hardware - I've done that before.

As this pertains to uPs and programmers, I thought this was the correct forum...  Perhaps it belongs under Portage and Programming?

Thanks for any info.

----------

## pianosaurus

I spent hours trying to get avrdude to work with a developement board (STK 500) just to find it didn't work with that revision of the board. I don't remember if I had version 2.0 or 1.x of the board, unfortunately. I ended up using AVR Studio from Windows, so don't take anything for granted.

This is a while ago though (maybe a year or so), and things might have improved. I have no idea how it would work with anything homemade. Of course, it's open source, so there's always the possibility of making it work.

----------

## Vaclav Vanc

I have same problem, I like AVR Cross Development Kit (http://sourceforge.net/projects/cdk4avr/), but ebuild doesn't exist...

----------

## barfo

well that's discouraging...

i'll check out cdk4avr, i've only glanced at it as of yet.

anyone have any experience developing with gvv for avr?  it might be a two weeks or so before i set it up, and i'm trying to collect any useful information.

i'm always amazed at how difficult it is for hobbyists to find useful information about some topics pertaining to linux.  i cannot believe i'm the only guy that uses gentoo and plays with uPs in my spare time...  there have to be well documented, reliable and simple opensource alternatives out there somewhere.

----------

## jetblack101

I use crossdev, which is a cross compiling script in portage.

This will setup you up with everything you need for compiling avr programs.

```
 crossdev -t avr 
```

  As for programming it check out http://tuxgraphics.org/electronics/200411/article352.shtml.  The parallel port programmer on there is extremely cheap so I believe it is the only way to go.  The uisp program used for compiling with the cable is in portage as well.  Also, I have built all my projects from scatch so I have no idea how any of this stuff would work with a dev board, but if the both use the isp programming capability it should work.  Best of luck on your projects.

----------

## zatalian

I just started using avr's with the atmega168. To program the controllers i use a self made ftdi usb to serial converter and the avr109 bootloader from atmel. This works extremly well (and very fast). To get it working was not that easy though. I had to do some programming...

1. install avr development tools with crossdev -t avr as mentioned.

2. download uisp and modify the code so that more than 1 pin can be inverted 

3. Now you can program the controller using the dasa3 bitbanging way

4. I had to modify uisp again because it was not capable of programming the efuse of the atmega168

5. download, configure and compile the avr109 bootloader from the atmel site

6. use uisp to flash the bootloader in the controller

7. use uisp to set the fuses correct

8. use avrdude to program the controller via the bootloader from now on  :Smile: 

It seems a lot of work, but all of it is a one time job. After that, the controller can be programmed as much as you want using the bootloader. By the way, all this is done with less than 20 components, inclusief a 10 breadboard.

I thought somebody mentioning avr's in a positive way was needed in this thread   :Twisted Evil: 

----------

