Actions

Installing AVR Toolchain: Difference between revisions

From HacDC Wiki

Line 32: Line 32:
* avrdude 5.8 (via apt-get) segfaults after writing 1 byte: http://savannah.nongnu.org/bugs/?27507 - there is a patch for 5.8 posted there
* avrdude 5.8 (via apt-get) segfaults after writing 1 byte: http://savannah.nongnu.org/bugs/?27507 - there is a patch for 5.8 posted there
* avrdude 5.9 (via the official site) source apparently has some other bug that prevents the build from completing
* avrdude 5.9 (via the official site) source apparently has some other bug that prevents the build from completing
First, get the dependencies for building the code.
sudo apt-get build-dep avrdude


The solution (aside from applying patches to the above versions) is to use the patched 5.10 SVN code. The instructions are from this link: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=87972&start=20
The solution (aside from applying patches to the above versions) is to use the patched 5.10 SVN code. The instructions are from this link: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=87972&start=20

Revision as of 19:44, 18 April 2010

Introduction

There are a few pieces of software you'll definitely want for AVR programming:

  • A compiler and/or assembler (avr-gcc) to convert human-readable code to binary
  • Manipulation of binaries (binutils-avr). You'll need to convert from the ELF file to something your chip will like.
  • Something to talk to your AVR programmer (AVRDUDE), that is the piece of hardware you plug into both your computer and the chip you want to program.
  • Not required, but something to make your life easier: (GNU make)

Note that both avr-gcc and binutils-avr come from the avr-libc project. avr-libc itself isn't software per-se; it's a library that implements standard C functions for AVRs.

Installation

Windows

WinAVR has everything you need.

OS X

CrossPack should take care of you.

Linux

Ubuntu

Install the following packages:

  • avrdude
  • avrdude-doc
  • binutils-avr
  • avr-libc
  • gcc-avr

You can get them in one shot using:

sudo aptitude install avrdude avrdude-doc binutils-avr avr-libc gcc-avr

Atmel Dragon with avrdude on Ubuntu

Apparently there are two bugs that get in the way when trying to use avrdude with the dragon.

  • avrdude 5.8 (via apt-get) segfaults after writing 1 byte: http://savannah.nongnu.org/bugs/?27507 - there is a patch for 5.8 posted there
  • avrdude 5.9 (via the official site) source apparently has some other bug that prevents the build from completing

First, get the dependencies for building the code.

sudo apt-get build-dep avrdude

The solution (aside from applying patches to the above versions) is to use the patched 5.10 SVN code. The instructions are from this link: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=87972&start=20

That seems to have worked for me! I'm on 9.04 32bit and I also installed bison/flex/autoconf --obscurite