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. |
| 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.
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.
This project uses just to easily run commands and scripts. Run just to view available commands.
The documentation is available at demizo.github.io/Gantry/.
To locally generate and open the HTML docs:
# Build the documentation
just docs
# Open the library documentation
just docs-open
# Open the source code documentation
just doxy-openjust initTo re-sync after the West manifest changes run:
just update-workspaceBuild the example application for the nRF52840 DK. Gantry does not have specific hardware requirements so most 32-bit targets should work:
just buildFor a pristine rebuild:
just rebuildFlash to a connected board via OpenOCD:
just flashMass-erase the board:
just eraseRun all unit tests on the native simulator:
just test-allRun tests for a specific component:
just test stow
just test memory
...Gantry is licensed under the Apache 2.0 license, see the LICENSE file for the full license text.
