RP6 ROBOT SYSTEM - 3. Hardware and Software Setup
3.2.3.2. Manual install procedure
If you prefer manual install or the automated install script fails, you may proceed with
the following steps.
The description has been derived from the following article:
http://www.nongnu.org/avr-libc/user-manual/install_tools.html
It can also be found as a PDF document in the AVR Libc Documentation on the CD:
<CD-ROM-Drive>:\Software\Documentation\avr-libc-user-manual-1.6.7.pdf
Please start on PDF page 90.
This description is only a summary of this document, but we also install a few import-
ant patches – if you do not install these patches a few things will not work properly
(like the very useful binary constants).
First of all we will have to create a directory, in which we are going to install all tools.
The directory should be named:
/usr/local/avr
.
In the terminal enter the following commands as
ROOT
:
> mkdir /usr/local/avr
> mkdir /usr/local/avr/bin
It does not need to be this directory. We simply define a variable called
$PREFIX
for
this directory:
> PREFIX=/usr/local/avr
> export PREFIX
Now we definitely have to add the definition to the PATH variable:
> PATH=$PATH:$PREFIX/bin
> export PATH
Binutils for AVR
We proceed by unpacking the source code for Binutils and applying a few patches. Let
us assume you have copied all files to the home directory ~/RP6:
> cd ~/RP6
> bunzip2 -c binutils-2.17.tar.bz2 | tar xf -
> cd binutils-2.17
> patch -p0 < ../binutils-patch-aa.diff
> patch -p0 < ../binutils-patch-atmega256x.diff
> patch -p0 < ../binutils-patch-coff-avr.diff
> patch -p0 < ../binutils-patch-newdevices.diff
> patch -p0 < ../binutils-patch-avr-size.diff
> mkdir obj-avr
> cd obj-avr
Now execute the configure script:
> ../configure --prefix=$PREFIX --target=avr --disable-nls
This script analyzes what is available on your system and generates the required
makefiles. At the end of this script you can compile and install everything:
> make
> make install
- 35 -