Tiva Ada is a cross-compiler for build Ada code in Tiva board.
This build is done using Ubuntu 13.10 32 bits.
trunk
|-- LICENSE
`-- README.md
-
Create a folder to keep the project. Transfer the owner to your current user in order to facilitate the builds. Move to
tada
folder. All the build will be done from there.cd /opt
sudo mkdir tada
sudo chwon`whoami`
tada
cd tada -
Create a download folder in
tada/downloads
and download the following libraries to it.mkdir downloads
cd downloads- m4. ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
- gmp. https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2
- mpfr. ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.gz
- mpc. ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz
- autoconf. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
- automake. ftp://ftp.gnu.org/gnu/automake/automake-1.9.tar.bz2
- binutils. ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
- gcc. ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
- lex. http://prdownloads.sourceforge.net/flex/flex-2.5.37.tar.gz?download
- gnat-gpl
cd ..
-
Create a folder
tada/sources
to keep the sources from the libraries. Copy the files from thetada/downloads
folder to it, and unpack them.mkdir sources
cp downloads/* sources/
cd sourcestar zxf autoconf-2.69.tar.gz
tar jxf automake-1.9.tar.bz2
tar zxf binutils-2.24.tar.gz
tar zxf gcc-4.8.2.tar.gz
tar jxf gmp-5.1.3.tar.bz2
tar zxf mpc-1.0.2.tar.gz
tar zxf mpfr-3.1.2.tar.gz
tar zxf m4-1.4.17.tar.gz tar zxf flex-2.5.37.tar.gzrm *.bz2 *.gz
-
Install the generic libraries
gmp
,mpfr
andmpc
.mkdir gcc-native
cd m4-1.4.17
./configure --prefix=/opt/tada/gcc-native
make
make install- installation ok
cd gmp-5.1.3
./configure --prefix=/opt/tada/gcc-native
make
make install- installation ok
cd ../mpfr-3.1.2
./configure --prefix=/opt/tada/gcc-native --with-gmp=/opt/tada/gcc-native make
make install- installation ok
cd ../mpc-1.0.2
./configure --prefix=/opt/tada/gcc-native --with-gmp=/opt/tada/gcc-native
make
sudo make install- installation ok
cd ..
-
Install
automake
,autoconf
andbinutils
cd automake-1.9
./configure --prefix=/opt/tada/gcc-native
make
make install- installation ok
cd ../autoconf-2.69
./configure --prefix=/opt/tada/gcc-native
make
make install- installation ok
-- maybe not needed cd ../flex-2.5.37 ./configure --prefix=/opt/tada/gcc-native
make
make installcd ../binutils-2.24
./configure --prefix=/opt/tada/gcc-native
make
make installcd ..
-
Add
gcc-native/bin
folder to the PATH.PATH=/opt/tada/gcc-native/bin:$PATH
-
Build the native gcc compiler.
cd gcc-native
../sources/gcc-4.8.2/configure --prefix=/opt/tada/target --enable-languages=c,ada,c++at this point we got:
blablabla ...
configure: error: GNAT is required to build ada
make: *** No targets speficied and no makefile found. Stop.so ...
sudo apt-get install gnatand try again...
cd gcc-native
../sources/gcc-4.8.2/configure --prefix=/opt/tada/target --enable-languages=c,ada,c++but again:
blablabla ...
configure: error: GNAT is required to build ada
make: *** No targets speficied and no makefile found. Stop.wonder why...
make
make install
[01] Ada Microkernel Project http://www.archeia.com/
[02] ARM-Ada http://sourceforge.net/projects/arm-ada/
[03] GNATforAVR32 https://github.com/gregerts/GNATforAVR32
[04] Tamp https://github.com/Lucretia/tamp
[05] How to install GCC from scratch with GMP, MPFR, MPC, ELF, without shared libraries? http://stackoverflow.com/questions/9450394/how-to-install-gcc-from-scratch-with-gmp-mpfr-mpc-elf-without-shared-librari
[06] GNAT Pro User's Guide Supplement for Cross Platforms: http://www.adacore.com/wp-content/files/auto_update/gnat-cross-docs/html/gnat_ugx.html
[07] GNAT Pro User's Guide Supplement for High-Integrity Edition Platforms: http://www.adacore.com/wp-content/files/auto_update/gnat-hie-docs/html/gnathie_ug.html
[08] Ada’05 compiler for ARM based systems: http://www.zsk.p.lodz.pl/~morawski/Dyplomy/Praca%20dyplomowa%20p.%20Horna.pdf