Skip to content
Legato Application Framework
C C++ Objective-C Python Shell TypeScript Other
Branch: master
Clone or download

Latest commit

Jason Trinh and stan-podin LE_TRACE enclosed in do-while(0)
Encloses all multiline macro to allow calls to the macro that are unscoped

Changes to make LE_FATAL_IF, LE_FATAL, LE_ASSERT, LE_WARN_IF consistent with all other
macro calls such that it also ends with a semicolon (;)

Resolves: LE-14712
Change-Id: I1586732093b28bf372787a96fa6e9ed3ba647e1f
Latest commit fba6acd May 2, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
3rdParty Fix cunit build if /lib/cpp is not present Apr 5, 2019
apps LE_TRACE enclosed in do-while(0) May 21, 2020
cmake Fix cunit build if /lib/cpp is not present Apr 5, 2019
components LE_TRACE enclosed in do-while(0) May 21, 2020
drivers Move TI wireless driver kernel modules to Legato Mar 9, 2020
framework LE_TRACE enclosed in do-while(0) May 21, 2020
interfaces Implement new Legato Clock Service usable via APIs and LWM2M object 3… Apr 30, 2020
modules Switch from using kconfig-frontends to Kconfiglib May 17, 2019
targetFiles Fix detection of Yocto build toolchain Apr 16, 2020
targets Implement new Legato Clock Service usable via APIs and LWM2M object 3… Apr 30, 2020
.gitignore Simplified system view to be less, 'clicky.' Nov 20, 2019
.travis.yml [travis] Switch to Ubuntu 16.04 (xenial) May 21, 2020
CMakeLists.txt Implement new Legato Clock Service usable via APIs and LWM2M object 3… Apr 30, 2020 Revising & adding code of conduct May 9, 2018 [Docs] Add Company Contribution Agreement Mar 24, 2017 Update email to send contribution agreement Aug 9, 2016
KConfig Merge commit master (2019-10-08) to dev-threadx Oct 16, 2019 [Docs] Improve Licensing Content Mar 24, 2017
Makefile [httpServer] Set openssl configuration file path Mar 17, 2020
Makefile.framework Fix bugs enabling reset command. Oct 23, 2019
Makefile.hostTools Resolve build errors Nov 7, 2019
Makefile.targetTools Improve non-stripped builds Apr 26, 2019 Switch from using kconfig-frontends to Kconfiglib May 17, 2019 Enlarge the timeout value for expecting pattern Dec 23, 2019
default.sdef Create devMode.sinc Jan 24, 2020
default_readonly.sdef Add Data Mode Control API Oct 25, 2017 Fix incorrect default SMACK onlycap configuration May 23, 2019
legato.kconfig Add setting to turn off QMUX Nov 7, 2019
legatoTargetConfig.sinc Revert "Introduce TARGET_CFLAGS variable" May 15, 2019
localhost.sdef Add Data Mode Control API Oct 25, 2017
platformBuildVars.sinc Implement new Legato Clock Service usable via APIs and LWM2M object 3… Apr 30, 2020
pytest.ini Upgrade pytest from Python2 to Python3 Oct 25, 2019
run-tests Fixup unit tests on Linux Oct 7, 2019 Switch from using kconfig-frontends to Kconfiglib May 17, 2019


Build Status

Legato Open Source Project is an initiative by Sierra Wireless Inc. which provides an open, secure and easy to use Application Framework for embedded devices. The project enables developers who are not experienced in traditional embedded programming to participate in the exponential growth of the "Internet of Things". Visit to learn more or visit the Legato forum.


  • A maintained Long Term Support (LTS) version of Ubuntu
  • Install required packages:
$ sudo apt-get install -y   \
    autoconf                \
    automake                \
    bash                    \
    bc                      \
    bison                   \
    bsdiff                  \
    build-essential         \
    chrpath                 \
    cmake                   \
    cpio                    \
    diffstat                \
    flex                    \
    gawk                    \
    gcovr                   \
    git                     \
    gperf                   \
    iputils-ping            \
    libbz2-dev              \
    libcurl4-gnutls-dev     \
    libncurses5-dev         \
    libncursesw5-dev        \
    libsdl-dev              \
    libssl-dev              \
    libtool                 \
    libxml2-utils           \
    ninja-build             \
    python                  \
    python-git              \
    python-jinja2           \
    python-pkg-resources    \
    python3                 \
    texinfo                 \
    unzip                   \
    wget                    \

Optional packages: openjdk-8-jdk (for Java support, at least Java 8 is required), doxygen graphviz (for doc generation), xsltproc (for running tests)


Clone from GitHub

Legato uses git-repo as it is distributed as multiple repositories.

  1. Install repo:

(on Ubuntu >= 16.04)

$ sudo apt-get install -y repo

OR (on Ubuntu < 16.04)

$ sudo apt-get install -y phablet-tools


$ wget -O ~/bin/repo
$ chmod a+x ~/bin/repo
  1. Clone the environment:
$ mkdir workspace
$ cd workspace
$ repo init -u git://
$ repo sync

You can also clone a specific release:

$ repo init -u git:// -m legato/releases/16.07.0.xml
$ repo sync

Install the Legato framework on your development PC

  1. Clone it from GitHub or untar a release archive into a directory

  2. cd into that directory

  3. Run make

Configure your bash shell's environment for the Legato application build tools

Source bin/configlegatoenv:

$ . bin/configlegatoenv

OR, run the interactive bash shell bin/legs:

$ bin/legs

Run on Target Devices

Build support for cross-build targets, run make <target>.

For example, to enable support for the Sierra Wireless WP85xx devices, run make wp85.
Of course, each of these depends on the cross-build toolchain for that target, so ensure that you have the appropriate toolchain installed first.

The path to your toolchain and the prefix of the name of the tools in the toolchain are specified using the xxxxxx_TOOLCHAIN_DIR and xxxxxx_TOOLCHAIN_PREFIX environment variables (where xxxxxx is replaced with the target platform's ID, such as WP85).

If your toolchain is installed somewhere other than the default location under /opt/swi, ensure that the appropriate environment variables are set to tell the build tools where to find your toolchain and what its prefix is.
For example, for Sierra Wireless WP85xx devices, WP85_TOOLCHAIN_DIR must be set to the path of the directory that contains the file arm-poky-linux-gnueabi-gcc, and WP85_TOOLCHAIN_PREFIX must be set to arm-poky-linux-gnueabi--.

Following is a list of supported cross-build targets:

Target Description Environment variables
ar7 Sierra Wireless AR755x module AR7_TOOLCHAIN_DIR,AR7_TOOLCHAIN_PREFIX
ar758x Sierra Wireless AR758x module AR758X_TOOLCHAIN_DIR,AR758X_TOOLCHAIN_PREFIX
ar759x Sierra Wireless AR759x module AR759X_TOOLCHAIN_DIR,AR759X_TOOLCHAIN_PREFIX
ar86 Sierra Wireless AR86xx module AR86_TOOLCHAIN_DIR,AR86_TOOLCHAIN_PREFIX
wp85 Sierra Wireless WP85xx module WP85_TOOLCHAIN_DIR,WP85_TOOLCHAIN_PREFIX
wp750x Sierra Wireless WP750x module WP750X_TOOLCHAIN_DIR,WP750X_TOOLCHAIN_PREFIX
wp76xx Sierra Wireless WP76xx module WP76XX_TOOLCHAIN_DIR,WP76XX_TOOLCHAIN_PREFIX
wp77xx Sierra Wireless WP77xx module WP77XX_TOOLCHAIN_DIR,WP77XX_TOOLCHAIN_PREFIX

Directory Structure

The top level directory structure is as follows:

./apps - contains source code for apps.

./bin - created by build system and populated with executable files that run on the development host (the host that ran the build).

./build - contains the results of the build. Will be created by the build system.

./build/tools - contains build tools that are built and then used by the build system on the build host to build other things.

./build/<target> - contains the output of a build for a specific target (e.g., ./build/wp85).

./cmake - contains CMake scripts used by the build system to build samples and unit tests.

./components - contains platform-independent components that are used in apps.

./framework - contains the source code for the Legato application framework itself.

./targetFiles - contains some files for installation on target devices that don't need to be built.

./platformAdaptor - contains components that are specific to certain platforms.

./modules - contains other repositories that are extending Legato.


Once you have completed the first three installation steps above, you will find a set of HTML documentation under the "Documentation" directory.
Point your web browser at Documentation/index.html to view it:

xdg-open Documentatation/index.html

The latest release documentation is available at:


To uninstall Legato from your development PC:

  • Delete the directory you unzipped Legato under
  • Revert any changes you may have made to your .bashrc, etc. to set up xxxxxx_TOOLCHAIN_DIR environment variables.

_Copyright (C) Sierra Wireless Inc. _

You can’t perform that action at this time.