Friday, July 31, 2009

how to install tinyos in debian/boss/ubuntu.

vim /etc/apt/sources.list
deb http://ftp.se.debian.org/debian lenny main contrib non-free
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main

#apt-get update
#apt-get install tinyos-2.0.2


which installs following packages.
avr-binutils-tinyos avr-gcc-tinyos avr-libc-tinyos avr-optional-tinyos
avr-tinyos avr-tinyos-base avrdude-tinyos deputy-tinyos graphviz gsfonts-x11
java-common libgraphviz4 libnss-mdns msp430-binutils-tinyos
msp430-gcc-tinyos msp430-libc-tinyos msp430-optional-tinyos msp430-tinyos
msp430-tinyos-base nesc odbcinst1debian1 python-serial sun-java5-bin
sun-java5-demo sun-java5-jdk sun-java5-jre tinyos-2.0.2 tinyos-base
tinyos-required-all tinyos-required-avr tinyos-required-msp430 tinyos-tools
ttf-liberation unixodbc
after installation setup require to be done
add in .bashrc or /etc/profile
#Sourcing the tinyos environment variable setup script
source /opt/tinyos-2.0.2/tinyos.sh


Installing a TinyOS enviromnent has five basic steps; Windows requires an extra step, installing Cygwin, which is a UNIX-like environment. The steps are:

1. Installing a Java 1.5 (Java 5) JDK. Java is the most common way of interacting with mote base stations or gateways that are plugged into a PC or laptop.
2. Windows only. Install Cygwin. This gives you a shell and many UNIX tools which the TinyOS environment uses, such as perl and shell scripts.
3. Installing native compilers. As you're compiling code for low-power microcontrollers, you need compilers that can generate the proper assembly code. If you using mica-family motes, you need the AVR toolchain; if you're using telos-family motes, you need the MSP430 toolchain.
4. Installing the nesC compiler. TinyOS is written in nesC, a dialect of C with support for the TinyOS concurrency model and component-based programming. The nesC compiler is platform-independent: it passes its output to the native compilers, so that it can take advantage of all of the effort put into their optimizations.
5. Installing the TinyOS source tree. If you want to compile and install TinyOS programs, you need the code.
6. Installing the Graphviz visualization tool. The TinyOS environment includes nesdoc, a tool that automatically generates HTML documentation from source code. Part of this process involves drawing diagrams that show the relationships between different TinyOS components. Graphviz is an open source tool that nesdoc uses to draw the diagrams.


reference
http://docs.tinyos.net/index.php/Installing_TinyOS_2.0.2#Two-step_install_on_your_host_OS_with_Debian_packages

No comments: