Get started with Tock quickly! You can either install a virtual machine or setup a local development environment.

Option 1: Run a Virtual Machine

You can download a virtual machine image with all of the dependencies already installed here or here. Using curl to download the image is recommended, but your browser should be able to download it as well:

$ curl -O https://praxis.princeton.edu/~alevy/Tock.ova
$ curl -O https://www.cs.virginia.edu/~bjc8c/archive/Tock.ova

With the virtual machine image downloaded, you can run it with VirtualBox or VMWare:

The VM account is "tock" with password "tock".

If your Host OS is Linux, you may need to add your user to the vboxusers group on your machine in order to connect the hardware boards to the virtual machine.

Option 2: Install All Tools on your Machine Locally

Install the following:

  1. Command line utilities: curl, make, git, python and pip3.

    # Ubuntu
    $ sudo apt install git wget zip curl python3 python3-pip python3-venv
  2. Clone the Tock kernel repository.

    $ git clone https://github.com/tock/tock
  3. rustup. This tool helps manage installations of the Rust compiler and related tools.

    $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  4. arm-none-eabi toolchain and riscv64-unknown-elf toolchains. This enables you to compile apps written in C.

    # MacOS
    $ brew install arm-none-eabi-gcc riscv64-elf-gcc
    # Ubuntu
    $ sudo apt install gcc-arm-none-eabi gcc-riscv64-unknown-elf
  5. tockloader. This is an all-in-one tool for programming boards and using Tock.

    $ pipx install tockloader

    Note: You may need to add tockloader to your path. If you cannot run it after installation, run the following:

    $ pipx ensurepath
  6. JLinkExe to load code onto your board. JLink is available from the Segger website. You want to install the "J-Link Software and Documentation Pack". There are various packages available depending on operating system.

  7. OpenOCD. Another tool to load code. You can install through package managers.

    # MacOS
    $ brew install open-ocd
    # Ubuntu
    $ sudo apt install openocd