Nano-RK OS-X Toolchain Install Guide
This document briefly describes how to install avr-gcc and the avrdude downloader for nanoRK under linux. FireFly v2_2 requires ATmega1281 cpu support found in gcc 4.2 or newer. There is a patch available for older gcc compilers.
1) Install Xcode from apple's website
- This will provide you with a native copy of gcc that can be used to build the avr-gcc cross compiler
2) Download the following source packages:
3) Build/Install binutils
-unzip and untar binutils -cd into binutils-x.xx -run (make install as root)
# ./configure --target=avr --program-prefix="avr-" # make # make install
4) Build/Install gcc for avr
-unzip and untar gcc-core -cd into gcc-core-x.x.x -run (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 # make install
-note that libssp is disabled due to a bug, this might be fixed in later revisions of gcc
5) Make sure avr-gcc is in your path
- Type "which avr-gcc"
- If this fails, type "export PATH=$PATH:/usr/local/bin"
- Try "which avr-gcc" again, if this works, add the above line to your .bashrc file located in your user directory
5) Build/Install avr-libc
-unzip and untar avr-libc -cd into avr-libc-x.x.x -run (make install as root)
# ./configure --build=`./config.guess` --host=avr # make # make install
6) If you don't already have it installed, install DarwinPort
7) Install avrDude using DarwinPort. Make sure to install avrDude version 5.1. Newer versions may not work correctly. Instructions can be found here or you can try typing:
% cd /opt/local/bin/portslocation/dports/avrdude % sudo port install avrdude Password:
8) Download and install the OS-X FTDI VCP driver
- download gpm file from http://www.ftdichip.com/Drivers/VCP.htm
- double click to install it
- restart your computer
9) Test if driver loaded
- Connect FireFly programmer board to USB port of PC
- Power board on
- Type: "sudo dmesg"
- Make sure FTDI driver loaded
- Type: "ls /dev"
- usually the driver will load as follows:
/dev/tty.usbserial-0000201AA /dev/tty.usbserial-0000201AB
10) Make sure to change the PROGRAMMING_PORT defined in each project makefile.
# Set the Port that you programmer is connected to PROGRAMMING_PORT = /dev/tty.usbserial-0000201AB # programmer connected to serial device
11) Install Subversion for OS-X
12) Check out the Nano-RK source by typing:
svn checkout svn://flat-earth.ece.cmu.edu/srv/svn/repos/nano-RK
13) Install and Setup Minicom from Minicom-DarwinPort
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/tty.usbserial-0000201AA then set 115200 8N1 with no Hardware / Software Flow Control
- "save setup as dfl" to save as default
