Tock Logo

Talking Tock

Announcing Tock 1.0

A stable ABI

The Tock team is happy to announce the first stable version of Tock, 1.0. Tock is an embedded operating system designed for running multiple concurrent, mutually distrustful applications on low-memory and low-power microcontrollers.

  1. What’s in 1.0
  2. System Calls
  3. Stable Drivers
    1. Base
    2. Sensors
  4. Tock Binary Format

What’s in 1.0

Tock version 1.0 stabilizes the Application Binary Interface (ABI) of Tock processes, including the binary format of processes on flash, the semantics and behavior of the five system calls, and the driver interface exposed through system calls for a basic set of portable interfaces.

The goal is to be able to write cross-platform processes that will run on any Tock kernel that is 1.0 compliant. For this version, stability means that those interfaces will not change until, at least, the next major version. In other words, if you write a process to that uses only the stable drivers and it doesn’t work as expected, it’s either a bug in the kernel or a bug in the userland library (and we appreciate bug reports ♥).

System Calls

Tock understands five system calls:

  1. command

  2. subscribe

  3. allow

  4. yield

  5. memop

The first three are routed to specific drivers based on the first argument passed by the process. command is used for very short lived operations, subscribe lets processes register a callback for completion of a long-running operation, and allow shares a process buffer with a kernel driver.

yield blocks the process until a callback is available and memop controls the process memory layout.

Details are specified in https://github.com/helena-project/tock/blob/master/doc/Syscalls.md#the-system-calls

Stable Drivers

The drivers listed below are stable as of 1.0. More drivers will become stable in future minor versions, and details of each interface can be found at https://github.com/helena-project/tock/tree/master/doc/syscalls

Base

Sensors

Tock Binary Format

Tock processes are represented using the Tock Binary Format (TBF). A TBF includes a header portion, which encodes meta-data about the process, followed by a binary blob which is executed directly.