Difference between revisions of "Installation/Linux"

From PaparazziUAV
Jump to navigation Jump to search
 
(99 intermediate revisions by 15 users not shown)
Line 1: Line 1:
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Installation</categorytree>
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Installation</categorytree>
__TOC__
__TOC__
'''<span style="color:red">This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.</span>'''
'''See the general [[Installation]] page for how to [[Installation#Getting_the_Source_Code|download Paparazzi]] and [[Installation#Launching_the_Software|launching it]] after you followed the instructions here.'''


== Introduction ==
== Introduction ==


Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux].
Paparazzi is very easily installed on any laptop or workstation running [http://www.ubuntu.com/ Ubuntu], [http://www.debian.org/ Debian] (or any of their derivatives).


The steps required to install the software needed to be able to let your UAS fly  
The steps required to install the software needed to be able to let your UAS fly  
<ul>
<ul>
<li>Install a recent Ubuntu Linux operating system
<li>[[Installation/Linux#Installation_of_dependencies|Install the basic Paparazzi dependencies]] and the [[Installation/Linux#ARM_embedded_toolchain|ARM cross compiling toolchain.]]
<li>The basic Paparazzi tools installed via Synaptic Package Manager.
<li>[[Installation#Getting_the_Source_Code|Download the source code from the source repository.]]
<li>Download the source code from the source repository.
<li>Allow access to your PC hardware connection by adding appropriate [[Udev]] rules.
<li>Allow access to your PC hardware connection by copying the [http://www.openuas.org/pub/writing_udev_rules.html rules file]
<li>[[Installation#Launching_the_Software|Compile the binaries from the sources and launch the software.]]
<li>Compile the binaries from the sources (cd paparazzi && make)
</ul>
</ul>


That's all.
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Installation/Manual|install them independently]].


=== Operating System ===
===For the impatient===


Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux]. Paparazzi is packaged for Debian as well as all of it's dependencies. The [http://paparazzi.enac.fr/debian repository] hosted at ENAC holds their latest version.
For Ubuntu add the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] <tt>sudo add-apt-repository ppa:paparazzi-uav/ppa</tt> and install the <tt>paparazzi-dev</tt> package.


If you are new and this is your first time installing it is suggested you keep it simple. Select a system you can dedicate to the Linux installation. No [[Installation#Virtual_Machines|virtual machines]] or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented below and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Linux tries a non-standard install that requires special steps not documented here.
Since Paparazzi v5.0 the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended.
Available as of Ubuntu 14.04, on older versions it can be [[Installation/Linux#ARM_embedded_toolchain|installed via tarball]].


=== Compilers and Handlers ===
Or just use the [[Installation#Quickstart_on_Ubuntu_12.04|Quickstart for Ubuntu 12.04 LTS]].


The typical installation contains all of the necessary C and OCaml compilers as well as some XML and [http://www.tls.cena.fr/products/ivy/ Ivy] handlers. These tools are provided by the ''paparazzi-dev'' package. Have no fear, this is all taken care of for you so all you must do is type a few simple commands. Below are those commands and helpful information. Commands can be copied and pasted from these pages to make it as easy as possible.
== Installation video Tutorials ==


=== Source Code ===
{{#ev:youtubehd|SshFJrBuku8}} {{#ev:youtubehd|eW0PCSjrP78}}


The Paparazzi source code is hosted by [https://github.com/paparazzi/paparazzi Github]. It is downloaded using [http://en.wikipedia.org/wiki/Git_%28software%29 Git].
== Installation of dependencies ==


== Installation of Compilers and Handlers ==
=== Ubuntu ===
For the impatient:
'''Binary packages for Ubuntu are available for the ''i386'', ''amd64'' and ''armhf'' architectures.'''
* Add paparazzi the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] for Ubuntu for Ubuntu: <tt>ppa:paparazzi-uav/ppa</tt><br/>or for Debian: <tt>deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> squezze main</tt><br>
* Install: <tt>paparazzi-dev</tt> and  <tt>paparazzi-arm-multilib</tt>


=== Adding the APT repository ===
Add the installation sources for the Paparazzi software packages. Run from a terminal:
For any Ubuntu version run from the command line:
  sudo add-apt-repository ppa:paparazzi-uav/ppa
  sudo add-apt-repository ppa:paparazzi-uav/ppa


==== Alternate Ubuntu repository and Debian ====
Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.
The ubuntu repository at <tt>paparazzi.enac.fr/ubuntu</tt> contains some older packages and can be used instead of the ppa.
sudo apt-get update
sudo apt-get install paparazzi-dev
 
=== Debian ===
'''Binary packages for Debian are available for the ''i386'' and ''amd64'' architectures. ''armhf'' packages seem to be currently not supported by the OpenSUSE build service.'''


For the sources file (sources.list) you only add the line required for your version. Linux names their versions.  
For Debian Wheezy (7.0), Jessie (8.0), Stretch (9.0) and Buster (10) packages are built using the [http://openbuildservice.org/ Open Build Service (OBS)] on [https://build.opensuse.org/project/show?project=home%3Aflixr%3Apaparazzi-uav OpenSUSE Build Service project home:flixr:paparazzi-uav]


Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then
[http://software.opensuse.org/download/package?project=home:flixr:paparazzi-uav&package=paparazzi-dev Install paparazzi-dev]
uncomment the line relevant to your operating system (e.g. squeeze or natty):


Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:
First add the key:
wget -q "http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_10/Release.key" -O- | sudo apt-key add -


  gksudo gedit /etc/apt/sources.list
Add the appropriate repo, depending on your Debian version to sources.list
{{Box Code|/etc/apt/sources.list|
  echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_10/ ./" | tee -a /etc/apt/sources.list
  # Uncomment just _one_ of the following lines - depending on your OS version
  echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_9.0/ ./" | tee -a /etc/apt/sources.list
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> etch main
  echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./" | tee -a /etc/apt/sources.list
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> lenny main
  echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./" | tee -a /etc/apt/sources.list
  # deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> squeeze main
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> lucid main
  # deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> maverick main
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> natty main
# deb <nowiki>http://paparazzi.enac.fr/ubuntu</nowiki> oneiric main
}}


=== Installing the packages ===
Update the systems package inventory and install the main Paparazzi software dependencies.
sudo apt-get update
sudo apt-get install paparazzi-dev


Update your sources and install the dependencies needed for recompiling from the source (<b>dev</b>), and the cross-compiler toolchain <b>arm-multilib</b>:
== ARM embedded toolchain ==


sudo apt-get update
For current Paparazzi versions (v5.0 and above) the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended, which also supports the STM32F4 with FPU (hardware floating point).
sudo apt-get install paparazzi-dev paparazzi-arm-multilib


The <b>paparazzi-arm-multilib</b> package provides support for both ARM7 (i.e. Tiny or TWOG boards) as well as STM32 (i.e. Lisa boards). <br/>
=== gcc-arm-none-eabi as Debian/Ubuntu package ===


==== Using Ubuntu Software Center ====
'''This is the recommended method'''
For Ubuntu Oneiric (11.10)
* Launch ''Software Sources'' (Red '''Wrench and gear''' icon -> '''System''' section)
* Search for <tt>paparazzi-dev</tt> and <tt>paparazzi-arm-multilib</tt> packages and click on install.


==== Using Synaptic Package Manager ====
Note that there are actually two '''different''' toolchains available!
Note: The Synaptic Package Manager is not installed by default anymore under Ubuntu Oneiric (11.10). Either use the Software Center, command line or install Synaptic again.
* [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] with Debian package name ''gcc-arm-embedded''
* Launch ''Synaptic Package Manager'' (Menu '''System/Administration''')
** includes libstdc++ and newlib-nano
* Click ''Reload'' to update your sources.
* [https://packages.debian.org/jessie/gcc-arm-none-eabi Debian gcc-arm-none-eabi toolchain]
* Search for <tt>paparazzi-dev</tt> and <tt>paparazzi-arm-multilib</tt> packages (use the ''Search'' button)
** does not include libstdc++
* Mark them for installation (right-click on package names)
** does not include newlib-nano
* Left-click on ''Apply''


=== Optional Packages ===
Both toolchains ''should'' work for most use-cases (if you don't need C++ or nano specs), although the [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] is better tested.
sudo apt-get install lpc21isp openocd


The packages <b>lpc21isp</b> and <b>openocd</b> are normally automatically installed as they are recommended packages of paparazzi-dev, if not you can manually install them. <tt>lpc21isp</tt> is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), <tt>openocd</tt> is for flashing via JTAG (e.g. for Lisa boards) and debugging.
==== gcc-arm-embedded toolchain ====


==== Obsolete Packages ====
'''This is the recommended toolchain'''
These packages are in the <tt>paparazzi.enac.fr/ubuntu (or debian)</tt> repository and unmaintained, but still might be of some use...


* <b>paparazzi-avr</b> Users of the older AVR based boards will need this.
On ''most'' Ubuntu versions the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] can be installed as a debian package from the [https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa ppa]:
* <b>paparazzi-arm7</b> To use the old gcc 3.4.4 for ARM7, superseded by <b>paparazzi-arm-multilib</b>. To use ''paparazzi-arm7'' remove ''paparazzi-arm-multilib''.
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
* <b>paparazzi-stm32</b> Can be used for the Lisa autopilots, superseded by <b>paparazzi-arm-multilib</b>. To use ''paparazzi-stm32'' remove ''paparazzi-arm-multilib''.
sudo apt-get update
sudo apt-get install gcc-arm-embedded


==== Older Ubuntu Versions ====
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px">
Previously there was a PPA by terry.guo that contained this toolchain under the package name ''gcc-arm-none-eabi''
<div class="mw-collapsible-content">
See https://launchpad.net/gcc-arm-embedded/+announcement/13824 for details on how to switch the newer
PPA and package.
</div></div>


On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:
==== gcc-arm-none-eabi Debian toolchain ====
 
Current Debian ('''jessie''') and Ubuntu (14.04 '''trusty''' and later) releases have the gcc-arm-none-eabi package in the official repositories ('''universe'''), and can be installed with:
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi


sudo apt-get remove brltty
=== ARM gcc-arm-embedded tarball ===
Another way is to download and unpack the tarball and add it to your PATH:


=== Manual Installation of Individual Packages ===
* Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from [https://launchpad.net/gcc-arm-embedded/+download External Downloads] section of ARM gcc-arm-embedded project
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Manual_Installation|install them independently]].
* Unpack it to a directory of your choice
* Add the bin folder in to your PATH


== Downloading the Source Code ==
e.g.:
The complete source code should be downloaded from the paparazzi software repository on Github. Make sure you have installed the <tt>paparazzi-dev</tt> package as described above. Without these you will not be able to compile the sourcecode.
cd ~
wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt
rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
exportline="PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
source ~/.profile


Please see [[Installation#Downloading_the_Source_Code]] for details.
The file .profile will be sourced in every bash after logging out and in again. Until then,
source ~/.profile
can be used for every bash individually.


== Launching the Software ==
If you can not access your toolchain with PATH working, look a the [[Installation/Linux#Troubleshooting]].


Please see [[Installation#Launching_the_Software]] for details.
=== Old toolchain for Paparazzi v4.x and earlier ===


=== Quick Launch Icon ===
'''For Paparazzi v4.x''' and earlier you need to install the <tt>paparazzi-arm-multilib</tt> package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).<br>
'''This toolchain does not properly support STM32F4 based autopilots!!'''


To create an icon on the desktop so you don’t have to manually type codes into the Terminal each time you want to start the Paparazzi Center follow these steps:
You can install it explicitly with:
sudo apt-get install paparazzi-arm-multilib


#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi folder
== Optional Packages ==
#Right click anywhere on the Ubuntu desktop and click Create Launcher.
#Enter the following in the fields provided:
#*Name: Paparazzi Center
#*Command: /home/YOUR_USER_NAME/paparazzi/paparazzi
#*Comment: Runs the Paparazzi Center
#*Then click the icon image in the top left on the dialog box and select the Paparazzi logo you just downloaded.
#Click the OK button and that’s it! Your icon should appear on the desktop and you are ready to go.


=== Agents ===
The packages <b>lpc21isp</b> and <b>openocd</b> are normally '''automatically installed''' as they are recommended packages of paparazzi-dev, '''if not''' you can manually install them via:
sudo apt-get install lpc21isp openocd


Please see [[Installation#Agents]] for details.
<tt>lpc21isp</tt> is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), <tt>openocd</tt> is for flashing via JTAG (e.g. for Lisa boards) and debugging.


=== env Variables ===
== Installing and running Paparazzi ==


Please see [[Installation#env_Variables]] for details.
Please see [[Installation#Getting_the_Source_Code|Getting the Source Code on the general Installation page]] for details on downloading the Paparazzi source code, compiling and running it.


== Udev rules ==
== Udev rules ==
Add the appropriate rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root <tt>conf/system/udev/rules/50-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt>, e.g in a terminal:
 
Add the appropriate [[Udev]] rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root <tt>conf/system/udev/rules/50-paparazzi.rules</tt> to <tt>/etc/udev/rules.d/</tt>, e.g in a terminal:


  cd <your paparazzi directory>
  cd <your paparazzi directory>
  sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/
  sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules


See the [[Udev]] page for more details.
See the [[Udev]] page for more details.


== Setting access rights for USB download ==
== Troubleshooting ==


On recent Ubuntu releases this is not necessary. For other distributions/releases this may be required to flash the Paparazzi-boards directly through USB. For flashing details, see [[Compiling]].
=== No access rights for USB devices ===


Some Linux distributions, don't allow standard (non root) users to directly access the USB bus by default. You will need to make yourself a member of the plugdev "group" and then create a "rule", associated with that "group". <br>
Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the ''plugdev'' group which should be sufficient for most cases.<br>
Make yourself a member of the ''plugdev'' group:
If you have problems, make yourself a member of the ''plugdev'' and ''dialout'' groups:


  sudo adduser <your login> plugdev
  sudo adduser <your login> plugdev
sudo adduser <your login> dialout


Logout and login again.
Logout and login again.


== Software Updates ==
=== arm-none-eabi-gcc: Command not found ===
Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)<br/>
If this error occurs, maybe the [https://packages.debian.org/de/wheezy/ia32-libs ia32-libs] are missing.
 
Enable multiarch and install ia32-libs:
dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs
 
=== arm-linux-gnueabi-gcc cross-compiler not found ===
 
=== Ubuntu ===
apt-get install gcc-arm-linux-gnueabi


Please see [[Installation#Software_Updates]] for details.
=== Debian ===
Starting with jessie, there were [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771496#41 some changes] to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.


== Using 32Bit on 64Bit ==
First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:
deb http://emdebian.org/tools/debian/ jessie main


As there are now 64bit packages available this should not be needed anymore, nevertheless...
Run the following command in your terminal to add the keys for it
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -


An temporary solution is to use an i386 installation instead. In rare circumstances however, this may be problematic (certain engineering software for example requires 64 bit kernels).
Then you could add armel architecture and fetch the missing cross-compiler packages
In these cases, a chroot is a good compromise, while avoiding the overhead of a virtual machine (and USB device problems which may occur).
dpkg --add-architecture armel
Initial instructions are here for now: https://help.ubuntu.com/community/DebootstrapChroot
apt-get update
The command you use for the bootstrap needs to reflect your architecture - I used
apt-get install crossbuild-essential-armel


  sudo debootstrap --variant=buildd --arch i386 lucid /var/chroot/lucid http://gb.archive.ubuntu.com/ubuntu/
You could find out more about cross-toolchains in jessie on debian [https://wiki.debian.org/CrossToolchains wiki page].


The format for schroot config files has changed as of lucid however - here is mine:
Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described [https://wiki.debian.org/Multiarch/HOWTO here]. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:
deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main
 
===arm-none-eabi-gdb: error with libncurses.so.5===
Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)<br/>
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
 
If this error occurs, maybe [http://packages.ubuntu.com/search?keywords=lib32ncurses5 lib32ncurses5] is missing. <br/>
Found on [https://answers.launchpad.net/gcc-arm-embedded/+question/226680 launchpad q&a]
 
=== FTDI serial adapter not working on old Ubuntu version ===
 
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:
 
sudo apt-get remove brltty


  $ cat /etc/schroot/chroot.d/lucid-i386
=== Code not starting on autopilot after changing gcc ===
  [lucid]
  description=Ubuntu 10.04 Lucid for i386
  directory=/var/chroot/lucid
  personality=linux32
  root-users=my_user
  type=directory
  users=my_user


Once you've installed the ubuntu minimal package, make sure you also enable the uni- and multiverse repos (the easiest way for me is to simply copy my host's /etc/apt/sources.lst to /var/chroot/lucid/etc/apt/sources.lst).
If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run
Then follow the standard instructions above.  You may need to manually set the PAPARAZZI_HOME and PAPARAZZI_SRC environment variables. You will also have to set the DISPLAY environment variable to :0.0 like so:


  export DISPLAY=:0.0
make clean && make


Please note, this is more advanced than the standard paparazzi installation and therefore you may encounter strange problems.
in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)


[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]

Latest revision as of 10:55, 5 February 2020

This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.

See the general Installation page for how to download Paparazzi and launching it after you followed the instructions here.

Introduction

Paparazzi is very easily installed on any laptop or workstation running Ubuntu, Debian (or any of their derivatives).

The steps required to install the software needed to be able to let your UAS fly

Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can install them independently.

For the impatient

For Ubuntu add the paparazzi-uav ppa sudo add-apt-repository ppa:paparazzi-uav/ppa and install the paparazzi-dev package.

Since Paparazzi v5.0 the gcc-arm-embedded toolchain is recommended. Available as of Ubuntu 14.04, on older versions it can be installed via tarball.

Or just use the Quickstart for Ubuntu 12.04 LTS.

Installation video Tutorials

EmbedVideo does not recognize the video service "youtubehd".
EmbedVideo does not recognize the video service "youtubehd".

Installation of dependencies

Ubuntu

Binary packages for Ubuntu are available for the i386, amd64 and armhf architectures.

Add the installation sources for the Paparazzi software packages. Run from a terminal:

sudo add-apt-repository ppa:paparazzi-uav/ppa

Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.

sudo apt-get update 
sudo apt-get install paparazzi-dev

Debian

Binary packages for Debian are available for the i386 and amd64 architectures. armhf packages seem to be currently not supported by the OpenSUSE build service.

For Debian Wheezy (7.0), Jessie (8.0), Stretch (9.0) and Buster (10) packages are built using the Open Build Service (OBS) on OpenSUSE Build Service project home:flixr:paparazzi-uav

Install paparazzi-dev

First add the key:

wget -q "http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_10/Release.key" -O- | sudo apt-key add -

Add the appropriate repo, depending on your Debian version to sources.list

echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_10/ ./" | tee -a /etc/apt/sources.list
echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_9.0/ ./" | tee -a /etc/apt/sources.list
echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./" | tee -a /etc/apt/sources.list
echo "deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./" | tee -a /etc/apt/sources.list

Update the systems package inventory and install the main Paparazzi software dependencies.

sudo apt-get update 
sudo apt-get install paparazzi-dev

ARM embedded toolchain

For current Paparazzi versions (v5.0 and above) the gcc-arm-embedded toolchain is recommended, which also supports the STM32F4 with FPU (hardware floating point).

gcc-arm-none-eabi as Debian/Ubuntu package

This is the recommended method

Note that there are actually two different toolchains available!

Both toolchains should work for most use-cases (if you don't need C++ or nano specs), although the ARM gcc-arm-embedded toolchain is better tested.

gcc-arm-embedded toolchain

This is the recommended toolchain

On most Ubuntu versions the gcc-arm-embedded toolchain can be installed as a debian package from the ppa:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get install gcc-arm-embedded

Previously there was a PPA by terry.guo that contained this toolchain under the package name gcc-arm-none-eabi

See https://launchpad.net/gcc-arm-embedded/+announcement/13824 for details on how to switch the newer PPA and package.

gcc-arm-none-eabi Debian toolchain

Current Debian (jessie) and Ubuntu (14.04 trusty and later) releases have the gcc-arm-none-eabi package in the official repositories (universe), and can be installed with:

sudo apt-get update
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi

ARM gcc-arm-embedded tarball

Another way is to download and unpack the tarball and add it to your PATH:

  • Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from External Downloads section of ARM gcc-arm-embedded project
  • Unpack it to a directory of your choice
  • Add the bin folder in to your PATH

e.g.:

cd ~
wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt
rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
exportline="PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
source ~/.profile

The file .profile will be sourced in every bash after logging out and in again. Until then,

source ~/.profile

can be used for every bash individually.

If you can not access your toolchain with PATH working, look a the Installation/Linux#Troubleshooting.

Old toolchain for Paparazzi v4.x and earlier

For Paparazzi v4.x and earlier you need to install the paparazzi-arm-multilib package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).
This toolchain does not properly support STM32F4 based autopilots!!

You can install it explicitly with:

sudo apt-get install paparazzi-arm-multilib

Optional Packages

The packages lpc21isp and openocd are normally automatically installed as they are recommended packages of paparazzi-dev, if not you can manually install them via:

sudo apt-get install lpc21isp openocd

lpc21isp is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), openocd is for flashing via JTAG (e.g. for Lisa boards) and debugging.

Installing and running Paparazzi

Please see Getting the Source Code on the general Installation page for details on downloading the Paparazzi source code, compiling and running it.

Udev rules

Add the appropriate Udev rule (available in fhe file 50-paparazzi.rules) to the USB handler. Simply copy as root conf/system/udev/rules/50-paparazzi.rules to /etc/udev/rules.d/, e.g in a terminal:

cd <your paparazzi directory>
sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

See the Udev page for more details.

Troubleshooting

No access rights for USB devices

Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the plugdev group which should be sufficient for most cases.
If you have problems, make yourself a member of the plugdev and dialout groups:

sudo adduser <your login> plugdev
sudo adduser <your login> dialout

Logout and login again.

arm-none-eabi-gcc: Command not found

Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)
If this error occurs, maybe the ia32-libs are missing.

Enable multiarch and install ia32-libs:

dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs

arm-linux-gnueabi-gcc cross-compiler not found

Ubuntu

apt-get install gcc-arm-linux-gnueabi

Debian

Starting with jessie, there were some changes to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.

First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:

deb http://emdebian.org/tools/debian/ jessie main

Run the following command in your terminal to add the keys for it

curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -

Then you could add armel architecture and fetch the missing cross-compiler packages

dpkg --add-architecture armel
apt-get update
apt-get install crossbuild-essential-armel

You could find out more about cross-toolchains in jessie on debian wiki page.

Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described here. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:

deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main

arm-none-eabi-gdb: error with libncurses.so.5

Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

If this error occurs, maybe lib32ncurses5 is missing.
Found on launchpad q&a

FTDI serial adapter not working on old Ubuntu version

On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:

sudo apt-get remove brltty

Code not starting on autopilot after changing gcc

If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run

make clean && make

in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)