- 1 Introduction
- 2 Installation video Tutorials
- 3 Installation of dependencies
- 4 ARM embedded toolchain
- 5 Optional Packages
- 6 Installing and running Paparazzi
- 7 Udev rules
- 8 Troubleshooting
- 8.1 No access rights for USB devices
- 8.2 arm-none-eabi-gcc: Command not found
- 8.3 arm-linux-gnueabi-gcc cross-compiler not found
- 8.4 Ubuntu
- 8.5 Debian
- 8.6 arm-none-eabi-gdb: error with libncurses.so.5
- 8.7 FTDI serial adapter not working on old Ubuntu version
- 8.8 Code not starting on autopilot after changing gcc
This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.
The steps required to install the software needed to be able to let your UAS fly
- Install the basic Paparazzi dependencies and the ARM cross compiling toolchain.
- Download the source code from the source repository.
- Allow access to your PC hardware connection by adding appropriate Udev rules.
- Compile the binaries from the sources and launch the software.
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.
Or just use the Quickstart for Ubuntu 12.04 LTS.
Installation video Tutorials
Installation of dependencies
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
For Debian Wheezy (7.0) and Jessie (8.0) packages are built using the Open Build Service (OBS) on OpenSUSE Build Service project home:flixr:paparazzi-uav
First add the key:
wget -q "http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/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_7.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
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 that unfortunately have the same Debian package name (gcc-arm-none-eabi)!
- ARM gcc-arm-embedded toolchain
- includes libstdc++ and newlib-nano
- Debian gcc-arm-none-eabi toolchain
- does not include libstdc++
- does not include newlib-nano
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.
You can list the available versions with apt-cache policy gcc-arm-none-eabi
This is the recommended toolchain
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update sudo apt-get install gcc-arm-none-eabi
!!! If you are using Ubuntu 14.04 and later, please be careful because there are packages with same name but produced by Debian and inherited by Ubuntu. Check available versions after adding the PPA with
apt-cache policy gcc-arm-none-eabi
To install a specific version (the one from terry.guo PPA) specify the version explicitly, e.g.
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update sudo apt-get install gcc-arm-none-eabi=188.8.131.525q3-1trusty1
Meanwhile we are working with Debian to consolidate and unify this toolchain.
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
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
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,
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
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.
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/
See the Udev page for more details.
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
apt-get install gcc-arm-linux-gnueabi
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
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)