<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewdally</id>
	<title>PaparazziUAV - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewdally"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Matthewdally"/>
	<updated>2026-05-19T11:03:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9999</id>
		<title>Installation/FromScratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9999"/>
		<updated>2011-08-30T03:46:28Z</updated>

		<summary type="html">&lt;p&gt;Matthewdally: /* Ivy-c */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
&lt;br /&gt;
As with all Wiki pages, also this page is a work in progress. try to be a big help to the Paparazzi project and improve this page whenever you can. If you have a distribution different from Ubuntu which doesn't satisfy any other dependency and have instructions about compiling it, packaging it, feel free to add any reference on how to do that on this wikipage.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this page is to clarify about which version of each piece of software has to be compiled, where to find that software, patches needed to make it compile on Linux. In our case 64bit Linux. This includes compiling all paparazzi-dev, paparazzi-arm7, paparazzi-stm32 and paparazzi-bin software on your machine, running an Ubuntu Lucid Lynx or later Linux distribution or maybe even FreeBSD, or OSX.&lt;br /&gt;
&lt;br /&gt;
== The shortcut ==&lt;br /&gt;
&lt;br /&gt;
Maybe you are no so interested in the details at this moment and just want to quickly install. That's fine, for that we are working on a script and you only need to run one line to get everything installed. For this to work out you do need a working internet connection, but since you can read this text, that will probably not pose a problem.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~ &amp;amp;&amp;amp; wget http://openuas.org/pub/paparazzifromscratch.sh (still not ready and a work in progress)&lt;br /&gt;
&lt;br /&gt;
If you used the line above, and it all worked out you can stop reading now since everything is installed and compiled, ready for you to use.&lt;br /&gt;
&lt;br /&gt;
== Paparazzi-dev packages ==&lt;br /&gt;
&lt;br /&gt;
For Ubuntu users, you can install the following packages from standard repository. You can just copy the line(s) and paste into your terminal. But do not copy the $ sign, this symbol is just added on this page to show that it is to be pasted at a normal terminal prompt.&lt;br /&gt;
&lt;br /&gt;
=== Whole lot in one ===&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                       liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev libpcre-ocaml \&lt;br /&gt;
                       libpcre-ocaml-dev libgnomecanvas2-0 libgnomecanvas2-dev libglade2-0 libglade2-dev make build-essential \&lt;br /&gt;
                       git-core gnuplot boa m4 libtool libftdi-dev libmpfr-dev tcl8.5-dev xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml and libraries ===&lt;br /&gt;
&lt;br /&gt;
Ocaml, short for Objective Caml is the most popular variant of the Caml language. The Paparazzi Ground Control Station (GCS) and some of it's tools are crafted in this language.&lt;br /&gt;
&lt;br /&gt;
* ocaml, ocaml-camlimages-devel, ocaml-lablgtk2-devel, ocaml-xml-light-devel, ocamlnet-ocaml-devel&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                        liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Gnome canvas Library ===&lt;br /&gt;
&lt;br /&gt;
The GnomeCanvas is an engine for structured graphics that offers a rich imaging model, high performance rendering, and a powerful, high level API. This widget can be used for flexible display of graphics and for creating interactive user interface elements.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libgnomecanvas2-0 libgnomecanvas2-dev&lt;br /&gt;
&lt;br /&gt;
=== USB Library ===&lt;br /&gt;
&lt;br /&gt;
The libusb project aims to create a library for use by user level applications to access USB devices regardless of OS. http://www.libusb.org&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libusb-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml PCRE ===&lt;br /&gt;
&lt;br /&gt;
This OCaml-library interfaces the PCRE (Perl-compatibility regular expressions) C library. it can be used for matching regular expressions which are written in Perl style.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libpcre-ocaml libpcre-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Glade Library ===&lt;br /&gt;
&lt;br /&gt;
Libglade is a library that performs a similar job to the C source output routines in the GLADE user interface builder. Whereas GLADE's output routines create C source code that must be compiled, libglade builds the interface from an XML file (GLADE's save format) at runtime. This can allow modifying the user interface without recompiling.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libglade2-0 libglade2-dev&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install tcl8.5-dev&lt;br /&gt;
&lt;br /&gt;
Also the some utils are required to compile and  install Ivy.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Make ===&lt;br /&gt;
&lt;br /&gt;
GNU Make is an utility which controls the generation of executables and other target files of a program from the program's source files. &lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install make&lt;br /&gt;
&lt;br /&gt;
=== Build essential ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Libtool ===&lt;br /&gt;
&lt;br /&gt;
GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface. Creating the files for Paparazzi software building becomes less cumbersome by using this tool.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libtool&lt;br /&gt;
&lt;br /&gt;
=== Git Client ===&lt;br /&gt;
&lt;br /&gt;
Git is a version control system. Version control systems allow many individuals to collaborate on the Paparazzi source code. This is needed to retrieve the latest sourcecode from various packages and Paparazzi sourcecode itself.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
=== GNU Plot ===&lt;br /&gt;
&lt;br /&gt;
A command-line driven interactive plotting program. Unknow if it is used&lt;br /&gt;
 &lt;br /&gt;
 $ sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
=== FTDI library ===&lt;br /&gt;
&lt;br /&gt;
libftdi is a library that talks to FTDI's 232 type chips, including the popular bitbang mode, using libusb. A library to be able to use with a debugging Autopilot hardware boards.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libftdi-dev &lt;br /&gt;
&lt;br /&gt;
=== MPFR library ===&lt;br /&gt;
&lt;br /&gt;
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding. MPFR is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libmpfr-dev&lt;br /&gt;
&lt;br /&gt;
=== ImageMagick ===&lt;br /&gt;
&lt;br /&gt;
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. Being able to modify image based map pictures is a feature that may come in handy one time.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install imagemagick&lt;br /&gt;
&lt;br /&gt;
=== Optional on an older OS ===&lt;br /&gt;
&lt;br /&gt;
If you have an older OS distribution it never hurts to install the following...&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev zlibc&lt;br /&gt;
&lt;br /&gt;
== Building the Cross compiler toolchain ==&lt;br /&gt;
&lt;br /&gt;
The goal of this part is to building an ARM and STM32 cross-toolchain with binutils gcc newlib and gdb from source. This is needed so we can compile the code that ends up onto the autopilot board. Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products. Enter the following on your command prompt&lt;br /&gt;
&lt;br /&gt;
 $ cd ~&lt;br /&gt;
 $ nano paparazzi_from_scratch.sh&lt;br /&gt;
