Installing from SCM

From TinyOS Wiki
Revision as of 11:36, 15 March 2013 by Till (talk | contribs) (mention github)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from a SCM such as GIT. Git repositories mirroring the TinyOS CVS repository can be found at:


Enable the tinyos tools repository

Stanford hosts the primary Debian/Ubuntu tools repository.

The TinyOS Ubuntu pool is the same across all current distributions. So specifing "lucid" works as the distribution specifier.

 sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main" >> /etc/apt/sources.list
 # or sudo apt-add-repository "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main"


 sudo apt-get update


Install the nesc compiler

sudo apt-get install nesc


Install the crosstools

Debian MSP430:

sudo apt-get install msp430-tinyos

Debian AVR:

sudo apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos

Checkout the TinyOS 2.x source tree

Checkouts from TinyOS GIT repository are read-only.

cd ~
mkdir -p local/src
cd local/src
git clone https://github.com/tinyos/tinyos-main.git tinyos-2.x

Compile the TinyOS tools

 sudo apt-get install automake
 cd tinyos-2.x/tools
 ./Bootstrap
 ./configure --prefix=$HOME/local
 make all
 make install

A few ENTERs will be required by the last two commands.

Set the environment variables

Add the following to .profile (or .bash_profile or .bashrc depending on your system):

export PATH=$HOME/local/bin:$PATH
export TOSROOT=$HOME/local/src/tinyos-2.x
export TOSDIR=$TOSROOT/tos
export MAKERULES=$TOSROOT/support/make/Makerules
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH
export PATH=$TOSROOT/support/sdk/c:$PATH