Installing AVR-GCC

Sections

  1. Overview
  2. Downloading
  3. Installing
  4. Configuring
  5. Testing
Written by Pascal Stang | Updated: Sat Jul 12, 2003

1. Overview

AVR-GCC is a free open-source C/C++ compiler for the Atmel AVR series processors. AVR-GCC is actually not a unique product but rather a subset of the complete GNU Compiler Collection (GCC) specially customized to work with AVR processors. For more information about the complete GCC, see the Free Software Foundation's (FSF) GCC Home Page.

TODO: Notes about command line interface, makefiles, hosts, targets, etc

2. Downloading

AVR-GCC is available from a huge number of sites and locations because it is a free open-source program. You can download AVR-GCC in source-code form, or a precompiled binary (program) already made to work on a certain kind of host (OS/machine). Since many users of AVR processors are not familiar with how to compile and set up GCC directly from the source code, more experienced users have made installable packages to greatly simplify the process.

Installation packages are available for the following hosts (operating systems) supported by RSL:

3. Installing

Installing WinAVR

Before beginning the install process, you need to choose/create a location/directory where the compiler and associated files can be installed. This directory should be different from the one in which you intend to keep the code you write. The directory you choose should not contain spaces in its name or path. Some examples are:

c:\WinAVR                (GOOD)
c:\programming\WinAVR    (GOOD)
c:\Code\AVR\WinAVR       (GOOD)
c:\Program Files\WinAVR  (NOT RECOMMENDED - HAS SPACES IN PATH)
c:\My code\AVR\WinAVR    (NOT RECOMMENDED - HAS SPACES IN PATH)

From the download step you should have a self-installing .exe file named Winavr-20030115-bin-install.exe. It is unimportant where this file is located. You can delete it if you wish after the installation completes but you may want to keep it for later re-installs.

If you have some time, browse through the readme.txt. It contains a wealth of information about GCC, WinAVR, important terminology, and links to AVR projects and additional information.

4. Configuring

Following the Install step, AVR-GCC should be functional. However, like most compilers, we need to add some environment variables to help make AVR-GCC easier to access from the command-line.

5. Testing

There are a few simple steps you can take to verify that your WinAVR installation is ready to be used:

 


Written by Pascal Stang | Updated: Sat Jul 12, 2003