/ Build Apps

Tools

To download, install and configure your development environment, Legato recommends using Leaf. Leaf is a a stand alone tool that will set up and customize your development environment and get you developing quickly. Leaf is also profileaware, meaning that you can easily switch to a new version of Legato or a different target and automatically update your dev environment to use the environment variables and toolchain specific to that profile.

Alternatively, you can clone the source code from our Gerrit server but you must set up your development environment manually.

To configure the Legato Application Framework we provide a Kconfig menu system to enable or disable Framework features.

When using Leaf workspace manager all the environment configuration is done for your target, and you are able to build for multiple targets by switching profiles. There is no need to run bin/legs or other shell configuration steps. Running leafshell will drop you into a configurable environment that automatically runs any of the Target Management or Build Tools.

If you have downloaded, installed and configured your environment manually; before running tools on your development machine you will need to configure your shell.

Manually Configure a Shell (without Leaf)

Some of the Legato tools need certain environment variables to be set. Leaf will take care of the environment set up for you or if you have set up your environment manually there are two ways to set up your shell's environment:

run bin/legs

source bin/configlegatoenv

Both of these files reside in the bin directory under your legato root directory (where the legato framework is installed). If the bin directory is missing or empty, it's because the framework has not been built yet.

bin/legs

You can run an interactive bash shell configured for Legato by running legs (short for "legato shell") every time you open a new shell.

$ bin/legs

After running legs, exit the shell at any time to terminate legs and restore your shell's environment.

Warning

If you have two Legato framework versions installed on your PC, to switch versions you MUSTexit out of legs and run the legs script again from the other version.

bin/configlegatoenv

Use configlegatoenv as alternative to bin/legs:

$ source bin/configlegatoenv

configlegatoenv does not spawn an new shell, instead it imports the Legato configuration within your current shell session. This is useful if you want to use bash alternatives like zsh.

Warning

If you have two Legato framework versions installed on your PC, to switch versions you MUSTsource the configlegatoenv script from the other version.