Legato Application Development Kit - Linux

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

Leaf Workspace Manager - Linux

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


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.


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.


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     (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 wp76 -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.


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

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.