Linux Toolchain Installation Guide

This has been tested on Fedora 17, Ubuntu 12.04 LTS as well as various versions SuSE. Typically the main difference is tracking down the right package names.

1) Install toolchain

sudo yum install avr-binutils avr-gcc avr-libc avrdude subversion

2) Checkout Source:

svn checkout svn://nanork.org/srv/svn/repos/nano-RK

3) As root, make sure you add your user name to the uucp group for serial port access. (edit /etc/group then you need to log out and in again) The first time you open minicom, open it as root, set your port settings and save as setup default.
- minicom -s
- Serial port setup: type A: /dev/ttyUSB0 then set
115200 8N1 with no Hardware / Software Flow Control
- "save setup as dfl" to save as default

From Source

This document briefly describes how to install avr-gcc and the avrdude downloader for nanoRK under linux. FireFly v3 requires ATmega128RFA1 cpu support found in gcc 4.4 or newer.

All required files can be found on the Downloads page.

1) Make sure you have the following installed (you probably do, these are standard):
- YUM: Fedora 17

    flex-2.5.4a-34
    bison-2.0-6
    byacc-1.9-29
    gcc-4.0.2-8
    gcc-c++-4.0.2-8
    make

- Ubuntu 12.04 LTS
         $ sudo apt-get binutils-avr gcc-avr avr-libc avrdude subversion minicom flex bison byacc

2) Download the following source packages:

binutils-2.20
gcc-core-4.4.2
avr-libc-1.6.7
avrdude-5.11

3) Build and Install binutils
- gunzip and untar binutils
- cd into binutils-x.xx
- run (make install as root)

# ./configure --target=avr --program-prefix="avr-" --disable-werror
# make
# sudo make install

4) Build and Install gcc for avr
- unzip and untar gcc-core
- cd into gcc-core-x.x.x
- run the following (make install as root)

cd into the gcc-core directory (avr-gcc below should be a sub-directory inside gcc-core)

# mkdir avr-gcc
# cd avr-gcc
# ../configure --target=avr --program-prefix="avr-" --enable-languages=c --disable-libssp
# make
# sudo make install
- note that libssp is disabled due to a bug, this might be fixed in later revisions of gcc

5) Build and Install avr-libc
- make sure /usr/local/bin is in your path
- type "which avr-gcc" to double check
- gunzip and untar avr-libc
- cd into avr-libc-x.x.x
- run the following (make install as root)
- Note, if errors occur, trying running "make install" when logged in as root instead of sudo (use su)

# ./configure --build=`./config.guess` --host=avr
# make
# sudo make install

6) Build and Install avr-dude
- gunzip and untar avr-dude
- cd into avrdude-x.x
- run (make install as root)

# ./configure
# make
# sudo make install

7) As root, make sure you add your user name to the uucp group for serial port access. (edit /etc/group then you need to log out and in again) The first time you open minicom, open it as root, set your port settings and save as setup default.
- minicom -s
- Serial port setup: type A: /dev/ttyUSB0 then set
115200 8N1 with no Hardware / Software Flow Control
- "save setup as dfl" to save as default