These instruction works on XP Windows
PC with NTFS. In case following instruction does not work or you are using some
other operating systems then please follow official TinyOS installation instructions.
Step 1: Install Java SDK from Sun website. It should be jdk 1.5/1.6. Please check if you already have java installed using “java –version” command.
Step 2: Install Cygwin using following instructions
Root Directory: c:\cygwin
Install for: All Users
Default Text file type: Unix/Binary
Step 3: Installing TinyOS and nesC
–-ignoreos
avr-binutils-2.15tinyos-3.cygwin.i386.rpm”–-ignoreos
avr-gcc-3.4.3-1.cygwin.i386.rpm”–-ignoreos
avr-libc-1.2.3-1.cygwin.i386.rpm”–-ignoreos
avarice-2.4-1.cygwin.i386.rpm”–-ignoreos
avr-insight-6.3-1.cygwin.i386.rpm”–-ignoreos
nesc-1.2.8a-1.cygwin.i386.rpm” (Note: rpm -ivh will not install it correctly, hence use -Uvh ...)–-ignoreos
tinyos-tools-1.2.4-2.cygwin.i386.rpm”–-ignoreos
tinyos-2.0.2-2.cygwin.noarch.rpm”Step 4: Setting environment variables.
1. While running cygwin change directory to /etc/profile.d/
2. Create a new file named “tinyos.sh”. You can use "nano" editor, it is similar as "pico" editor.
3. Add following lines in tinyos.sh file.
TOSROOT=/opt/tinyos-2.x
TOSDIR=$TOSROOT/tos
MAKERULES=$TOSROOT/support/make/Makerules
export TOSROOT
export TOSDIR
export MAKERULES
4. Use command "chmod a+x tinyos.sh"
5. Use command "dos2unix tinyos.sh". It is just to make sure that file is in right format.
6. Restart the cygwin
7. In the windows CLASSPATH environment variable put "C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.;" (do not forget to put the dot in the CLASSPATH as mentioned here)
Step 5: Installing Graphviz (same as in offical installation instructions)
Go to download page of the Graphviz project and download the appropriate RPM. You only need the basic graphviz RPM (graphviz-); you don't need all of the add-ons, such as -devel, -doc, -perl, etc. Install the rpm with rpm -i rpm-name. In the case of Windows, there is a simple install program, so you don't need to deal with RPMs.
You are Done with the installation!
Test if installation was a success. In cygwin cd to "/opt/tinyos-2.x/apps/Blink" and Use
command "make mica2". If it runs without errors then we are in
business. :-)