Installing avrdude on a Gentoo box

This post describes how to install avrdude on Gentoo Linux. Avrdude is software to "burn" a program on a microcontroller. I am using a MyAVR programmer board that is connected to the parallel port. I started out by following the (gentoo specific) instructions on this website, but got some error messages.

Fortunately, the solution to this problem is described on the gentoo-forums. So I looked up my gcc-version and used it as a command line parameter for crossdev:

louic@carbon ~ $ gcc-config -l
 [1] i686-pc-linux-gnu-3.3.6
 [2] i686-pc-linux-gnu-4.1.2 *
 [3] i686-pc-linux-gnu-4.2.4
 [4] i686-pc-linux-gnu-4.3.1
 
louic@carbon ~ $ sudo crossdev -t avr --g 4.1.2

There were no more error messages. Crossdev creates a portage overlay and installs it right away, so now everything should be ok.

louic@carbon ~ $ sudo emerge -va avrdude

To set up avrdude to work with my microcontroller programmer (The MyAVR programmer), I needed to add an entry to /etc/avrdude.conf

programmer
  id    = "myavr";
  desc  = "MyAVR.de programmer";
  type  = par;
  sck   = 2;
  reset = 3;
  mosi  = 9;
  miso  = 11;
;

This entry describes the pin-layout, which you should be able to find in the manual that comes with the programmer. The "type = par" directive is used to tell avrdude that the programmer is connected to the parallel port. Time to test!

louic@carbon ~ $ avrdude -p m8 -c myavr
 
avrdude: AVR device initialized and ready to accept instructions
 
Reading | ################################################## | 100% 0.00s
 
avrdude: Device signature = 0x1e9307
 
avrdude: safemode: Fuses OK
 
avrdude done.  Thank you.

Cool! Let's program! How to compile programs and my first experiments with the Atmega8 AVR, will be described in different posts. Have fun!

This entry was posted in atmega, gentoo, linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *