Legato Application Development Kit - Linux

Feb 06, 2019 - Author: Sierra Wireless - 24184 Views

Legato Application Development Kit - Linux

Important: Download, installation and use of Legato is subject to the following Legato License and  Open Source Licenses.

This page provides instructions on how to install the Legato Application Development Kit on a Linux host. You have the option of installing Leaf Workspace Manager to work from the command line or install Developer Studio a GUI based IDE. 

Minimum Configuration: CPU: Dual Core @ 2.6Ghz / RAM: 4GB / HDD: 10 GB free space

Leaf Workspace Manager

Leaf is a workspace manager that downloads, installs and configures your development environment on Linux.  It provides access to a library of SDK's for supported Sierra Wireless Smart Modules.  Full instructions for Leaf can be found on legato.io.

1. Install Leaf for Ubuntu 16.04+

Leaf is hosted in the Sierra Wireless debian tools repository, and is provided as a .deb package to be installed through apt. 

$ wget https://downloads.sierrawireless.com/tools/leaf/leaf_latest.deb -O /tmp/leaf_latest.deb && sudo apt install /tmp/leaf_latest.deb

Alternate install instructions for older versions (Ubuntu 14.04) are included within legato.io.

2. Search for a Package

Now that you have leaf installed, you can now search through that repository to find the packages to install and configure your Development Environment.

Search for the SDK for a specific Smart Module:

$ leaf search -t <target>    (i.e.; leaf search -t wp76 will bring back all packages for the wp76 target)

The search results will return a package identifier (the package name of the package to install), a high level description of what is in the package, and the tags of the package. You are also able to search filter the search results by tag using the -t flag.

$ leaf search -t latest          (returns all the newest/latest published packages for all targets)
$ leaf search -t wp76xx -t latest -t stable    (returns the latest packages for the wp76 target)

To see exactly what is contained in the package perform a search with a -v flag (verbose). This will list the details of what each package contains including the Release Date, which repo the package is hosted on, and the list of versions of everything that is included in the package.

$ leaf search -t wp76xx -t latest -v (returns the details of the latest package for the wp76 target)

From these details you should be able to figure out what package you need to setup for your environment to work with your target.

3. Setup your Development Environment

The setup command will prepare your directory as a workspace and download, install and configure your workspace with a profile (settings specific to your target and version) preparing you to start developing for your target.

$ leaf setup <profile name> -p <package identifier>

$ leaf setup wp76stable -p swi-wp76_1.0.0  (downloads and installs the swi-wp76_1.0.0 package in the wp76stable profile)

Downloading and installing the package may take a few minutes. It is configuring everything that is needed for you to start developing for your target including the toolchain, legato application framework and other development tools. It will also take care of installing any apt dependencies. The apt dependencies will require sudo and you will be prompted for your password for sudo privileges.

After installation a new directory (/leaf-data) and a new configuration file (leaf-workspace.json) will be created in your workspace directory. The directory contains symbolic links to all the resources needed for development and the leaf tools know how to find the resources for development.

You will now be able to use leaf commands to view your environment and use the resources that you just downloaded and installed.

$ leaf status - displays the profile list and information about the profiles
$ leaf select - lets you select different profiles (if you have more then one installed)
$ leaf profile delete <profile name>
$ leaf profile rename <old name> <new name> - renames your profile

For further instructions and help with Leaf use the (leaf help <command>). Comprehensive tutorials, and leaf command help can be found on legato.io.

Developer Studio

1. Install System Dependencies

Developer Studio has a dependency on java which must be installed on your machine prior to installing Developer Studio, we highly reccomened that you use an LTS version of Ubuntu.

For Ubuntu Linux distribution:
Check your Ubuntu version
lsb_release -d
If you are running an Ubuntu version older than 14.10 then install OpenJDK Java 8 as follow, otherwise go to the next step to install dependencies
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jre
sudo update-alternatives --config java

Check if your Linux computer is 32-bit or 64-bit
uname -m
Install dependencies
sudo apt-get install openjdk-8-jre libwebkitgtk-1.0-0 build-essential python-jinja2 ninja-build zip autoconf automake
If you are running on a 64-bit operating system, install additional dependencies
sudo apt-get install lib32z1 lib32ncurses5
If you plan to develop Legato applications with Java language (experimental), you must also install the Java development kit.
sudo apt-get install openjdk-8-jdk
If you plan on customizing the Legato Framework, you will need additional dependancies.
Please refer to the Legato project on Github for instructions.

For other Linux distributions, use your distribution packets system to install the required packages per the Ubuntu list above (package names may differ for different distributions).

2. Install the Legato Development Environment

Download the file for your module and linux host architecture (~500MB)
WP760X Release 12 (Legato 18.10.3) Linux 64 bit Linux 32 bit
WP770X Release 9.1 (Legato 18.06.1) Linux 64 bit Linux 32 bit
WP8548/WP750X Release 16.1 (Legato 18.06.4) Linux 64 bit Linux 32 bit
Extract the 32-bit or 64-bit legato zip archive to the ‘legato’ subdirectory in your home directory (Replace ‘##’ with ‘32’ or ‘64’ as appropriate.)
unzip legato*##* -d ~/legato

Alternative installation procedures for Advanced Users

For users who intend to install an older Legato version, download the legato ZIP archive files from Legato Full Installer History.
For users who intend to extend their existing Eclipse IDE with legato plug-ins, please consult Developer Studio Installation.

Related items

Legato Application Development Kit - Windows

Installer for Windows host to develop Legato Applications

legato-spm - command line tool (linux host)

Download embedded software packages from Sierra Wireless repository

swiflash - command line tool (linux host)

Flash firmware into WP/AR module for recovery purpose

©2019 Sierra Wireless. All rights reserved.
You have been successfully unsubscribed to this product. To access your subscription click here.