Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
AMMDK Software Library
AMM Application Software
Currently, while the standard is still in development, all AMM modules share the same repository and underlying codebase, available here. This is the code that communicate via DDS to other modules, including the Module Manager. As that codebase develops, it will be broken into a library.
AMMDK Firmware & Software Library
For modules built using the AMMDK hardware, there is an additional layer of code needed to communicate with the hardware peripherals attached to the boards. As illustrated in the AMMDK Overview, for a given AMMDK-based module, there are two different places that run AMM-specific code, the Module Application code, which runs in a Linux environment on the SoM, and the I/O Control code, which runs on the 'Tiny' microcontroller (MCU) and interfaces with actual hardware peripherals. The AMMDK Software Library allows these two codebases to communicate seamlessly with one another.
The AMMDK Software Library utilizes an SPI link between the SoM and the 'Tiny' MCU to synchronously pass data with relatively high throughput and low latency, certainly fast enough to be unnoticed by human faculties. The Library transmits via datagram packets while providing error correction and packet delivery guarantees. It also establishes the SPI link using the appropriate resource on the OS hosting the code.
On top of the datagram API, the AMMDK Software Library also provides a 'Remote Control' API for the AMM Application code (running in Linux on the SoM) that looks as if the Application code is controlling the I/O Controls directly. For the remote API to function, a specific firmware needs to be flashed onto the Tiny MCU, which is also provided.
Common SPI Repo
Tiny MCU Repo
amm-tiny repo contains the code that runs on the Tiny MCU, with example code using the base datagram API as well as the code for the remote API. The repo also contains tools & instructions for flashing code onto the Tiny MCU and connecting to the Tiny MCU via
gdb for debugging purposes. More detailed documentation about the remote API is available in
AMM Application examples
The repo containing the AMM module application code contains examples using both the remote and datagram APIs. The remote API is leveraged heavily by the Fluid Manager code, while the datagram API is presented in a 'hello world' example of blinking an LED at the simulated heartbeat.