Developing AVR Based Robots In Linux

*Under Construction*

 

Introduction

Have you ever wanted to use Linux to develop the software used in your robot but haven't known where to start or wanted to take the time to research it?  The goal of this tutorial is provide all of the information in one location that is needed write software targeted at AVR chips using Linux with C and C++.  It will cover the each individual piece of software, how to install it, what it is used for, and how to use it.  Examples with actual code will be provided for each step of the process and will be available for download.

 

This tutorial is not a primer on how to program and asumes you already know how to program but would like to know how to apply that knowledge to programming in Linux.  The distribution of Linux used with this tutorial is Ubuntu 8.04 - the Hardy Heron release.  Although these instructions should work for all distributions of Linux,each distribution is different and you will need to check the documentation for your distribution in the case of problems.

1. Application List

 

Application List

 

The following is a list of the applications used in this tutorial as well as a discription for each one:

 

Contains a package of programs that are used to assemble, link and manipulate binary and object files.  They may be used in conjunction with a compiler and various libraries to build programs.

Contains a pakage of programs that are used to manipulate binary and object files that may have been created for Amtel's AVR architecture.

A cross platform GNU C compiler for the C programming language.

A more specified version of the gcc program that is targeted at making AVR programs.

Standard library used for the development of C programs for the Atmel AVR micro controllers.  Contains static libraries as well as the header files needed.

Source-level degugger capable of breaking programs at any specific line, displaying variable values, and determining where errors occured.  Currently works for C, C++, Fortran, Modula 2 and Java programs.

Same functionality as gdb but it has been compiled to target the AVR architecture.

Simulates the Atmel AVR family of micro-controllers, emulates a gdb remote target, and displays register and memory information in real time.

An open source utility to download, upload, and manipulate the ROM and EEPROM contents of AVR microcontrollers using the in system programming technique (ISP).


2. Application Installation

 

Application Installation

The list above contains the applications to install and is listed again for convenience.  There are two main ways to install the software, both of which will be descibed here.

 

The first, and probably most recommended, is to use apt-get, package management software, to install the software.

 

sudo apt-cache update

 

It is always a good idea to search for the package first in case of spelling errors or other simularly named packages.  It is mainly a way of double checking what you are going to install.  The following is an example of how to search for an application:

 

sudo apt-get search *application*

 

sudo apt-get install *application*

 

The second method of installing the applications is to use the Synaptic Package Manager.

8. Reference

Reference