Configure the Application Framework
Now that you have the Legato Application Framework and a toolchain installed on your development machine, you can now configure the Framework for your specific target. Running the make
script for your target sets up the target management tools, builds a default update for your target and sets up environment variables for your target. Each time you upgrade Legato, or switch target devices you need to run the make scripts again to set up the environment specific for your target.
Configure Application Framework for a Target
All supported platforms use the make
tool and have pre-configured makefiles included in the Framework.
The framework build and configuration may be modified using KConfig to select configuration options.
- Warning
- You must have the matching toolchain installed for your target.
Run make
<target> to build the framework for the target from your Legato Root Directory:
$ make wp85 # makes an update file for a WP85 series device
List of Supported Platforms (see your module vendor for information and the toolchain required to build)
Target | Description |
---|---|
localhost | Test build process, very limited functionality |
raspi | Raspberry Pi running Raspbian |
wp85 | Sierra Wireless WP85xx modules |
wp77xx | Sierra Wireless WP77xx modules |
wp76xx | Sierra Wireless WP76xx modules |
wp750x | Sierra Wireless WP750x modules |
ar86 | Sierra Wireless AR86xx modules |
ar759x | Sierra Wireless AR759x modules |
ar758x | Sierra Wireless AR758x modules |
ar7 | Sierra Wireless AR7xxx modules |
Running make will:
- build an update pack for your target with the version of the Legato Application Framework that is installed on your dev machine.
- build tools needed to build apps and configure your target.
- set-up environment variables and other useful configuration to make using the Framework easier.
Once the make scripts have run you should now see the following directories /bin
and /build
. The bin
directory contains tools and scripts for the framework and the build
directory contains all the build files and install files to update your target.
Configure Shell
You will need to configure your shell so you can easily use the Tools included with Legato Application Framework.
cd
into the legato root directory (e.g.; ~/legato-repo/legato
) and run the script ./bin/legs or
source bin/configlegatoenv
. legs
(legato shell) will open up a new shell and configure the Legato environment variables such as setting $LEGATO_ROOT and adding it to your path. Sourcing configlegatoenv
will do the same thing but will configure your current shell, preserving your history.
For the list of tools and further instructions on configuring your shell see Tools .
$ ./bin/legs
OR
$ source bin/configlegatoenv
- Note
- You can also add bin/configlegatoenv to your bash profile so that the environment variables will automatically be configured each time you log into your Dev Machine.
Update Target
The Legato Runtime Environment included on your target may not be at the same version that is installed on your dev machine. Please check what version(s) are compatible with your target before updating. Now that you've run make
for your target you will have an initial "default" build of Runtime Environment that you can now update your target with. The update file will be located in the build/
<target> directory and will be named system
.<target>.update.
To update the runtime environment on your target use the update tool to pass the system update pack to the target device for installation. I
$ update build/wp85/system.wp85.update 192.168.2.2
OR
$ update build/raspi/system.raspi.update <target IP>
Start Project
Now you are ready to start your first project, we suggest starting with our helloWorld tutorial and then work your way through helloIPC before starting coding your own projects. The hello tutorials introduce you to some of the methodologies and concepts of how build apps and systems for your target.
In your workspace directory create a folder for your project.
$ mkdir <projectName> $ cd <projectName>
Each project will probabbly contain apps, components and
- Note
- It is recommended to do all of your work within project directories, while the Application Framework is open source and you are able to customize most parts within it, your project directory should contain all your apps, components and systems that you have created/customized. This ensures that future upgrades will not overwrite any of the work that you have done.
Copyright (C) Sierra Wireless Inc.