Menu

BuildCrossCompiler Log in to Edit

Building and Installing an Ada Cross Compiler Tool Suite

Prerequisites

Check-out the build script and patches by cloning the git repository:

git clone https://github.com/RREE/build-avr-ada-toolchain.git

Go into build-avr-ada-toolchain and edit bin/versions.inc to your needs. For the time being (Sep. 2019) all current versions are selected.

See the script build-avr-ada.sh. You shoud set the installation directory (lines 61 .. 72) for your operation system. Make sure that all the necessary builds are selected in lines 95 .. 109:

download_files="yes"    # required to be "yes"
delete_obj_dirs="no"    # only for developpers of the build script
delete_build_dir="yes"  # typically "yes"
delete_install_dir="no" # Be carefull, will remove *all* software installed in $PREFIX!!!
build_binutils="yes"    # required to be "yes" on first build 
build_gcc="yes"         # required to be "yes" on first build
build_mpfr="no"         # not needed if a recent compiler is installed
build_mpc="no"          # not needed if a recent compiler is installed
build_gmp="no"          # not needed if a recent compiler is installed
build_libc="yes"        # required to be "yes" on first build
build_avradarts="yes"   # required to be "yes" on first build
build_avrdude="yes"     # recommended, or get from your distribution
build_avrada="yes"      # required to be "yes" on first build

You need a native GNAT compiler on your system. Nowadays almost all Linux distributions contain the Ada enabled gcc. If your system compiler is not yet gcc-8, get the latest gcc-9 sources and build a new native compiler first (for at least C, C++, and Ada).

Old remark for Windows (not yet supported in AVR-Ada 2.0)

On Windows use the MinGW installer mingw-get to install gcc and the dev versions of gmp, mpfr, mpc and pthread. At the time of this writing (January 2014) MinGW is still at gcc-4.8. The easieast way is to install gcc-4.9 with Ada support from the GCC-TDM project http://tdm-gcc.tdragon.net/. In the msys shell set the PATH so that gcc from TDM is seen before the MinGW compiler.

Building the compiler and the tool-chain

Now start the script build-avr-ada.sh. It should build and install all the necessary tools.