&lt;br /&gt;
Then copy the part below (CTRL+C) and go to your terminal window again and use CTRL+SHIFT+V to paste the text into the nano editor. Afterther save the file with CTRL+X and answer Y &lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 #&lt;br /&gt;
 # Goal: Get the ARM and STM32 cross compilers, tools and libraries installed and all &lt;br /&gt;
 #       working on 64Bit (Linux) computer system like they should&lt;br /&gt;
 # Version:  1.7 &lt;br /&gt;
 # Copyright: 2011 LGPL OpenUAS http://www.openuas.org/&lt;br /&gt;
 # Date: 20110225 14:01&lt;br /&gt;
 # Usage: $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt  &lt;br /&gt;
 #        &lt;br /&gt;
 # I want to improve this script, what can I do?&lt;br /&gt;
 #&lt;br /&gt;
 #  IMPR: Add STM32 support&lt;br /&gt;
 #  IMPR: with automatic log filename appending date like &amp;quot;date +%y%j%H%M%S&amp;quot;&lt;br /&gt;
 #  IMPR: Set MAJOR and MINOR GCC version in make parameter automatically&lt;br /&gt;
 #  IMPR: Add all commands from this wikipage also to the script, so we have a &lt;br /&gt;
 #        full paparazzi from scratch in one script!&lt;br /&gt;
 #&lt;br /&gt;
 # Useful links:&lt;br /&gt;
 # http://fun-tech.se/stm32/gcc/index.php&lt;br /&gt;
 # http://only.mawhrin.net/~alexey/prg/lpc2103/toolchain/&lt;br /&gt;
 # http://gcc.gnu.org/install/configure.html&lt;br /&gt;
 # http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
 # http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
 # http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
 # http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
 # http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
 # http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
 # http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Gcc433&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Compiling_CHDK_under_Linux&lt;br /&gt;
 #&lt;br /&gt;
 # http://gcc.gnu.org/faq.html#multiple&lt;br /&gt;
 # https://wiki.kubuntu.org/CompilerFlags&lt;br /&gt;
 #&lt;br /&gt;
 # Older compiler http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=91596&lt;br /&gt;
 # Replaced O_CREAT for S_IRWXU in the files where you get gcc-3.4.4/gcc/collect2.c&lt;br /&gt;
 #&lt;br /&gt;
 # The eBook &amp;quot;Definitive guide to GCC&amp;quot; may come in handy&lt;br /&gt;
 #&lt;br /&gt;
 # And if all went well, a command&lt;br /&gt;
 #  $ arm-elf-gcc -print-multi-lib&lt;br /&gt;
 #&lt;br /&gt;
 # Should give the following &lt;br /&gt;
 #&lt;br /&gt;
 # .;&lt;br /&gt;
 # thumb;@mthumb&lt;br /&gt;
 # interwork;@mthumb-interwork&lt;br /&gt;
 # thumb/interwork;@mthumb@mthumb-interwork&lt;br /&gt;
 #&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # In case you want to recompile, and if you do not want to re-download the files&lt;br /&gt;
 # to save time and bandwith set CLEANUPDOWNLOADS to N&lt;br /&gt;
 CLEANUPDOWNLOADS=&amp;quot;N&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 TARGET=arm-elf  #Or use  TARGET=arm-none-eabi or arm_non_eabi the pararazzi makefile will figure it out&lt;br /&gt;
 PREFIX=$HOME/arm-elf-paparazzi # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 &lt;br /&gt;
 # If you have a good reason to compile other versions, ONLY then change the version data below&lt;br /&gt;
 BINUTILS_VERSION=2.16.1&lt;br /&gt;
 GCC_VERSION=3.4.4&lt;br /&gt;
 NEWLIB_VERSION=1.13.0&lt;br /&gt;
 GDB_VERSION=6.8&lt;br /&gt;
 &lt;br /&gt;
 #Just in case for some reason you want the latest versions a just values here&lt;br /&gt;
 # and some more 3.4 in the rest of the script&lt;br /&gt;
 #TARGET=arm-elf&lt;br /&gt;
 #PREFIX=$HOME/arm-elf-latest # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 #BINUTILS_VERSION=2.20.1&lt;br /&gt;
 #GCC_VERSION=4.4.4&lt;br /&gt;
 #NEWLIB_VERSION=1.18.0&lt;br /&gt;
 #GDB_VERSION=7.1&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 # * No need to change anything below this line, exept improvements             *&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # On multicore Processor this value can speedup the compilation&lt;br /&gt;
 if grep -q &amp;quot;processor&amp;quot; /proc/cpuinfo || grep -q &amp;quot;siblings&amp;quot; /proc/cpuinfo&lt;br /&gt;
 then&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;-j &amp;quot;$(($( grep &amp;quot;processor&amp;quot; /proc/cpuinfo | sort -u | wc -l ) * $( grep &amp;quot;siblings&amp;quot; /proc/cpuinfo | tail -1 | cut -d: -f2 )))&lt;br /&gt;
 else&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Install texinfo tool&lt;br /&gt;
 sudo apt-get install texinfo&lt;br /&gt;
 &lt;br /&gt;
 # A GCC v3.4 64Bit install to avoid issues whil compiling the crosscompiler, native compile use would be much better&lt;br /&gt;
 # Or, get debian packages from here http://www.openuas.org/pub/ubuntu/pool/universe/g/gcc-3.4/ or http://es.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4_3.4.6-8ubuntu2_amd64.deb &lt;br /&gt;
 # Must be installed in this order&lt;br /&gt;
 sudo dpkg -i gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i gcc-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm *.deb&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 BINUTILS=binutils-$BINUTILS_VERSION&lt;br /&gt;
 GCC=gcc-$GCC_VERSION&lt;br /&gt;
 NEWLIB=newlib-$NEWLIB_VERSION&lt;br /&gt;
 GDB=gdb-$GDB_VERSION&lt;br /&gt;
 &lt;br /&gt;
 mkdir $PREFIX&lt;br /&gt;
 &lt;br /&gt;
 # ** Now set the gcc and tools to be used in environment&lt;br /&gt;
 echo 'export PATH='$PREFIX'/bin:$PATH' &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 source ~/.bashrc&lt;br /&gt;
 &lt;br /&gt;
 rm -drf build&lt;br /&gt;
 mkdir build&lt;br /&gt;
 &lt;br /&gt;
 # Get and compile the BinUtils&lt;br /&gt;
 wget -N -c http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2&lt;br /&gt;
 tar xfvj $BINUTILS.tar.bz2 &lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$BINUTILS/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $BINUTILS&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $BINUTILS.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # ** Get and compile GCC stuff&lt;br /&gt;
 wget -N -c ftp://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.bz2&lt;br /&gt;
 tar xfvj $GCC.tar.bz2&lt;br /&gt;
 &lt;br /&gt;
 # Set correct MULTILIB options in GCC config, by patching&lt;br /&gt;
 ONTHFLYPATCHFILE='gcc_thumb_interwork_settings.patch'&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE #Just to make sure&lt;br /&gt;
 echo '--- t-arm-elf	2003-09-30 12:21:41.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+++ t-arm-elf	2010-08-07 19:17:47.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '@@ -26,8 +26,8 @@' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_DIRNAMES   += 32bit 26bit' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 patch $GCC/gcc/config/arm/t-arm-elf &amp;lt; $ONTHFLYPATCHFILE&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE&lt;br /&gt;
 cd build&lt;br /&gt;
 &lt;br /&gt;
 # IMPR &amp;quot;../$GCC/gcc/collect2.c&amp;quot; ajust the line in this file to prevent compiler error for older gcc to &amp;quot;redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU);&amp;quot;&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --enable-languages=c --prefix=$PREFIX --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot; --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4  all&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 # NOTE: We do not delete GCC temporary build yet, we need it once more later in this script&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $GCC.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Now get and compile NewLib, note that sometimes this server is to busy serving the files,&lt;br /&gt;
 # try to get the files via an FTP client with good resume if it happens&lt;br /&gt;
 wget -N -c --waitretry=20 http://www.openuas.org/pub/newlib/$NEWLIB.tar.gz&lt;br /&gt;
 tar xfvz $NEWLIB.tar.gz&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$NEWLIB/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4  install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $NEWLIB &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm -rf $NEWLIB.tar.gz&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # GCC needs to be build again including the real newlib now&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-languages=&amp;quot;c,c++&amp;quot; --with-newlib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --build=x86_64-linux-gnu --host=x86_64-linux-gnu --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 all-gcc&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install-gcc&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $GCC&lt;br /&gt;
 rm -rf build&lt;br /&gt;
 &lt;br /&gt;
 # We need a symlink to arm-elf-gcc in /usr/bin/ the way the current paparazzi AP compile script works&lt;br /&gt;
 # We need a better solution here then symlinks, any clues...plz improve&lt;br /&gt;
 # Yes, helping with a better use of shell by using arm-elf wild-cards is appreciated &lt;br /&gt;
 PREFIXBINDIR=$PREFIX/bin&lt;br /&gt;
 OURBINDIR=/usr/bin&lt;br /&gt;
 #Remove old symlinks&lt;br /&gt;
 for x in $OURBINDIR/arm-elf*; do if [ -L $x ]; then sudo rm $x; fi ; done&lt;br /&gt;
 #Make fresh symlinks so arm tools ar found by paparazzi center&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-addr2line $OURBINDIR/arm-elf-addr2line&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ar $OURBINDIR/arm-elf-ar&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-as $OURBINDIR/arm-elf-as&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-c++filt $OURBINDIR/arm-elf-c++filt&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-cpp $OURBINDIR/arm-elf-cpp&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc-3.4.4 $OURBINDIR/arm-elf-gcc-3.4.4&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gccbug $OURBINDIR/arm-elf-gccbug&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcov $OURBINDIR/arm-elf-gcov&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ld $OURBINDIR/arm-elf-ld&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ranlib $OURBINDIR/arm-elf-ranlib&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-readelf $OURBINDIR/arm-elf-readelf&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strings $OURBINDIR/arm-elf-strings&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strip $OURBINDIR/arm-elf-strip&lt;br /&gt;
 &lt;br /&gt;
 # If you also a want to add the debugger, Uncomen the lines here. Configure could need parameter &amp;quot;--disable-werror&amp;quot; in some cases&lt;br /&gt;
 #wget -N -c ftp://ftp.gnu.org/gnu/gdb/$GDB.tar.bz2&lt;br /&gt;
 #tar xfvj $GDB.tar.bz2&lt;br /&gt;
 #cd build&lt;br /&gt;
 #../$GDB/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib&lt;br /&gt;
 #make $SPEEDUPCOMPILATION&lt;br /&gt;
 #make install&lt;br /&gt;
 #cd ..&lt;br /&gt;
 &lt;br /&gt;
 #rm -rf build $GDB&lt;br /&gt;
 #if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 #then&lt;br /&gt;
 #  rm $GDB.tar.bz2&lt;br /&gt;
 #fi&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Misterious as this scripts progress might have looked, everything is now done, hopefully without any issue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run the script in a terminal window via:&lt;br /&gt;
&lt;br /&gt;
 $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt&lt;br /&gt;
&lt;br /&gt;
== Rest of code needed ==&lt;br /&gt;
&lt;br /&gt;
To install the rest we make a special directory &amp;quot;develop&amp;quot;. You can give it another name ofcourse.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/develop&lt;br /&gt;
&lt;br /&gt;
== LPC21ISP ==&lt;br /&gt;
&lt;br /&gt;
To get the software onto the main autopilot board a special tool is needed. We will use the great open-source LPC21ISP application. LPC21ISP is an in-circuit programming (ISP) tool for the microcontroller used on the Paparazzi autopilot boards. The lpc21isp project is hosted on sourceforge and one can find the source packages and information at http://sourceforge.net/projects/lpc21isp/ &lt;br /&gt;
&lt;br /&gt;
Get the SVN version via&lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/lpc21isp&lt;br /&gt;
 $ cd ~/develop/lpc21isp&lt;br /&gt;
 $ svn co https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp lpc21&lt;br /&gt;
&lt;br /&gt;
To compile go into the source directory and then do&lt;br /&gt;
&lt;br /&gt;
 $ cd lpc21&lt;br /&gt;
 $ make -f Makefile clean all&lt;br /&gt;
&lt;br /&gt;
To install&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp lpc21isp /usr/bin/&lt;br /&gt;
&lt;br /&gt;
==  IVY ==&lt;br /&gt;
&lt;br /&gt;
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www2.tls.cena.fr/products/ivy/  &lt;br /&gt;
&lt;br /&gt;
In the paparazzi project, Ivy is used to send telemetry data to where ever you want.&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not confuse this IVY with the Apache Ivy project. &lt;br /&gt;
&lt;br /&gt;
=== Ivy-python ===&lt;br /&gt;
&lt;br /&gt;
The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository. However since this is the from scratch page we will download it from the official source repository via &lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/ivy-python/&lt;br /&gt;
 $ cd ~/develop/ivy-python/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk&lt;br /&gt;
&lt;br /&gt;
Now we can build and install&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-python/trunk&lt;br /&gt;
 $ sudo ./setup.py install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-c ===&lt;br /&gt;
