Look for the file AVR-Ada-README for the procedure at:
https://github.com/ve3wwg/avr/tree/master/ada/avrada-1.2.2/osx
The associated script files, README and patches are available by:
git clone https://github.com/ve3wwg/avr.git
The following is a wiki-fied version of that documentation. The git repo README file should be checked for the latest in corrections/improvements.
This document describes the steps necessary for building AVR-Ada on Mac OSX (Lion+). With a few exceptions, this procedure applies also to Linux generally.
This area of the repository also provides some patches and scripts that will simplify your task.
The *.sh files and *.myconf files will require you to edit them prior to use.
HAVE TIME: If you're in a hurry, then you're destined to do this procedure more than once! Block off about two hours of steady time so that you don't miss a step. This procedure is lengthy, detailed and prone to error. One mistake will ruin the result.
USE ONE SESSION: The environment (PATH) is critical to the success of this build procedure. If you switch windows often, log out and then log back in, leaves you vulnerable to forgetting to restore the correct environment.
WORK FROM A CHECK LIST: You may want to print the procedure out so that you can check off each item as it is done. It is very easy to miss a step, and all steps are critical to your success.
You need a native Ada compiler to build an Ada compiler (cross or native). These days it is trivial on most distributions of Linux. For Mac OSX users, this can be a problem.
Thankfully, there is a binary download available here, should you need it:
http://dl.dropbox.com/u/34783908/Ada/gcc-4.6.0-x86_64-apple-darwin-10.tar.bz2
Assuming that you have a working native Ada compiler, there are some other prerequisites.
For OSX users, it is assumed, that you have already install many great GNU tools from the macports collection (or equivalent). Linux users will simply install packages as required.
Packages/Tools Needed:
Also make sure a reasonably current version of these are installed:
For Linux users, make sure that all libraries have the "development" package installed. The development packages include the installation of the C/C++ include files.
There are FOUR main packages required to build AVR-Ada:
The versions used in this document are:
These will be installed in the order listed.
The packages required are tightly coupled to the AVR-Ada project itself. If you are upgrading to a newer version than 1.2.2, then download that package and unpack it to determine which GCC and Binutils you need.
In AVR-Ada-1.2.2 this shows only 2.20.1 as an option.
ls patches/gcc:
AVR-Ada-1.2.2 only shows 4.7.2 as an option.
Check for new subdirectories in ./patches for other requirements in the future.
Reminder: Don't forget to reinstate the libiconv and libintl libraries for Mac OSX builds. If you forget, this may create problems for your macport updates.
Wiki: OSX_avrada|AVR-Ada Build and Install
Wiki: OSX_avrgcc|AVR-GCC Build and Install
Wiki: OSX_avrlibc|AVR-libc Build and Install
Wiki: OSX_binutils|Binutils Build and Install
Wiki: OSX_linkerr|Link error (crtm168.o)
Wiki: OSX_tweaks|AVR-Ada Tweaks
Wiki: OSX_undo|OSX libiconv restore
Wiki: OSX_workaround|OSX libiconv work-around