Resources: How To Install TinyOS

This tutorial outlines a working procedure to install TinyOS 1.x with all the tools required to develop applications for the XBow MicaZ Platform on an Ubuntu Linux system. These instructions have been tested with Ubuntu and Kubuntu Dapper, but it should not be too difficult to apply them to any other Debian based Linux distribution.


  1. Install the following packages using any conventional APT package manager: cvs, gcc, gperf, graphviz, m4, and make.
    apt-get install cvs gcc gperf graphviz m4 make
  2. Install the following DEB packages manually: avr-libc_20030512cvs-2_i386.deb, avr-binutils_2.13.2.1-2_i386.deb, avr-gcc_3.3tinyos-2_i386.deb, tinyos-tools_1.1.0-2_i386.deb, ibmjava2-142-ia32-sdk_1.4.2-6_i386.deb, and ibmjava2-javacomm_1.4.2-6_i386.deb. Afterwards, mark the packages to be held by the package manager, so they won't be automatically upgraded by the system.
  3. Checkout the latest TinyOS 1.x files from the CVS repository into the /opt/ directory. Afterwards, chown the directory and its contents to your own user.
    cd /opt/
    sudo cvs \
    sudo cvs \
    co tinyos-1.x
    sudo chown -R `whoami` tinyos-1.x
  4. Create the TinyOS Environment variables by appending the appropriate shell code to your ~/.bashrc file. Afterwards, close and reopen the terminal to start a session with the new environment.
    cat bashrc-append.txt >> ~/.bashrc
  5. Download the nesC Compiler source code and apply the following patches: builtin_offset.patch.nesc, static-clex.patch.nesc, and noinline.patch.nesc. Afterwards, build and install it.
    cd nesc-1.1.3
    patch -p1 < noinline.patch.nesc
    sudo make install
  6. Build and install the remaining TinyOS tools.
    cd $TOSROOT/tools/scripts/
    sudo make install prefix=/usr/local
    sudo ln -s $TOSROOT/tools/src/motelist/motelist-linux \
    cd $TOSROOT/tools/java/
  7. Configure the Javax Comm library to use the appropriate serial ports by editing /opt/IBMJava2-142/jre/lib/

Additional Resources:


Retrieved from
Page last modified on May 03, 2008, at 05:21 PM