&lt;br /&gt;
To be able to use IVY-c, the libraries need to be installed. Source packages of ivy-c can be downloaded via:&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-c&lt;br /&gt;
 $ cd ~/develop/ivy-c&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-c/trunk&lt;br /&gt;
&lt;br /&gt;
To compile&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-c/trunk/src&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
It is possible you get errors of the test module when compiling, just ignore the messages, it is not important for the Paparazzi project. Contact the IVY team to help them also to resolve also the testing makefile issue.&lt;br /&gt;
&lt;br /&gt;
Now install the compiled libraries&lt;br /&gt;
&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
If you get an error relating to ivytestready.c, make the following changes:&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/develop/ivy-c/trunk/tools/Ivy&lt;br /&gt;
 $ cd ~/develop/ivy-c/trunk/tools/Ivy&lt;br /&gt;
 $ cp ../../src/ivy.h .&lt;br /&gt;
 $ cp ../../src/ivyloop.h .&lt;br /&gt;
 $ cp ../../src/ivysocket.h .&lt;br /&gt;
 $ cp ../../src/timer.h .&lt;br /&gt;
 $ cd ~/develop/ivy-c/trunk/src&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
This copies files from the src directory to the Ivy folder in tools which did not appear after running svn above.&lt;br /&gt;
&lt;br /&gt;
=== Ivy-OCAML ===&lt;br /&gt;
&lt;br /&gt;
The Ivy-ocaml is a Library that make it possible to use Ivy via the Ocaml language.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-ocaml&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk&lt;br /&gt;
&lt;br /&gt;
NOTE: If the above SVN repository does not work due to API incompatibilities get the ivy-ocaml source via&lt;br /&gt;
&lt;br /&gt;
 $ wget http://paparazzi.enac.fr/ubuntu/dists/natty/main/binary-i386/ivy-ocaml_1.1-12.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now we need to compile the source via&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/trunk&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu use the wget method listed above. Then run&lt;br /&gt;
&lt;br /&gt;
 $ tar -zxvf ivy-ocaml_1.1-12.tar.gz&lt;br /&gt;
 $ cd ivy&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
== Paparazzi Main sourcecode ==&lt;br /&gt;
&lt;br /&gt;
To run the Ground control station and to be able to create airborne code for the Autopilot board and more one needs to get the Paparazzi source via&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/paparazzi/paparazzi.git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now it will compile. run paparazzi and test it with a simulation via &lt;br /&gt;
&lt;br /&gt;
 $ cd paparazzi&lt;br /&gt;
 $ sudo make&lt;br /&gt;
 $ ./paparazzi&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
See also the main installation page&lt;br /&gt;
&lt;br /&gt;
TIP: &lt;br /&gt;
If you get the File &amp;quot;pprz.mli&amp;quot;, line 149, characters 78-89: Error: Unbound type constructor Ivy.binding&lt;br /&gt;
...this happens when IVY libraries are not yet installed. How to do this, read the part on installing IVY on this page&lt;br /&gt;
&lt;br /&gt;
Ubuntu Users&lt;br /&gt;
You may see the message &amp;quot;Not building usb_lib: ARMGCC= not found&amp;quot; after running the &amp;quot;sudo make&amp;quot; command, do not worry as this is ok.&lt;br /&gt;
See http://lists.gnu.org/archive/html/paparazzi-devel/2011-04/msg00057.html for more information&lt;br /&gt;
&lt;br /&gt;
=== Set the UDev rules ===&lt;br /&gt;
&lt;br /&gt;
To be able to access the Hardware attached to your PC later on, rules must be set in your OS. By setting the correct rules a regular user can access USB and other devices, otherwise restricted for only the root user.&lt;br /&gt;
&lt;br /&gt;
Open a terminal, change do your Paparazzi dir, then&lt;br /&gt;
&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
Test via &lt;br /&gt;
&lt;br /&gt;
 $ udevadm info -q all -n /dev/paparazzi/serial&lt;br /&gt;
