Difference between revisions of "Installation/Linux"

From PaparazziUAV
Jump to navigation Jump to search
(remove a lot of the superfluous blah and info about obsolete stuff that nobody uses anyway)
Line 14: Line 14:
<li>Install a recent Ubuntu Linux operating system
<li>Install a recent Ubuntu Linux operating system
<li>The basic Paparazzi tools installed via a Package Manager.
<li>The basic Paparazzi tools installed via a Package Manager.
<li>[[Installation##Getting_the_Source_Code|Download the source code from the source repository]].
<li>[[Installation#Getting_the_Source_Code|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 adding appropriate [[Udev]] rules.
<li>Compile the binaries from the sources (cd paparazzi && make)
<li>Compile the binaries from the sources (cd paparazzi && make)
Line 21: Line 21:
That's all.
That's all.


=== Operating System ===
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]].
 
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.
 
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.


=== Compilers and Handlers ===
=== Compilers and Handlers ===
Line 61: Line 57:
  #deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_6.0/ ./
  #deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_6.0/ ./
  deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./
  deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./
}}
Proceed to [[Installation/Linux#Installing_the_packages|installing the packages]].
==== Alternate Repositories ====
The '''debian''' repository at <tt>paparazzi.enac.fr/debian</tt> contains both new packages available in launchpad for ubuntu and the older packages for cross-compilation and flashing for the '''debian testing only''' (currently '''wheezy''').
Just add the following lines to your repository list (<b>/etc/apt/sources.list</b>) and then
uncomment the line relevant to your operating system (e.g. wheezy):
Note: Because of the sources.list file permissions maybe you will need to edit it with root access. In Terminal write this:
gksudo gedit /etc/apt/sources.list
{{Box Code|/etc/apt/sources.list|
# Uncomment just _one_ of the following lines - depending on your OS version
# deb <nowiki>http://paparazzi.enac.fr/debian</nowiki> wheezy main
}}
}}


Line 95: Line 74:
   
   
  sudo apt-get install gcc-arm-none-eabi
  sudo apt-get install gcc-arm-none-eabi
==== Using Ubuntu Software Center ====
* Launch ''Software Sources'' (Red '''Wrench and gear''' icon -> '''System''' section)
* Search for <tt>paparazzi-dev</tt> and <tt>gcc-arm-none-eabi</tt> packages and click on install.
==== Using Synaptic Package Manager ====
Note: The Synaptic Package Manager is not installed by default anymore since Ubuntu Oneiric (11.10). Either use the Software Center, command line or install Synaptic again.
* Launch ''Synaptic Package Manager'' (Menu '''System/Administration''')
* Click ''Reload'' to update your sources.
* Search for <tt>paparazzi-dev</tt> and <tt>gcc-arm-none-eabi</tt> packages (use the ''Search'' button)
* Mark them for installation (right-click on package names)
* Left-click on ''Apply''


=== Optional Packages ===
=== Optional Packages ===
Line 117: Line 82:


<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.
<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.
==== Obsolete Packages ====
These packages are in the <tt>paparazzi.enac.fr/ubuntu</tt> repository and unmaintained, but still might be of some use...
* <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''.
* <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''.
==== Older Ubuntu Versions ====
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
=== Manual Installation of Individual Packages ===
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]].


== Installing and running Paparazzi ==
== Installing and running Paparazzi ==
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.
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.
== Quick Launch Icon ==
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:
#Save [[Media:Paparazzi_logo.png|this image file]] to your /paparazzi folder
#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.


== Udev rules ==
== Udev rules ==
Line 160: Line 98:
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 [[FirmwareFlashing]].
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 [[FirmwareFlashing]].


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 root) users to directly access the USB bus by default. You will need to make yourself a member of the plugdev "group" <br>
Make yourself a member of the ''plugdev'' and ''dialout'' groups:
Make yourself a member of the ''plugdev'' and ''dialout'' groups:



Revision as of 10:23, 13 November 2013

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 the Ubuntu Linux OS or virtually any Debian based Linux.

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

  • Install a recent Ubuntu Linux operating system
  • The basic Paparazzi tools installed via a Package Manager.
  • 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 (cd paparazzi && make)

That's all.

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

Compilers and Handlers

The typical installation contains all of the necessary C and OCaml compilers as well as some XML and 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.

For v5.0 and above the gcc-arm-embedded toolchain can be used, this supports the STM32F4 with FPU.

Installation of Compilers and Handlers

For the impatient

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

For Paparazzi v4.x and earlier you need to install the paparazzi-arm-multilib package.
Since Paparazzi v5.0 the gcc-arm-embedded toolchain is recommended.

You can just unpack the tarball and drop it in your PATH. For some Ubuntu versions you can use the gcc-arm-none-eabi package from the gcc-arm-embedded ppa.

Add the repository to the sources

Ubuntu Repository

For any Ubuntu version run from the command line:

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

The gcc-arm-embedded toolchain is available as Ubuntu package for _some_ Ubuntu version (currently lucid, precise and raring):

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded

Proceed to installing the packages.

Debian Repositories

For Debian Squeeze (6.0) and Wheezy (7.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_7.0/Release.key" -O- | sudo apt-key add -

Add the following deb line to your sources.list

File: /etc/apt/sources.list
# Uncomment just _one_ of the following lines - depending on your OS version
#deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_6.0/ ./
deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./

Installing the packages

Refresh the links from here we can download Paparazzi software to install via:

sudo apt-get update 

And then install all the cross-compiler toolchain and dependancies (dev) needed for compiling the Paparazzi sourcecode. This can take a while, so grab yourself a coffee or drink of choice: Install via:

sudo apt-get install paparazzi-dev

The paparazzi-arm-multilib package which is installed by default provides support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32 (i.e. LISA boards).
If you need to compile for an autopilot board with an STM32 F4 type of processor chip, the gcc-arm-none-eabi package provides support for this stm32f4 harware floating point. You can install this via:

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

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/

See the Udev page for more details.

Setting access rights for USB download

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 FirmwareFlashing.

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"
Make yourself a member of the plugdev and dialout groups:

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

Logout and login again.