tree: 933a21eb82bdc8a8de3d9a4b878a576f41b0c3b1 [path history] [tgz]
  1. examples/
  2. src/
  3. Cargo.toml
  4. README.md
capsules/README.md

Tock Capsules

Capsules are drivers that live in the kernel and are written in Rust. They are required to conform to Rust's type system (i.e. no unsafe). Capsules are platform agnostic and provide a range of features:

  • Drivers for sensors or other ICs
  • Virtualization of hardware resources
  • Syscall interfaces for userland applications

When using hardware resources, capsules must only use features provided by the HIL (hardware interface layer). This ensures they can be used on multiple microcontrollers and hardware platforms.

Capsules have some flexibility in how they present access to a sensor or virtualized hardware resource. Some capsules directly implement the Driver trait and can be used by userland applications. Others provide an internal interface that can be used by other in-kernel capsules as well as a Driver interface for applications.

List of Tock Capsules

The list of Tock capsules and a brief description.

Sensor and other IC Drivers

These implement a driver to setup and read various physical sensors.

These drivers provide support for various ICs.

Wireless

Support for wireless radios.

Libraries

Protocol stacks and other libraries.

MCU Peripherals for Userspace

These capsules provide a Driver interface for common MCU peripherals.

Helpful Userspace Capsules

These provide common and better abstractions for userspace.

Virtualized Sensor Capsules for Userspace

These provide virtualized (i.e. multiple applications can use them simultaneously) support for generic sensor interfaces.

Virtualized Hardware Resources

These allow for multiple users of shared hardware resources in the kernel.

Utility Capsules

Other capsules that implement reusable logic.

Debugging Capsules

These are selectively included on a board to help with testing and debugging various elements of Tock.

  • Debug Process Restart: Force all processes to enter a fault state when a button is pressed.
  • Low-Level Debug: Provides system calls for low-level debugging tasks, such as debugging toolchain and relocation issues.
  • Process Console: Provide a UART console to inspect the status of process and stop/start them.