&lt;br /&gt;
If you want to learn more about what UDEV is, [http://www.openuas.org/pub/writing_udev_rules.html there is a very informative page about '''udev''' here]&lt;br /&gt;
&lt;br /&gt;
== The depriciated -mapcs-32 option ==&lt;br /&gt;
&lt;br /&gt;
The option &amp;quot;-mapcs-32&amp;quot; is only available with very old tool chain versions e.g. GCC-3.3.x. More recent tool chains will either require &amp;quot;-mabi=apcs-gnu&amp;quot; (non-EABI-compliant) or &amp;quot;-mabi=aapcs-linux&amp;quot; (EABI-compliant). To have an overview of all flags go here&lt;br /&gt;
&lt;br /&gt;
http://ecos.sourceware.org/docs-1.3.1/ref/gnupro-ref/arm/ARM_COMBO_ch01.html&lt;br /&gt;
&lt;br /&gt;
By changing -mapcs-32 with -Wa,-mapcs-32 compilation will work with more recent compilers and we have backward compatibility with the old flag for older compilers. The option -Wa,-mapcs-32 is doing the following: ''-Wa,option'' : Pass option as an option to the assembler. If option contains commas, it is split into multiple options at the commas.&lt;br /&gt;
&lt;br /&gt;
The -mapcs-32 option generates code for a processor running with a 32-bit program counter and conforming to the function calling standards for the APCS 32-bit option. If interested in depth what APCS is read the following: http://www.openuas.org/site/APCS.txt&lt;br /&gt;
&lt;br /&gt;
The gcc flag -mapcs-32 was deprecated since gcc-3.4.0 and finally removed in gcc-4.0.0 which unconditionally generates 32bit ARM code. You should not need to pass this flag to the assembler either but it might not hurt for backwards compatibility with older compilers, so it's best to leave it in with the -Wa, option metho&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/esden/summon-arm-toolchain&lt;br /&gt;
&lt;br /&gt;
https://github.com/paparazzi/paparazzi-portability-support&lt;br /&gt;
&lt;br /&gt;
http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk/conf/Makefile.stm32&lt;br /&gt;
&lt;br /&gt;
http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
&lt;br /&gt;
http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
&lt;br /&gt;
http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
&lt;br /&gt;
http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
&lt;br /&gt;
http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Matthewdally</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9998</id>
		<title>Installation/FromScratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9998"/>
		<updated>2011-08-30T03:41:30Z</updated>

		<summary type="html">&lt;p&gt;Matthewdally: /* Ivy-OCAML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
&lt;br /&gt;
As with all Wiki pages, also this page is a work in progress. try to be a big help to the Paparazzi project and improve this page whenever you can. If you have a distribution different from Ubuntu which doesn't satisfy any other dependency and have instructions about compiling it, packaging it, feel free to add any reference on how to do that on this wikipage.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this page is to clarify about which version of each piece of software has to be compiled, where to find that software, patches needed to make it compile on Linux. In our case 64bit Linux. This includes compiling all paparazzi-dev, paparazzi-arm7, paparazzi-stm32 and paparazzi-bin software on your machine, running an Ubuntu Lucid Lynx or later Linux distribution or maybe even FreeBSD, or OSX.&lt;br /&gt;
&lt;br /&gt;
== The shortcut ==&lt;br /&gt;
&lt;br /&gt;
Maybe you are no so interested in the details at this moment and just want to quickly install. That's fine, for that we are working on a script and you only need to run one line to get everything installed. For this to work out you do need a working internet connection, but since you can read this text, that will probably not pose a problem.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~ &amp;amp;&amp;amp; wget http://openuas.org/pub/paparazzifromscratch.sh (still not ready and a work in progress)&lt;br /&gt;
&lt;br /&gt;
If you used the line above, and it all worked out you can stop reading now since everything is installed and compiled, ready for you to use.&lt;br /&gt;
&lt;br /&gt;
== Paparazzi-dev packages ==&lt;br /&gt;
&lt;br /&gt;
For Ubuntu users, you can install the following packages from standard repository. You can just copy the line(s) and paste into your terminal. But do not copy the $ sign, this symbol is just added on this page to show that it is to be pasted at a normal terminal prompt.&lt;br /&gt;
&lt;br /&gt;
=== Whole lot in one ===&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                       liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev libpcre-ocaml \&lt;br /&gt;
                       libpcre-ocaml-dev libgnomecanvas2-0 libgnomecanvas2-dev libglade2-0 libglade2-dev make build-essential \&lt;br /&gt;
                       git-core gnuplot boa m4 libtool libftdi-dev libmpfr-dev tcl8.5-dev xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml and libraries ===&lt;br /&gt;
&lt;br /&gt;
Ocaml, short for Objective Caml is the most popular variant of the Caml language. The Paparazzi Ground Control Station (GCS) and some of it's tools are crafted in this language.&lt;br /&gt;
&lt;br /&gt;
* ocaml, ocaml-camlimages-devel, ocaml-lablgtk2-devel, ocaml-xml-light-devel, ocamlnet-ocaml-devel&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                        liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Gnome canvas Library ===&lt;br /&gt;
&lt;br /&gt;
The GnomeCanvas is an engine for structured graphics that offers a rich imaging model, high performance rendering, and a powerful, high level API. This widget can be used for flexible display of graphics and for creating interactive user interface elements.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libgnomecanvas2-0 libgnomecanvas2-dev&lt;br /&gt;
&lt;br /&gt;
=== USB Library ===&lt;br /&gt;
&lt;br /&gt;
The libusb project aims to create a library for use by user level applications to access USB devices regardless of OS. http://www.libusb.org&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libusb-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml PCRE ===&lt;br /&gt;
&lt;br /&gt;
This OCaml-library interfaces the PCRE (Perl-compatibility regular expressions) C library. it can be used for matching regular expressions which are written in Perl style.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libpcre-ocaml libpcre-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Glade Library ===&lt;br /&gt;
&lt;br /&gt;
Libglade is a library that performs a similar job to the C source output routines in the GLADE user interface builder. Whereas GLADE's output routines create C source code that must be compiled, libglade builds the interface from an XML file (GLADE's save format) at runtime. This can allow modifying the user interface without recompiling.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libglade2-0 libglade2-dev&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install tcl8.5-dev&lt;br /&gt;
&lt;br /&gt;
Also the some utils are required to compile and  install Ivy.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Make ===&lt;br /&gt;
&lt;br /&gt;
GNU Make is an utility which controls the generation of executables and other target files of a program from the program's source files. &lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install make&lt;br /&gt;
&lt;br /&gt;
=== Build essential ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Libtool ===&lt;br /&gt;
&lt;br /&gt;
GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface. Creating the files for Paparazzi software building becomes less cumbersome by using this tool.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libtool&lt;br /&gt;
&lt;br /&gt;
=== Git Client ===&lt;br /&gt;
&lt;br /&gt;
Git is a version control system. Version control systems allow many individuals to collaborate on the Paparazzi source code. This is needed to retrieve the latest sourcecode from various packages and Paparazzi sourcecode itself.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
=== GNU Plot ===&lt;br /&gt;
&lt;br /&gt;
A command-line driven interactive plotting program. Unknow if it is used&lt;br /&gt;
 &lt;br /&gt;
 $ sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
=== FTDI library ===&lt;br /&gt;
&lt;br /&gt;
libftdi is a library that talks to FTDI's 232 type chips, including the popular bitbang mode, using libusb. A library to be able to use with a debugging Autopilot hardware boards.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libftdi-dev &lt;br /&gt;
&lt;br /&gt;
=== MPFR library ===&lt;br /&gt;
&lt;br /&gt;
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding. MPFR is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libmpfr-dev&lt;br /&gt;
&lt;br /&gt;
=== ImageMagick ===&lt;br /&gt;
&lt;br /&gt;
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. Being able to modify image based map pictures is a feature that may come in handy one time.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install imagemagick&lt;br /&gt;
&lt;br /&gt;
=== Optional on an older OS ===&lt;br /&gt;
&lt;br /&gt;
If you have an older OS distribution it never hurts to install the following...&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev zlibc&lt;br /&gt;
&lt;br /&gt;
== Building the Cross compiler toolchain ==&lt;br /&gt;
&lt;br /&gt;
The goal of this part is to building an ARM and STM32 cross-toolchain with binutils gcc newlib and gdb from source. This is needed so we can compile the code that ends up onto the autopilot board. Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products. Enter the following on your command prompt&lt;br /&gt;
&lt;br /&gt;
 $ cd ~&lt;br /&gt;
 $ nano paparazzi_from_scratch.sh&lt;br /&gt;
&lt;br /&gt;
Then copy the part below (CTRL+C) and go to your terminal window again and use CTRL+SHIFT+V to paste the text into the nano editor. Afterther save the file with CTRL+X and answer Y &lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 #&lt;br /&gt;
 # Goal: Get the ARM and STM32 cross compilers, tools and libraries installed and all &lt;br /&gt;
 #       working on 64Bit (Linux) computer system like they should&lt;br /&gt;
 # Version:  1.7 &lt;br /&gt;
 # Copyright: 2011 LGPL OpenUAS http://www.openuas.org/&lt;br /&gt;
 # Date: 20110225 14:01&lt;br /&gt;
 # Usage: $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt  &lt;br /&gt;
 #        &lt;br /&gt;
 # I want to improve this script, what can I do?&lt;br /&gt;
 #&lt;br /&gt;
 #  IMPR: Add STM32 support&lt;br /&gt;
 #  IMPR: with automatic log filename appending date like &amp;quot;date +%y%j%H%M%S&amp;quot;&lt;br /&gt;
 #  IMPR: Set MAJOR and MINOR GCC version in make parameter automatically&lt;br /&gt;
 #  IMPR: Add all commands from this wikipage also to the script, so we have a &lt;br /&gt;
 #        full paparazzi from scratch in one script!&lt;br /&gt;
 #&lt;br /&gt;
 # Useful links:&lt;br /&gt;
 # http://fun-tech.se/stm32/gcc/index.php&lt;br /&gt;
 # http://only.mawhrin.net/~alexey/prg/lpc2103/toolchain/&lt;br /&gt;
 # http://gcc.gnu.org/install/configure.html&lt;br /&gt;
 # http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
 # http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
 # http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
 # http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
 # http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
 # http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
 # http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Gcc433&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Compiling_CHDK_under_Linux&lt;br /&gt;
 #&lt;br /&gt;
 # http://gcc.gnu.org/faq.html#multiple&lt;br /&gt;
 # https://wiki.kubuntu.org/CompilerFlags&lt;br /&gt;
 #&lt;br /&gt;
 # Older compiler http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=91596&lt;br /&gt;
 # Replaced O_CREAT for S_IRWXU in the files where you get gcc-3.4.4/gcc/collect2.c&lt;br /&gt;
 #&lt;br /&gt;
 # The eBook &amp;quot;Definitive guide to GCC&amp;quot; may come in handy&lt;br /&gt;
 #&lt;br /&gt;
 # And if all went well, a command&lt;br /&gt;
 #  $ arm-elf-gcc -print-multi-lib&lt;br /&gt;
 #&lt;br /&gt;
 # Should give the following &lt;br /&gt;
 #&lt;br /&gt;
 # .;&lt;br /&gt;
 # thumb;@mthumb&lt;br /&gt;
 # interwork;@mthumb-interwork&lt;br /&gt;
 # thumb/interwork;@mthumb@mthumb-interwork&lt;br /&gt;
 #&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # In case you want to recompile, and if you do not want to re-download the files&lt;br /&gt;
 # to save time and bandwith set CLEANUPDOWNLOADS to N&lt;br /&gt;
 CLEANUPDOWNLOADS=&amp;quot;N&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 TARGET=arm-elf  #Or use  TARGET=arm-none-eabi or arm_non_eabi the pararazzi makefile will figure it out&lt;br /&gt;
 PREFIX=$HOME/arm-elf-paparazzi # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 &lt;br /&gt;
 # If you have a good reason to compile other versions, ONLY then change the version data below&lt;br /&gt;
 BINUTILS_VERSION=2.16.1&lt;br /&gt;
 GCC_VERSION=3.4.4&lt;br /&gt;
 NEWLIB_VERSION=1.13.0&lt;br /&gt;
 GDB_VERSION=6.8&lt;br /&gt;
 &lt;br /&gt;
 #Just in case for some reason you want the latest versions a just values here&lt;br /&gt;
 # and some more 3.4 in the rest of the script&lt;br /&gt;
 #TARGET=arm-elf&lt;br /&gt;
 #PREFIX=$HOME/arm-elf-latest # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 #BINUTILS_VERSION=2.20.1&lt;br /&gt;
 #GCC_VERSION=4.4.4&lt;br /&gt;
 #NEWLIB_VERSION=1.18.0&lt;br /&gt;
 #GDB_VERSION=7.1&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 # * No need to change anything below this line, exept improvements             *&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # On multicore Processor this value can speedup the compilation&lt;br /&gt;
 if grep -q &amp;quot;processor&amp;quot; /proc/cpuinfo || grep -q &amp;quot;siblings&amp;quot; /proc/cpuinfo&lt;br /&gt;
 then&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;-j &amp;quot;$(($( grep &amp;quot;processor&amp;quot; /proc/cpuinfo | sort -u | wc -l ) * $( grep &amp;quot;siblings&amp;quot; /proc/cpuinfo | tail -1 | cut -d: -f2 )))&lt;br /&gt;
 else&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Install texinfo tool&lt;br /&gt;
 sudo apt-get install texinfo&lt;br /&gt;
 &lt;br /&gt;
 # A GCC v3.4 64Bit install to avoid issues whil compiling the crosscompiler, native compile use would be much better&lt;br /&gt;
 # Or, get debian packages from here http://www.openuas.org/pub/ubuntu/pool/universe/g/gcc-3.4/ or http://es.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4_3.4.6-8ubuntu2_amd64.deb &lt;br /&gt;
 # Must be installed in this order&lt;br /&gt;
 sudo dpkg -i gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i gcc-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm *.deb&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 BINUTILS=binutils-$BINUTILS_VERSION&lt;br /&gt;
 GCC=gcc-$GCC_VERSION&lt;br /&gt;
 NEWLIB=newlib-$NEWLIB_VERSION&lt;br /&gt;
 GDB=gdb-$GDB_VERSION&lt;br /&gt;
 &lt;br /&gt;
 mkdir $PREFIX&lt;br /&gt;
 &lt;br /&gt;
 # ** Now set the gcc and tools to be used in environment&lt;br /&gt;
 echo 'export PATH='$PREFIX'/bin:$PATH' &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 source ~/.bashrc&lt;br /&gt;
 &lt;br /&gt;
 rm -drf build&lt;br /&gt;
 mkdir build&lt;br /&gt;
 &lt;br /&gt;
 # Get and compile the BinUtils&lt;br /&gt;
 wget -N -c http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2&lt;br /&gt;
 tar xfvj $BINUTILS.tar.bz2 &lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$BINUTILS/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $BINUTILS&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $BINUTILS.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # ** Get and compile GCC stuff&lt;br /&gt;
 wget -N -c ftp://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.bz2&lt;br /&gt;
 tar xfvj $GCC.tar.bz2&lt;br /&gt;
 &lt;br /&gt;
 # Set correct MULTILIB options in GCC config, by patching&lt;br /&gt;
 ONTHFLYPATCHFILE='gcc_thumb_interwork_settings.patch'&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE #Just to make sure&lt;br /&gt;
 echo '--- t-arm-elf	2003-09-30 12:21:41.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+++ t-arm-elf	2010-08-07 19:17:47.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '@@ -26,8 +26,8 @@' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_DIRNAMES   += 32bit 26bit' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 patch $GCC/gcc/config/arm/t-arm-elf &amp;lt; $ONTHFLYPATCHFILE&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE&lt;br /&gt;
 cd build&lt;br /&gt;
 &lt;br /&gt;
 # IMPR &amp;quot;../$GCC/gcc/collect2.c&amp;quot; ajust the line in this file to prevent compiler error for older gcc to &amp;quot;redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU);&amp;quot;&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --enable-languages=c --prefix=$PREFIX --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot; --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4  all&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 # NOTE: We do not delete GCC temporary build yet, we need it once more later in this script&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $GCC.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Now get and compile NewLib, note that sometimes this server is to busy serving the files,&lt;br /&gt;
 # try to get the files via an FTP client with good resume if it happens&lt;br /&gt;
 wget -N -c --waitretry=20 http://www.openuas.org/pub/newlib/$NEWLIB.tar.gz&lt;br /&gt;
 tar xfvz $NEWLIB.tar.gz&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$NEWLIB/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4  install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $NEWLIB &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm -rf $NEWLIB.tar.gz&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # GCC needs to be build again including the real newlib now&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-languages=&amp;quot;c,c++&amp;quot; --with-newlib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --build=x86_64-linux-gnu --host=x86_64-linux-gnu --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 all-gcc&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install-gcc&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $GCC&lt;br /&gt;
 rm -rf build&lt;br /&gt;
 &lt;br /&gt;
 # We need a symlink to arm-elf-gcc in /usr/bin/ the way the current paparazzi AP compile script works&lt;br /&gt;
 # We need a better solution here then symlinks, any clues...plz improve&lt;br /&gt;
 # Yes, helping with a better use of shell by using arm-elf wild-cards is appreciated &lt;br /&gt;
 PREFIXBINDIR=$PREFIX/bin&lt;br /&gt;
 OURBINDIR=/usr/bin&lt;br /&gt;
 #Remove old symlinks&lt;br /&gt;
 for x in $OURBINDIR/arm-elf*; do if [ -L $x ]; then sudo rm $x; fi ; done&lt;br /&gt;
 #Make fresh symlinks so arm tools ar found by paparazzi center&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-addr2line $OURBINDIR/arm-elf-addr2line&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ar $OURBINDIR/arm-elf-ar&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-as $OURBINDIR/arm-elf-as&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-c++filt $OURBINDIR/arm-elf-c++filt&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-cpp $OURBINDIR/arm-elf-cpp&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc-3.4.4 $OURBINDIR/arm-elf-gcc-3.4.4&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gccbug $OURBINDIR/arm-elf-gccbug&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcov $OURBINDIR/arm-elf-gcov&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ld $OURBINDIR/arm-elf-ld&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ranlib $OURBINDIR/arm-elf-ranlib&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-readelf $OURBINDIR/arm-elf-readelf&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strings $OURBINDIR/arm-elf-strings&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strip $OURBINDIR/arm-elf-strip&lt;br /&gt;
 &lt;br /&gt;
 # If you also a want to add the debugger, Uncomen the lines here. Configure could need parameter &amp;quot;--disable-werror&amp;quot; in some cases&lt;br /&gt;
 #wget -N -c ftp://ftp.gnu.org/gnu/gdb/$GDB.tar.bz2&lt;br /&gt;
 #tar xfvj $GDB.tar.bz2&lt;br /&gt;
 #cd build&lt;br /&gt;
 #../$GDB/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib&lt;br /&gt;
 #make $SPEEDUPCOMPILATION&lt;br /&gt;
 #make install&lt;br /&gt;
 #cd ..&lt;br /&gt;
 &lt;br /&gt;
 #rm -rf build $GDB&lt;br /&gt;
 #if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 #then&lt;br /&gt;
 #  rm $GDB.tar.bz2&lt;br /&gt;
 #fi&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Misterious as this scripts progress might have looked, everything is now done, hopefully without any issue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run the script in a terminal window via:&lt;br /&gt;
&lt;br /&gt;
 $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt&lt;br /&gt;
&lt;br /&gt;
== Rest of code needed ==&lt;br /&gt;
&lt;br /&gt;
To install the rest we make a special directory &amp;quot;develop&amp;quot;. You can give it another name ofcourse.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/develop&lt;br /&gt;
&lt;br /&gt;
== LPC21ISP ==&lt;br /&gt;
&lt;br /&gt;
To get the software onto the main autopilot board a special tool is needed. We will use the great open-source LPC21ISP application. LPC21ISP is an in-circuit programming (ISP) tool for the microcontroller used on the Paparazzi autopilot boards. The lpc21isp project is hosted on sourceforge and one can find the source packages and information at http://sourceforge.net/projects/lpc21isp/ &lt;br /&gt;
&lt;br /&gt;
Get the SVN version via&lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/lpc21isp&lt;br /&gt;
 $ cd ~/develop/lpc21isp&lt;br /&gt;
 $ svn co https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp lpc21&lt;br /&gt;
&lt;br /&gt;
To compile go into the source directory and then do&lt;br /&gt;
&lt;br /&gt;
 $ cd lpc21&lt;br /&gt;
 $ make -f Makefile clean all&lt;br /&gt;
&lt;br /&gt;
To install&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp lpc21isp /usr/bin/&lt;br /&gt;
&lt;br /&gt;
==  IVY ==&lt;br /&gt;
&lt;br /&gt;
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www2.tls.cena.fr/products/ivy/  &lt;br /&gt;
&lt;br /&gt;
In the paparazzi project, Ivy is used to send telemetry data to where ever you want.&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not confuse this IVY with the Apache Ivy project. &lt;br /&gt;
&lt;br /&gt;
=== Ivy-python ===&lt;br /&gt;
&lt;br /&gt;
The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository. However since this is the from scratch page we will download it from the official source repository via &lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/ivy-python/&lt;br /&gt;
 $ cd ~/develop/ivy-python/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk&lt;br /&gt;
&lt;br /&gt;
Now we can build and install&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-python/trunk&lt;br /&gt;
 $ sudo ./setup.py install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-c ===&lt;br /&gt;
&lt;br /&gt;
To be able to use IVY-c, the libraries need to be installed. Source packages of ivy-c can be downloaded via:&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-c&lt;br /&gt;
 $ cd ~/develop/ivy-c&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-c/trunk&lt;br /&gt;
&lt;br /&gt;
To compile&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-c/trunk/src&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
It is possible you get errors of the test module when compiling, just ignore the messages, it is not important for the Paparazzi project. Contact the IVY team to help them also to resolve also the testing makefile issue.&lt;br /&gt;
&lt;br /&gt;
Now install the compiled libraries&lt;br /&gt;
&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-OCAML ===&lt;br /&gt;
&lt;br /&gt;
The Ivy-ocaml is a Library that make it possible to use Ivy via the Ocaml language.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-ocaml&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk&lt;br /&gt;
&lt;br /&gt;
NOTE: If the above SVN repository does not work due to API incompatibilities get the ivy-ocaml source via&lt;br /&gt;
&lt;br /&gt;
 $ wget http://paparazzi.enac.fr/ubuntu/dists/natty/main/binary-i386/ivy-ocaml_1.1-12.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now we need to compile the source via&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/trunk&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu use the wget method listed above. Then run&lt;br /&gt;
&lt;br /&gt;
 $ tar -zxvf ivy-ocaml_1.1-12.tar.gz&lt;br /&gt;
 $ cd ivy&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
== Paparazzi Main sourcecode ==&lt;br /&gt;
&lt;br /&gt;
To run the Ground control station and to be able to create airborne code for the Autopilot board and more one needs to get the Paparazzi source via&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/paparazzi/paparazzi.git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now it will compile. run paparazzi and test it with a simulation via &lt;br /&gt;
&lt;br /&gt;
 $ cd paparazzi&lt;br /&gt;
 $ sudo make&lt;br /&gt;
 $ ./paparazzi&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
See also the main installation page&lt;br /&gt;
&lt;br /&gt;
TIP: &lt;br /&gt;
If you get the File &amp;quot;pprz.mli&amp;quot;, line 149, characters 78-89: Error: Unbound type constructor Ivy.binding&lt;br /&gt;
...this happens when IVY libraries are not yet installed. How to do this, read the part on installing IVY on this page&lt;br /&gt;
&lt;br /&gt;
Ubuntu Users&lt;br /&gt;
You may see the message &amp;quot;Not building usb_lib: ARMGCC= not found&amp;quot; after running the &amp;quot;sudo make&amp;quot; command, do not worry as this is ok.&lt;br /&gt;
See http://lists.gnu.org/archive/html/paparazzi-devel/2011-04/msg00057.html for more information&lt;br /&gt;
&lt;br /&gt;
=== Set the UDev rules ===&lt;br /&gt;
&lt;br /&gt;
To be able to access the Hardware attached to your PC later on, rules must be set in your OS. By setting the correct rules a regular user can access USB and other devices, otherwise restricted for only the root user.&lt;br /&gt;
&lt;br /&gt;
Open a terminal, change do your Paparazzi dir, then&lt;br /&gt;
&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
Test via &lt;br /&gt;
&lt;br /&gt;
 $ udevadm info -q all -n /dev/paparazzi/serial&lt;br /&gt;
&lt;br /&gt;
If you want to learn more about what UDEV is, [http://www.openuas.org/pub/writing_udev_rules.html there is a very informative page about '''udev''' here]&lt;br /&gt;
&lt;br /&gt;
== The depriciated -mapcs-32 option ==&lt;br /&gt;
&lt;br /&gt;
The option &amp;quot;-mapcs-32&amp;quot; is only available with very old tool chain versions e.g. GCC-3.3.x. More recent tool chains will either require &amp;quot;-mabi=apcs-gnu&amp;quot; (non-EABI-compliant) or &amp;quot;-mabi=aapcs-linux&amp;quot; (EABI-compliant). To have an overview of all flags go here&lt;br /&gt;
&lt;br /&gt;
http://ecos.sourceware.org/docs-1.3.1/ref/gnupro-ref/arm/ARM_COMBO_ch01.html&lt;br /&gt;
&lt;br /&gt;
By changing -mapcs-32 with -Wa,-mapcs-32 compilation will work with more recent compilers and we have backward compatibility with the old flag for older compilers. The option -Wa,-mapcs-32 is doing the following: ''-Wa,option'' : Pass option as an option to the assembler. If option contains commas, it is split into multiple options at the commas.&lt;br /&gt;
&lt;br /&gt;
The -mapcs-32 option generates code for a processor running with a 32-bit program counter and conforming to the function calling standards for the APCS 32-bit option. If interested in depth what APCS is read the following: http://www.openuas.org/site/APCS.txt&lt;br /&gt;
&lt;br /&gt;
The gcc flag -mapcs-32 was deprecated since gcc-3.4.0 and finally removed in gcc-4.0.0 which unconditionally generates 32bit ARM code. You should not need to pass this flag to the assembler either but it might not hurt for backwards compatibility with older compilers, so it's best to leave it in with the -Wa, option metho&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/esden/summon-arm-toolchain&lt;br /&gt;
&lt;br /&gt;
https://github.com/paparazzi/paparazzi-portability-support&lt;br /&gt;
&lt;br /&gt;
http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk/conf/Makefile.stm32&lt;br /&gt;
&lt;br /&gt;
http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
&lt;br /&gt;
http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
&lt;br /&gt;
http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
&lt;br /&gt;
http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
&lt;br /&gt;
http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Matthewdally</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9997</id>
		<title>Installation/FromScratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=9997"/>
		<updated>2011-08-30T03:39:09Z</updated>

		<summary type="html">&lt;p&gt;Matthewdally: /* Paparazzi Main sourcecode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
&lt;br /&gt;
As with all Wiki pages, also this page is a work in progress. try to be a big help to the Paparazzi project and improve this page whenever you can. If you have a distribution different from Ubuntu which doesn't satisfy any other dependency and have instructions about compiling it, packaging it, feel free to add any reference on how to do that on this wikipage.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this page is to clarify about which version of each piece of software has to be compiled, where to find that software, patches needed to make it compile on Linux. In our case 64bit Linux. This includes compiling all paparazzi-dev, paparazzi-arm7, paparazzi-stm32 and paparazzi-bin software on your machine, running an Ubuntu Lucid Lynx or later Linux distribution or maybe even FreeBSD, or OSX.&lt;br /&gt;
&lt;br /&gt;
== The shortcut ==&lt;br /&gt;
&lt;br /&gt;
Maybe you are no so interested in the details at this moment and just want to quickly install. That's fine, for that we are working on a script and you only need to run one line to get everything installed. For this to work out you do need a working internet connection, but since you can read this text, that will probably not pose a problem.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~ &amp;amp;&amp;amp; wget http://openuas.org/pub/paparazzifromscratch.sh (still not ready and a work in progress)&lt;br /&gt;
&lt;br /&gt;
If you used the line above, and it all worked out you can stop reading now since everything is installed and compiled, ready for you to use.&lt;br /&gt;
&lt;br /&gt;
== Paparazzi-dev packages ==&lt;br /&gt;
&lt;br /&gt;
For Ubuntu users, you can install the following packages from standard repository. You can just copy the line(s) and paste into your terminal. But do not copy the $ sign, this symbol is just added on this page to show that it is to be pasted at a normal terminal prompt.&lt;br /&gt;
&lt;br /&gt;
=== Whole lot in one ===&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                       liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev libpcre-ocaml \&lt;br /&gt;
                       libpcre-ocaml-dev libgnomecanvas2-0 libgnomecanvas2-dev libglade2-0 libglade2-dev make build-essential \&lt;br /&gt;
                       git-core gnuplot boa m4 libtool libftdi-dev libmpfr-dev tcl8.5-dev xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml and libraries ===&lt;br /&gt;
&lt;br /&gt;
Ocaml, short for Objective Caml is the most popular variant of the Caml language. The Paparazzi Ground Control Station (GCS) and some of it's tools are crafted in this language.&lt;br /&gt;
&lt;br /&gt;
* ocaml, ocaml-camlimages-devel, ocaml-lablgtk2-devel, ocaml-xml-light-devel, ocamlnet-ocaml-devel&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                        liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Gnome canvas Library ===&lt;br /&gt;
&lt;br /&gt;
The GnomeCanvas is an engine for structured graphics that offers a rich imaging model, high performance rendering, and a powerful, high level API. This widget can be used for flexible display of graphics and for creating interactive user interface elements.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libgnomecanvas2-0 libgnomecanvas2-dev&lt;br /&gt;
&lt;br /&gt;
=== USB Library ===&lt;br /&gt;
&lt;br /&gt;
The libusb project aims to create a library for use by user level applications to access USB devices regardless of OS. http://www.libusb.org&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libusb-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml PCRE ===&lt;br /&gt;
&lt;br /&gt;
This OCaml-library interfaces the PCRE (Perl-compatibility regular expressions) C library. it can be used for matching regular expressions which are written in Perl style.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libpcre-ocaml libpcre-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Glade Library ===&lt;br /&gt;
&lt;br /&gt;
Libglade is a library that performs a similar job to the C source output routines in the GLADE user interface builder. Whereas GLADE's output routines create C source code that must be compiled, libglade builds the interface from an XML file (GLADE's save format) at runtime. This can allow modifying the user interface without recompiling.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libglade2-0 libglade2-dev&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install tcl8.5-dev&lt;br /&gt;
&lt;br /&gt;
Also the some utils are required to compile and  install Ivy.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Make ===&lt;br /&gt;
&lt;br /&gt;
GNU Make is an utility which controls the generation of executables and other target files of a program from the program's source files. &lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install make&lt;br /&gt;
&lt;br /&gt;
=== Build essential ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Libtool ===&lt;br /&gt;
&lt;br /&gt;
GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface. Creating the files for Paparazzi software building becomes less cumbersome by using this tool.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libtool&lt;br /&gt;
&lt;br /&gt;
=== Git Client ===&lt;br /&gt;
&lt;br /&gt;
Git is a version control system. Version control systems allow many individuals to collaborate on the Paparazzi source code. This is needed to retrieve the latest sourcecode from various packages and Paparazzi sourcecode itself.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
=== GNU Plot ===&lt;br /&gt;
&lt;br /&gt;
A command-line driven interactive plotting program. Unknow if it is used&lt;br /&gt;
 &lt;br /&gt;
 $ sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
=== FTDI library ===&lt;br /&gt;
&lt;br /&gt;
libftdi is a library that talks to FTDI's 232 type chips, including the popular bitbang mode, using libusb. A library to be able to use with a debugging Autopilot hardware boards.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libftdi-dev &lt;br /&gt;
&lt;br /&gt;
=== MPFR library ===&lt;br /&gt;
&lt;br /&gt;
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding. MPFR is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libmpfr-dev&lt;br /&gt;
&lt;br /&gt;
=== ImageMagick ===&lt;br /&gt;
&lt;br /&gt;
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. Being able to modify image based map pictures is a feature that may come in handy one time.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install imagemagick&lt;br /&gt;
&lt;br /&gt;
=== Optional on an older OS ===&lt;br /&gt;
&lt;br /&gt;
If you have an older OS distribution it never hurts to install the following...&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev zlibc&lt;br /&gt;
&lt;br /&gt;
== Building the Cross compiler toolchain ==&lt;br /&gt;
&lt;br /&gt;
The goal of this part is to building an ARM and STM32 cross-toolchain with binutils gcc newlib and gdb from source. This is needed so we can compile the code that ends up onto the autopilot board. Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products. Enter the following on your command prompt&lt;br /&gt;
&lt;br /&gt;
 $ cd ~&lt;br /&gt;
 $ nano paparazzi_from_scratch.sh&lt;br /&gt;
&lt;br /&gt;
Then copy the part below (CTRL+C) and go to your terminal window again and use CTRL+SHIFT+V to paste the text into the nano editor. Afterther save the file with CTRL+X and answer Y &lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 #&lt;br /&gt;
 # Goal: Get the ARM and STM32 cross compilers, tools and libraries installed and all &lt;br /&gt;
 #       working on 64Bit (Linux) computer system like they should&lt;br /&gt;
 # Version:  1.7 &lt;br /&gt;
 # Copyright: 2011 LGPL OpenUAS http://www.openuas.org/&lt;br /&gt;
 # Date: 20110225 14:01&lt;br /&gt;
 # Usage: $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt  &lt;br /&gt;
 #        &lt;br /&gt;
 # I want to improve this script, what can I do?&lt;br /&gt;
 #&lt;br /&gt;
 #  IMPR: Add STM32 support&lt;br /&gt;
 #  IMPR: with automatic log filename appending date like &amp;quot;date +%y%j%H%M%S&amp;quot;&lt;br /&gt;
 #  IMPR: Set MAJOR and MINOR GCC version in make parameter automatically&lt;br /&gt;
 #  IMPR: Add all commands from this wikipage also to the script, so we have a &lt;br /&gt;
 #        full paparazzi from scratch in one script!&lt;br /&gt;
 #&lt;br /&gt;
 # Useful links:&lt;br /&gt;
 # http://fun-tech.se/stm32/gcc/index.php&lt;br /&gt;
 # http://only.mawhrin.net/~alexey/prg/lpc2103/toolchain/&lt;br /&gt;
 # http://gcc.gnu.org/install/configure.html&lt;br /&gt;
 # http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
 # http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
 # http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
 # http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
 # http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
 # http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
 # http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Gcc433&lt;br /&gt;
 # http://chdk.wikia.com/wiki/Compiling_CHDK_under_Linux&lt;br /&gt;
 #&lt;br /&gt;
 # http://gcc.gnu.org/faq.html#multiple&lt;br /&gt;
 # https://wiki.kubuntu.org/CompilerFlags&lt;br /&gt;
 #&lt;br /&gt;
 # Older compiler http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=91596&lt;br /&gt;
 # Replaced O_CREAT for S_IRWXU in the files where you get gcc-3.4.4/gcc/collect2.c&lt;br /&gt;
 #&lt;br /&gt;
 # The eBook &amp;quot;Definitive guide to GCC&amp;quot; may come in handy&lt;br /&gt;
 #&lt;br /&gt;
 # And if all went well, a command&lt;br /&gt;
 #  $ arm-elf-gcc -print-multi-lib&lt;br /&gt;
 #&lt;br /&gt;
 # Should give the following &lt;br /&gt;
 #&lt;br /&gt;
 # .;&lt;br /&gt;
 # thumb;@mthumb&lt;br /&gt;
 # interwork;@mthumb-interwork&lt;br /&gt;
 # thumb/interwork;@mthumb@mthumb-interwork&lt;br /&gt;
 #&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # In case you want to recompile, and if you do not want to re-download the files&lt;br /&gt;
 # to save time and bandwith set CLEANUPDOWNLOADS to N&lt;br /&gt;
 CLEANUPDOWNLOADS=&amp;quot;N&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 TARGET=arm-elf  #Or use  TARGET=arm-none-eabi or arm_non_eabi the pararazzi makefile will figure it out&lt;br /&gt;
 PREFIX=$HOME/arm-elf-paparazzi # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 &lt;br /&gt;
 # If you have a good reason to compile other versions, ONLY then change the version data below&lt;br /&gt;
 BINUTILS_VERSION=2.16.1&lt;br /&gt;
 GCC_VERSION=3.4.4&lt;br /&gt;
 NEWLIB_VERSION=1.13.0&lt;br /&gt;
 GDB_VERSION=6.8&lt;br /&gt;
 &lt;br /&gt;
 #Just in case for some reason you want the latest versions a just values here&lt;br /&gt;
 # and some more 3.4 in the rest of the script&lt;br /&gt;
 #TARGET=arm-elf&lt;br /&gt;
 #PREFIX=$HOME/arm-elf-latest # Install location of the final toolchain, change this to your liking&lt;br /&gt;
 #BINUTILS_VERSION=2.20.1&lt;br /&gt;
 #GCC_VERSION=4.4.4&lt;br /&gt;
 #NEWLIB_VERSION=1.18.0&lt;br /&gt;
 #GDB_VERSION=7.1&lt;br /&gt;
 &lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 # * No need to change anything below this line, exept improvements             *&lt;br /&gt;
 # ******************************************************************************&lt;br /&gt;
 &lt;br /&gt;
 # On multicore Processor this value can speedup the compilation&lt;br /&gt;
 if grep -q &amp;quot;processor&amp;quot; /proc/cpuinfo || grep -q &amp;quot;siblings&amp;quot; /proc/cpuinfo&lt;br /&gt;
 then&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;-j &amp;quot;$(($( grep &amp;quot;processor&amp;quot; /proc/cpuinfo | sort -u | wc -l ) * $( grep &amp;quot;siblings&amp;quot; /proc/cpuinfo | tail -1 | cut -d: -f2 )))&lt;br /&gt;
 else&lt;br /&gt;
   SPEEDUPCOMPILATION=&amp;quot;&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Install texinfo tool&lt;br /&gt;
 sudo apt-get install texinfo&lt;br /&gt;
 &lt;br /&gt;
 # A GCC v3.4 64Bit install to avoid issues whil compiling the crosscompiler, native compile use would be much better&lt;br /&gt;
 # Or, get debian packages from here http://www.openuas.org/pub/ubuntu/pool/universe/g/gcc-3.4/ or http://es.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 wget -N -c http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4_3.4.6-8ubuntu2_amd64.deb &lt;br /&gt;
 # Must be installed in this order&lt;br /&gt;
 sudo dpkg -i gcc-3.4-base_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i cpp-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 sudo dpkg -i gcc-3.4_3.4.6-8ubuntu2_amd64.deb&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm *.deb&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 BINUTILS=binutils-$BINUTILS_VERSION&lt;br /&gt;
 GCC=gcc-$GCC_VERSION&lt;br /&gt;
 NEWLIB=newlib-$NEWLIB_VERSION&lt;br /&gt;
 GDB=gdb-$GDB_VERSION&lt;br /&gt;
 &lt;br /&gt;
 mkdir $PREFIX&lt;br /&gt;
 &lt;br /&gt;
 # ** Now set the gcc and tools to be used in environment&lt;br /&gt;
 echo 'export PATH='$PREFIX'/bin:$PATH' &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 source ~/.bashrc&lt;br /&gt;
 &lt;br /&gt;
 rm -drf build&lt;br /&gt;
 mkdir build&lt;br /&gt;
 &lt;br /&gt;
 # Get and compile the BinUtils&lt;br /&gt;
 wget -N -c http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2&lt;br /&gt;
 tar xfvj $BINUTILS.tar.bz2 &lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$BINUTILS/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $BINUTILS&lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $BINUTILS.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # ** Get and compile GCC stuff&lt;br /&gt;
 wget -N -c ftp://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.bz2&lt;br /&gt;
 tar xfvj $GCC.tar.bz2&lt;br /&gt;
 &lt;br /&gt;
 # Set correct MULTILIB options in GCC config, by patching&lt;br /&gt;
 ONTHFLYPATCHFILE='gcc_thumb_interwork_settings.patch'&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE #Just to make sure&lt;br /&gt;
 echo '--- t-arm-elf	2003-09-30 12:21:41.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+++ t-arm-elf	2010-08-07 19:17:47.000000000 +0200' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '@@ -26,8 +26,8 @@' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_DIRNAMES   += 32bit 26bit' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '-# MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo '+MULTILIB_DIRNAMES   += normal interwork' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # ' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 echo ' # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore' &amp;gt;&amp;gt; $ONTHFLYPATCHFILE&lt;br /&gt;
 patch $GCC/gcc/config/arm/t-arm-elf &amp;lt; $ONTHFLYPATCHFILE&lt;br /&gt;
 rm -f $ONTHFLYPATCHFILE&lt;br /&gt;
 cd build&lt;br /&gt;
 &lt;br /&gt;
 # IMPR &amp;quot;../$GCC/gcc/collect2.c&amp;quot; ajust the line in this file to prevent compiler error for older gcc to &amp;quot;redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU);&amp;quot;&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --enable-languages=c --prefix=$PREFIX --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot; --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=$TARGET&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4  all&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 # NOTE: We do not delete GCC temporary build yet, we need it once more later in this script&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm $GCC.tar.bz2&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Now get and compile NewLib, note that sometimes this server is to busy serving the files,&lt;br /&gt;
 # try to get the files via an FTP client with good resume if it happens&lt;br /&gt;
 wget -N -c --waitretry=20 http://www.openuas.org/pub/newlib/$NEWLIB.tar.gz&lt;br /&gt;
 tar xfvz $NEWLIB.tar.gz&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$NEWLIB/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --build=x86_64-linux-gnu --host=x86_64-linux-gnu&lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 &lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4  install&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $NEWLIB &lt;br /&gt;
 if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
   rm -rf $NEWLIB.tar.gz&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # GCC needs to be build again including the real newlib now&lt;br /&gt;
 cd build&lt;br /&gt;
 unset CFLAGS &amp;amp;&amp;amp; unset LDFLAGS &amp;amp;&amp;amp; unset CPPFLAGS &amp;amp;&amp;amp; unset CXXFLAGS &amp;amp;&amp;amp;&lt;br /&gt;
 CC=gcc-3.4&lt;br /&gt;
 CXX=g++-3.4&lt;br /&gt;
 ../$GCC/configure -v --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib --enable-languages=&amp;quot;c,c++&amp;quot; --with-newlib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --build=x86_64-linux-gnu --host=x86_64-linux-gnu --infodir=$PREFIX&amp;quot;/share/info&amp;quot; --mandir=$PREFIX&amp;quot;/share/man&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 make $SPEEDUPCOMPILATION CC=gcc-3.4 CXX=g++-3.4 all-gcc&lt;br /&gt;
 make CC=gcc-3.4 CXX=g++-3.4 install-gcc&lt;br /&gt;
 cd ..&lt;br /&gt;
 rm -rf build/* $GCC&lt;br /&gt;
 rm -rf build&lt;br /&gt;
 &lt;br /&gt;
 # We need a symlink to arm-elf-gcc in /usr/bin/ the way the current paparazzi AP compile script works&lt;br /&gt;
 # We need a better solution here then symlinks, any clues...plz improve&lt;br /&gt;
 # Yes, helping with a better use of shell by using arm-elf wild-cards is appreciated &lt;br /&gt;
 PREFIXBINDIR=$PREFIX/bin&lt;br /&gt;
 OURBINDIR=/usr/bin&lt;br /&gt;
 #Remove old symlinks&lt;br /&gt;
 for x in $OURBINDIR/arm-elf*; do if [ -L $x ]; then sudo rm $x; fi ; done&lt;br /&gt;
 #Make fresh symlinks so arm tools ar found by paparazzi center&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-addr2line $OURBINDIR/arm-elf-addr2line&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ar $OURBINDIR/arm-elf-ar&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-as $OURBINDIR/arm-elf-as&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-c++filt $OURBINDIR/arm-elf-c++filt&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-cpp $OURBINDIR/arm-elf-cpp&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc $OURBINDIR/arm-elf-gcc&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcc-3.4.4 $OURBINDIR/arm-elf-gcc-3.4.4&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gccbug $OURBINDIR/arm-elf-gccbug&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-gcov $OURBINDIR/arm-elf-gcov&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ld $OURBINDIR/arm-elf-ld&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-nm $OURBINDIR/arm-elf-nm&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objcopy $OURBINDIR/arm-elf-objcopy&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-objdump $OURBINDIR/arm-elf-objdump&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-ranlib $OURBINDIR/arm-elf-ranlib&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-readelf $OURBINDIR/arm-elf-readelf&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-size $OURBINDIR/arm-elf-size&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strings $OURBINDIR/arm-elf-strings&lt;br /&gt;
 sudo ln -s $PREFIXBINDIR/arm-elf-strip $OURBINDIR/arm-elf-strip&lt;br /&gt;
 &lt;br /&gt;
 # If you also a want to add the debugger, Uncomen the lines here. Configure could need parameter &amp;quot;--disable-werror&amp;quot; in some cases&lt;br /&gt;
 #wget -N -c ftp://ftp.gnu.org/gnu/gdb/$GDB.tar.bz2&lt;br /&gt;
 #tar xfvj $GDB.tar.bz2&lt;br /&gt;
 #cd build&lt;br /&gt;
 #../$GDB/configure --target=$TARGET --prefix=$PREFIX --enable-interwork --enable-multilib&lt;br /&gt;
 #make $SPEEDUPCOMPILATION&lt;br /&gt;
 #make install&lt;br /&gt;
 #cd ..&lt;br /&gt;
 &lt;br /&gt;
 #rm -rf build $GDB&lt;br /&gt;
 #if [ &amp;quot;${CLEANUPDOWNLOADS}&amp;quot; != &amp;quot;N&amp;quot; ]&lt;br /&gt;
 #then&lt;br /&gt;
 #  rm $GDB.tar.bz2&lt;br /&gt;
 #fi&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Misterious as this scripts progress might have looked, everything is now done, hopefully without any issue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run the script in a terminal window via:&lt;br /&gt;
&lt;br /&gt;
 $ sh ./paparazzi_from_scratch.sh 2&amp;gt;&amp;amp;1 | tee buildlog.txt&lt;br /&gt;
&lt;br /&gt;
== Rest of code needed ==&lt;br /&gt;
&lt;br /&gt;
To install the rest we make a special directory &amp;quot;develop&amp;quot;. You can give it another name ofcourse.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/develop&lt;br /&gt;
&lt;br /&gt;
== LPC21ISP ==&lt;br /&gt;
&lt;br /&gt;
To get the software onto the main autopilot board a special tool is needed. We will use the great open-source LPC21ISP application. LPC21ISP is an in-circuit programming (ISP) tool for the microcontroller used on the Paparazzi autopilot boards. The lpc21isp project is hosted on sourceforge and one can find the source packages and information at http://sourceforge.net/projects/lpc21isp/ &lt;br /&gt;
&lt;br /&gt;
Get the SVN version via&lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/lpc21isp&lt;br /&gt;
 $ cd ~/develop/lpc21isp&lt;br /&gt;
 $ svn co https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp lpc21&lt;br /&gt;
&lt;br /&gt;
To compile go into the source directory and then do&lt;br /&gt;
&lt;br /&gt;
 $ cd lpc21&lt;br /&gt;
 $ make -f Makefile clean all&lt;br /&gt;
&lt;br /&gt;
To install&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp lpc21isp /usr/bin/&lt;br /&gt;
&lt;br /&gt;
==  IVY ==&lt;br /&gt;
&lt;br /&gt;
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www2.tls.cena.fr/products/ivy/  &lt;br /&gt;
&lt;br /&gt;
In the paparazzi project, Ivy is used to send telemetry data to where ever you want.&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not confuse this IVY with the Apache Ivy project. &lt;br /&gt;
&lt;br /&gt;
=== Ivy-python ===&lt;br /&gt;
&lt;br /&gt;
The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository. However since this is the from scratch page we will download it from the official source repository via &lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p ~/develop/ivy-python/&lt;br /&gt;
 $ cd ~/develop/ivy-python/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk&lt;br /&gt;
&lt;br /&gt;
Now we can build and install&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-python/trunk&lt;br /&gt;
 $ sudo ./setup.py install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-c ===&lt;br /&gt;
&lt;br /&gt;
To be able to use IVY-c, the libraries need to be installed. Source packages of ivy-c can be downloaded via:&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-c&lt;br /&gt;
 $ cd ~/develop/ivy-c&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-c/trunk&lt;br /&gt;
&lt;br /&gt;
To compile&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-c/trunk/src&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
It is possible you get errors of the test module when compiling, just ignore the messages, it is not important for the Paparazzi project. Contact the IVY team to help them also to resolve also the testing makefile issue.&lt;br /&gt;
&lt;br /&gt;
Now install the compiled libraries&lt;br /&gt;
&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-OCAML ===&lt;br /&gt;
&lt;br /&gt;
The Ivy-ocaml is a Library that make it possible to use Ivy via the Ocaml language.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/develop/ivy-ocaml&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/&lt;br /&gt;
 $ svn co http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk&lt;br /&gt;
&lt;br /&gt;
NOTE: If the above SVN repository does not work due to API incompatibilities get the ivy-ocaml source via&lt;br /&gt;
&lt;br /&gt;
 $ wget http://paparazzi.enac.fr/ubuntu/dists/natty/main/binary-i386/ivy-ocaml_1.1-12.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now we need to compile the source via&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/develop/ivy-ocaml/trunk&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
== Paparazzi Main sourcecode ==&lt;br /&gt;
&lt;br /&gt;
To run the Ground control station and to be able to create airborne code for the Autopilot board and more one needs to get the Paparazzi source via&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/paparazzi/paparazzi.git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now it will compile. run paparazzi and test it with a simulation via &lt;br /&gt;
&lt;br /&gt;
 $ cd paparazzi&lt;br /&gt;
 $ sudo make&lt;br /&gt;
 $ ./paparazzi&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
See also the main installation page&lt;br /&gt;
&lt;br /&gt;
TIP: &lt;br /&gt;
If you get the File &amp;quot;pprz.mli&amp;quot;, line 149, characters 78-89: Error: Unbound type constructor Ivy.binding&lt;br /&gt;
...this happens when IVY libraries are not yet installed. How to do this, read the part on installing IVY on this page&lt;br /&gt;
&lt;br /&gt;
Ubuntu Users&lt;br /&gt;
You may see the message &amp;quot;Not building usb_lib: ARMGCC= not found&amp;quot; after running the &amp;quot;sudo make&amp;quot; command, do not worry as this is ok.&lt;br /&gt;
See http://lists.gnu.org/archive/html/paparazzi-devel/2011-04/msg00057.html for more information&lt;br /&gt;
&lt;br /&gt;
=== Set the UDev rules ===&lt;br /&gt;
&lt;br /&gt;
To be able to access the Hardware attached to your PC later on, rules must be set in your OS. By setting the correct rules a regular user can access USB and other devices, otherwise restricted for only the root user.&lt;br /&gt;
&lt;br /&gt;
Open a terminal, change do your Paparazzi dir, then&lt;br /&gt;
&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
Test via &lt;br /&gt;
&lt;br /&gt;
 $ udevadm info -q all -n /dev/paparazzi/serial&lt;br /&gt;
&lt;br /&gt;
If you want to learn more about what UDEV is, [http://www.openuas.org/pub/writing_udev_rules.html there is a very informative page about '''udev''' here]&lt;br /&gt;
&lt;br /&gt;
== The depriciated -mapcs-32 option ==&lt;br /&gt;
&lt;br /&gt;
The option &amp;quot;-mapcs-32&amp;quot; is only available with very old tool chain versions e.g. GCC-3.3.x. More recent tool chains will either require &amp;quot;-mabi=apcs-gnu&amp;quot; (non-EABI-compliant) or &amp;quot;-mabi=aapcs-linux&amp;quot; (EABI-compliant). To have an overview of all flags go here&lt;br /&gt;
&lt;br /&gt;
http://ecos.sourceware.org/docs-1.3.1/ref/gnupro-ref/arm/ARM_COMBO_ch01.html&lt;br /&gt;
&lt;br /&gt;
By changing -mapcs-32 with -Wa,-mapcs-32 compilation will work with more recent compilers and we have backward compatibility with the old flag for older compilers. The option -Wa,-mapcs-32 is doing the following: ''-Wa,option'' : Pass option as an option to the assembler. If option contains commas, it is split into multiple options at the commas.&lt;br /&gt;
&lt;br /&gt;
The -mapcs-32 option generates code for a processor running with a 32-bit program counter and conforming to the function calling standards for the APCS 32-bit option. If interested in depth what APCS is read the following: http://www.openuas.org/site/APCS.txt&lt;br /&gt;
&lt;br /&gt;
The gcc flag -mapcs-32 was deprecated since gcc-3.4.0 and finally removed in gcc-4.0.0 which unconditionally generates 32bit ARM code. You should not need to pass this flag to the assembler either but it might not hurt for backwards compatibility with older compilers, so it's best to leave it in with the -Wa, option metho&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
https://github.com/esden/summon-arm-toolchain&lt;br /&gt;
&lt;br /&gt;
https://github.com/paparazzi/paparazzi-portability-support&lt;br /&gt;
&lt;br /&gt;
http://svn.savannah.gnu.org/svn/paparazzi/paparazzi3/trunk/conf/Makefile.stm32&lt;br /&gt;
&lt;br /&gt;
http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
&lt;br /&gt;
http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/hobbycode/source/browse/trunk/gnu-arm-installer&lt;br /&gt;
&lt;br /&gt;
http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
&lt;br /&gt;
http://paparazzi.enac.fr/w/index.php?title=User:Roirodriguez&lt;br /&gt;
&lt;br /&gt;
http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Matthewdally</name></author>
	</entry>
</feed>