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 profile aware, 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 GitHub 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.

Section Description
Leaf Download, Install and Configure your development environment
Legato Plugin for VSCode Use Visual Studio Code IDE with Legato
GitHub Clone the source code of both Legato and the Linux Distros
KConfig Configure the Legato Application Framework
If you change options within Kconfig you must rebuild the framework by running make <target>.

Once you've set up your development environment, Legato contains Tools that will help you configure and diagnose your target or dev machine and build Systems, Apps and Components for Legato.

Section Description
Target Tools Tools that run on the target device
Target Management Tools Tools for managing target devices (run on Linux dev machine)
Build Tools Tools for building software (run on Linux dev machine)
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 leaf shell 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.


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.

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


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.

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