Crate ariel_os

Crate ariel_os 

Source
Expand description

Ariel OS is an operating system for secure, memory-safe, low-power Internet of Things (IoT). Supported hardware includes various 32-bit microcontrollers.

This is the API documentation for Ariel OS. Other resources available are:

  • πŸ“” Extensive documentation for Ariel OS can be found in the book.
  • βš™οΈ The git repository is available on GitHub.
  • ✨ Examples demonstrate various features of Ariel OS.
  • πŸ§ͺ A set of test cases further verifies the capabilities of Ariel OS.
  • 🚧 The roadmap shows the planned features for Ariel OS.

Β§Cargo features

Ariel OS is highly modular with a significant number of features to configure the operating system.

Β§System functionality

  • alloc β€” Enables a global system allocator.
  • external-interrupts β€” Enables GPIO interrupt support.
  • time β€” Enables the internal executor’s timer queue, required for timer support.
  • csprng β€” Enables a cryptographically secure random number generator in the random module and support for the getrandom crate.
  • sensors β€” Enables unified support for sensors.

Β§Network protocols

  • ipv4 β€” Enables support for IPv4.
  • ipv6 β€” Enables support for IPv6.
  • tcp β€” Enables support for TCP.
  • udp β€” Enables support for UDP.
  • dns β€” Enables support for DNS.
  • mdns β€” Enables support for mDNS.
  • multicast β€” Enables support for multicast (for both IPv4 and/or IPv6 if enabled).
  • coap β€” Enables support for CoAP.
  • coap-server β€” Enables applications to set up CoAP server handlers. See coap::coap_run().

Β§Serial communication

  • i2c β€” Enables I2C support.
  • spi β€” Enables SPI support.
  • uart β€” Enables UART support.
  • usb β€” Enables USB support.
  • usb-hid β€” Enables USB HID support.

Β§System configuration

The config attribute macro allows to provide configuration for specific system functionality. The features below need to be enabled so that the provided custom configuration is taken into account.

  • network-config-override β€” Enables custom network configuration.
  • override-usb-config β€” Enables custom USB configuration.

Β§Multicore functionality

  • core-affinity β€” Enables support for core affinities (restricting threads to specific cores).

Β§Timer queue size configuration

Should only be enabled when threading is enabled, too. Default is 64 entries for regular boards and 8 entries for those with little ram. When more than this number of concurrent timers are used, the system will loop (and not sleep/idle anymore).

  • timer-generic-queue-8 β€” Enables support for up to 8 concurrent timers. (default on ram-tiny boards)
  • timer-generic-queue-16 β€” Enables support for up to 16 concurrent timers.
  • timer-generic-queue-32 β€” Enables support for up to 32 concurrent timers.
  • timer-generic-queue-64 β€” Enables support for up to 64 concurrent timers. (default)
  • timer-generic-queue-128 β€” Enables support for up to 128 concurrent timers.

Β§Development and debugging

  • bench β€” Enables benchmarking facilities.
  • no-boards β€” Allows to have no boards selected, useful to run target-independent tooling.

ModulesΒ§

asynch
Provides async functionality.
benchbench
Provides on-board benchmarking facilities.
buildinfo
Exposes information about the build.
cell
Shareable containers.
coapcoap
A CoAP stack preconfigured for Ariel OS.
config
Provides configuration to the system and the application.
debug
Provides debug interface facilities.
delegate
Delegate or lend an object to another task.
gpio
Provides consistent GPIO access.
hal
Provides MCU-specific items.
i2ci2c
Provides support for the I2C communication bus.
identity
Access to unique identifiers provided by the device.
netnet
Provides network access.
power
Provides power management functionality.
randomrandom
Provides a seeded random number generator depending on Ariel OS’s configuration.
reexports
This module contains all third party crates as used by Ariel OS.
sensorssensors
Provides a sensor abstraction layer.
spispi
Provides support for the SPI communication bus.
storagestorage
Provides key-value pair persistent storage on flash.
threadthreading
Multi-threading for Ariel OS.
timetime
Provides time-related facilities.
uartuart
Provides support for UART.
usbusb
Provides USB-related items.

Attribute MacrosΒ§

config
Allows to provide configuration for the associated driver during initial system configuration.
spawner
Registers a non-async function for autostart.
task
Defines an async task and optionally registers it for autostart.
threadthreading
Runs the function decorated with this attribute macro as a separate thread.