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

We are installing a Fedora 12 virtual machine on Xen for our sensor mote application development.

1. Install essential packages
# yum install wget gcc gcc-c++ cvs svn git automake
# yum install graphviz flex bison python-devel python perl ocaml-cil-cilly msp430-gcc msp430-libc msp430-binutils avr-binutils avr-gcc avr-libc avarice avr-gdb avrdude

2. Download and install nesC compiler
a) Before that, you need to check if Java has been installed in your system:
# java -version
If it shows "command not found", download the latest Java RPM binary from the Java official website and install it:
# chmod +x jdk-6u24-linux-x64-rpm.bin
# sudo ./jdk-6u24-linux-x64-rpm.bin
# mkdir /usr/java
# vim /usr/java/
Add "export JAVA_HOME=/usr/java/jdk1.6.0_24" to the file and save it, then:
# vim ~/.bashrc
Add "source /usr/java/" to the end of the file and save it, then relogin to the system to install Java:
# alternatives --install /usr/bin/java java $JAVA_HOME/jre/bin/java 1
# alternatives --install /usr/bin/javaws javaws $JAVA_HOME/jre/bin/javaws 1
# alternatives --install /usr/bin/javac javac $JAVA_HOME/jre/bin/javac 1
# alternatives --install /usr/bin/jar jar $JAVA_HOME/jre/bin/jar 1
Now when you input "java -version" again, it should display the following message:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
b) Next, download the nesC compiler from here and install it:
# tar -xvzf nesc-1.3.1.tar.gz
# cd nesc-1.3.1/
# ./configure
# make
# sudo make install

Free Web Hosting