Skip to content

helena-project/storm.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tock Embedded OS Build Status

Tock is an operating system designed for running multiple concurrent, mutually distrustful applications on Cortex-M based embedded platforms like the Storm. Tock's design centers around protection, both from potentially malicious applications and from device drivers. Tock uses two mechanisms to protect different components of the operating system. First, the kernel and device drivers are written in Rust, a systems programming language that provides compile-time memory safety, type safety and strict aliasing. Tock uses Rust to protect the kernel (e.g. the scheduler and hardware abstraction layer) from platform specific device drivers as well as isolate device drivers from each other. Second, Tock uses memory protection units to isolate applications from each other and the kernel.

Requirements

  1. Rust 1.0.0-alpha.2
  2. arm-none-eabi toolchain (version >= 4.9)
  3. stormloader (recommended) or JLinkExe for programming the storm
  4. Command line utilities: wget, sed, make

Installing Requirements

Rust (1.0.0-alpha.2)

Compiling Rust takes a long time, and while Rust is changing, you'll need to use a version that is known to compile Tock. We've linked binary distributions of such a version for various OSs below:

arm-none-eabi toolchain

On Mac OS X, you can get the arm-none-eabi toolchain via port:

$ port install arm-none-eabi-gcc

or via homebrew:

$ brew tap PX4/homebrew-px4
$ brew update
$ brew install gcc-arm-none-eabi-49

On Linux it is available through many distribution managers:

$ pacman -S arm-none-eabi-gcc
$ apt-get install gcc-arm-none-eabi

For Windows and other operating systems, download site is here.

Alternatively, if you would like simulator mode in arm-none-eabi-gdb, you can use the build scripts in the tools directory, in this order: build-arm-binutils then build-arm-gcc then build-arm-gdb.

Stormloader

You'll need to install libftdi-0.20.tar.gz for stormloader to function; newer versions will not work. In turn, libftdi depends on libusb and libusb-config. On OS X, you can satisfy the libftdi prereqs via homebrew:

brew install libusb libusb-compat

You can obtain stormloader via pip (python2 only, currently):

sudo pip install stormloader

You can update stormloader via pip as well:

sudo pip install -U stormloader

Then add a udev rule (Ubuntu) for the FTDI chip:

sudo su
echo 'ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0666"' > /etc/udev/rules.d/99-storm.rules

Building

If all the tools are in your $PATH, you should be good to go. Otherwise set the env variables:

  • RUSTC - rustc compiler
  • CC - arm-none-eabi-gcc
  • OBJCOPY - arm-none-eabi-objcopy

Simply call make:

make

Programming the storm

If you are using the stormloader, there is a make rule that compiles the source and programs the storm:

make program

If you are using JLinkExe, use the script included in the source root directory:

JLinkExe prog.jlink

Printf support

To get the UART printf from firestorm:

sload tail