Install the Application Framework

Use this guide to:

This guide is not specific to a target device, please refer to your target documentation to set-up any hardware, additional software and download the toolchain for your target.

Setup Workspace

A development machine is used to write your custom applications and build, configure and install the runtime environment for your target.

Requirements: Linux PC or Virtual Machine with:

  • Ubuntu: A currently supported LTS Version installed
  • CPU: Dual Hyper-threaded or Quad Core @ 2.8Ghz (Recommended)
  • RAM: 6Gb
  • Disk Space: 5Gb (2.5gb for the toolchain, and 2.5gb for the Framework and Workspace)

The following Linux software needs to be installed on your dev machine to use the Legato Application Framework:

$ sudo apt-get install -y build-essential \
                          python python-jinja2 python-pkg-resources python-git \
                          cmake git libsdl-dev diffstat texinfo gawk chrpath \
                          wget cpio bash ninja-build bc unzip libxml2-utils gcovr \
                          libcurl4-gnutls-dev zlib1g-dev libbz2-dev \
                          bsdiff libssl-dev autoconf automake iputils-ping

Optional packages:

  • openjdk-8-jdk (for Java support)
  • doxygen and graphviz (for doc generation)
  • TLA toolbox (Formal specification & verification).

Now that you have the required Linux software we recommend setting up a directory structure that allows you to easily work with the Legato Application Framework tools from within your own projects.

While we are suggesting the following structure as a recommendation there may be other directory structures that make more sense for your projects (e.g., if different projects depend on different Legato AF or firmware versions, it may make more sense to setup a copy of the firmware or Legato AF files within a project).

Example User Environment:


In your home directory create the following directories:

$ mkdir workspace
$ cd workspace
$ mkdir boardSupport
$ mkdir legatoAF
$ mkdir firmware

It should look like this:

├── firmware
├── legatoAF
└── mangOh

Download Source Code

Next download the source code into the legatoAF directory, you can either checkout the repo via GitHub or download a copy of the tarball. GitHub gives you the advantage of tracking changes and gives you access to the whole history of changes and releases.

Clone from GitHub

The GitHub Legato Project provides all up-to-date code development as well as official releases. To clone the latest official release clone the last release tag (e.g., -m legato/releases/17.10.0.xml), and not the master branch.

See the Releases page to list the supported releases.

Install repo:

$ sudo apt-get install repo


$ wget -O ~/bin/repo
$ chmod a+x ~/bin/repo

Clone a specific release:

$ cd legatoAF
$ repo init -u git:// -m legato/releases/17.07.1.xml
$ repo sync

Clone from master (latest in progress development):

$ cd legatoAF
$ repo init -u git://
$ repo sync

Download Tarball

Visit our Release Info page to download the Legato AF.

Download the Tarball and extract it to a directory on your local machine

$ mv ~/Downloads/legato-17.11.0.tar.bz2 legatoAF/
$ cd legatoAF/
$ tar -xvf legato-17.11.0.tar.bz2

Directory Overview

Directory Overview of the Legato AF Repo:

Directory Description
apps Source Code for Apps included with the Framework
bin Created by build system and populated with executable files run on the development host that ran the build. Contains files like mksys, app and update.
build Results of a framework build. Includes build/tools and build/target.
cmake CMake scripts used by the build system.
components Platform-independent components that are used in apps.
framework Source code for the Legato framework.
targetFiles Files needed for installation on target devices.
targets Target specific configuration files
platformAdaptor Components specific to specific platforms. **covered under other licenses
modules Other repositories that extend Legato.
3rdParty Third-party code that is integrated with Legato. **covered under other licenses

Next, install a toolchain then configure your environment before you start coding.