What is PlatformIO?
PlatformIO is a user-friendly and extensible integrated development environment with a set of professional development instruments, compilers and debuggers. PlatformIO provides modern and powerful features to simplify the creation and delivery of embedded products. That is the reason why Luos uses PlatformIO's project structure for its examples, allowing users to use and share easily services and developments on a unified environment. Also, Luos engine and some tools like the gate or the inspector are available in the PlatformIO's registry. This registry allows users to link directly a project and a library, like Luos engine, by including dependencies in the configuration project file called platformio.ini. Learn more about PlatformIO and how to install it in VS Code .
PlatformIO's project structure
Checkout the Luos tutorial on how to create a Luos project with PlatformIO .
Luos configuration for platformio.ini
With PlatformIO, Luos libraries use scripts before compilation to select and include the code folder depending to your needs.
Configuration parameters need to be the same as the folder name you want to use.
build_flags definition may be added to your platformio.ini file to configure these scripts.
Build flags examples:
Every Luos project needs to have a node_config.h file allowing to configure the hardware dependencies and the libraries. See the basics concept page for more information.
A good configuration looks like this:
During the build, a message appearing in red means a problem has occurred, except for telemetry configuration (see next ).
Configuration for Luos engine Library
|LUOSHAL||Defines the HAL family to use depending on your MCU.||Luos engine HAL|
|NOTELEMETRY||Disables telemetry.||On by default|
By default, the telemetry is enabled and sends anonymous information to Luos maintainers. This information is only used to improve Luos engine experience.
When telemetry message is appearing in red, this means it is disabled, but compilation will run properly.
For more information about telemetry, check the file source_filter_script.py.
Configuration for the gate
|GATEFORMAT||Chooses the format of data sent by the gate through a pipe.||Available folder names .|
For more information about the gate configuration, check the file select_format_script.py.
Configuration for the pipe
|PIPEMODE||Chooses the pipe style to send or receive information through a specific physical layer.||Available folder names|
|PIPEHAL||Chooses the pipe HAL matched to a specific physical layer with the board.||Available folder names on the selected PIPEMODE|
For more information about the pipe configuration, check the file select_hal_script.py.