Install TinyOS 2.0 in Fedora 12 (64-bit) Virtual Machine on Xen (cont'd)


3. Install Deputy compiler
a) Since Deputy compiler is coded in Caml, we need to first install Caml:
# wget http://caml.inria.fr/pub/distrib/ocaml-3.09/ocaml-3.09.0.tar.gz
# tar xvzf ocaml-3.09.0.tar.gz
# cd ocaml-3.09.0/
# ./configure
# make world
# make opt
# sudo make install
b) Now we can install Deputy compiler:
# wget http://dl.dropbox.com/u/31587953/deputy-1.1.tar.gz
# tar xvzf deputy-1.1.tar.gz
# cd deputy-1.1/
# ./configure
# make
# sudo make install

4. Install Tinyos 2.0
# cd /opt
# svn checkout http://tinyos-main.googlecode.com/svn/trunk/ tinyos-main-read-only
# mv tinyos-main-read-only tinyos-2.0
# vim /opt/tinyos-2.0/tinyos.sh
Add the following lines to the file:
export TOSROOT=/opt/tinyos-2.0
export TOSDIR=$TOSROOT/tos
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
export MAKERULES=$TOSROOT/support/make/Makerules
# vim ~/.bashrc
Add "source /opt/tinyos-2.0/tinyos.sh" to the end of the file and relogin to the system:
# cd $TOSROOT/tools/
# ./Bootstrap
# cd platforms/mica/uisp
# ./bootstrap
# cd $TOSROOT/tools/
# ./configure
# make
# sudo make install

5. Verify TinyoS installation and build an application
# tos-check-env
# cd $TOSROOT/apps/Blink
# make telosb

Free Web Hosting