Gantry is a framework for bootstrapping embedded applications using the Zephyr RTOS. The architecture is event-driven and data-centric. Applications are made up of composable modules that communicate with each other via events. Modules can define custom event types and payloads, but the core event structure is universal such that any module can parse any event.
The system state, configuration, and device information is all managed by a central data storage module, the Stow. Modules, as well as connected devices, can subscribe to, set, and get items in the Stow. This data-centric approach makes it trivial for modules or devices to react to events and communicate with each other. It avoids common pitfalls where many modules define similar events or pass state via arbitrary event payloads.
What's included:
| Component | Description |
|---|---|
| Stow | Central data store for device information, state, and configuration. Modules and external clients can set, get, and subscribe to items in the Stow. |
| Memory Management | Configurable reference-counted memory pools. |
| Events | Universal event format for inter-process communications. |
| Modules | Composable application modules. |
| Resource Checker | Static analysis for memory and resource leaks. |
| Flags | State flags for managing and monitoring module state. |
The project is meant to be included as a West module within a West workspace.
- Include the module's repository in your West manifest then run
west update. - Define a
stow.yamlin your applications root directory. - Enable the desired Gantry features in your project's
prj.conf. - Build our application and begin making use of the Gantry library.
The samples folder provides an example application using the Gantry library. Gantry Bridge can be used to interact with the sample app.
The project is meant to be included as a West module within a West workspace.
docscontains project documentation.includeandlibcontain the headers and source for the Gantry library, respectively.samplescontains example applications using the Gantry library.testscontains a suite of unit tests.toolscontains useful Python utilities, code generation, and analysis tools.pythoncontains an example implementation of a Stow client.
- Nix with flakes enabled
- If you prefer not to use Nix, review the dependencies within the
shell.nixfile and install them on your system. - Additionally, a Docker container of the environment can be built using
just docker-build. This container can be leveraged to use the development environment on systems without the necessary dependencies.
nix developAlternatively, with
direnvinstalled, rundirenv allowto automatically enabled the environment when entering the project folder.
just initjust build # Build the example app for the nRF52840 DK
just flash # Flash it with probe-rs
just fix # Apply the formatters and the copyright header
just check # Check headers, formatting, lint, leaks, cppcheck and vectors
just test unit # Run the Python and native_sim test suites
just test # Run every test that needs no hardware, including the board buildsThe example app supports the nRF52840 DK (default), the nRF54L15 DK and the nRF54LM20 DK. Pick another board with just board=<board> build, see the example app's README for each board's target and serial port.
Run just to list every command.
The hardware recipes use probe-rs. Install probe-rs's udev rules to reach the probe without root.
The documentation is available at demizo.github.io/Gantry/.
Gantry is licensed under the Apache 2.0 license, see the LICENSE file for the full license text.
