|
reactor-uc 0.1
|
![]()
This is a west-centric project template for Lingua Franca applications targeting the Zephyr RTOS using the micro-c (uc) target of Lingua Franca.
You must use one of the following operating systems:
Linux Officially supported are Debian & UbuntumacOSYour system must have the following software packages (you likely have at least some of these already):
git — a distributed version control systemjava — Java 17This template uses reactor-uc, the "micro C" target for Lingua Franca. Clone this repo with one of the following commands:
And make sure that the REACTOR_UC_PATH environment variable is pointing to it.
Press Use template in the upper right corner and choose Create a new repository. Then clone this new repository to your machine. To start developing in your new repo, you must first install the Zephyr dependencies, toolchains and SDK. This requires you to follow selected parts of the Zephyr official Getting Started guide.
Within your newly cloned project, create and activate a virtual environment for this project.
IMPORTANT: Remember to always activate the virtual environment before using the template.
Install the west, the Zephyr build tool
Pull down the Zephyr RTOS sources using west (this can take a while)
Install Python dependencies
Export a CMake package
To build and emulate the provided HelloWorld.lf using the native_posix target, do:
To build for a different board, e.g. the qemu_cortex_m3 emulation. Either change the BOARD variable in CMakeLists.txt, or using west:
Note the -p always which is a west option for cleaning the build directory. This must be used when changing the target board. Alternatively west clean can be run in between.
The LF_MAIN CMake variable decides which LF application to build. This can either be modified in CMakeLists.txt or from the command line. To build Blinky.lf for Adafruit Feather do:
With west, CMake arguments are separated from west arguments with a --.
The log level of the LF app can be changed by setting the variable LOG_LEVEL in CMakeLists.txt or by modifying it on the command line:
By passing -p always to west, the build folder is cleaned and the project is reconfigured by CMake. However, this does not clean the files generated by lfc. For this we provide a custom west command west clean defined in clean.py which also cleans the files generated by LFC. Use it to do a complete reset.
To flash an application onto a board, simply use west flash. This may require the installation of additional, vendor-specific tools. See the official docs for more information.
This template integrates the Lingua Franca compiler lfc into a west-based project. This requires that the user understands how to use west and zephyr. Please refer to the official docs for more information.
or
Activate the virtual environment where the Zephyr dependencies are installed.