1. download - xubuntu 8.04 (hardy-heron) PC(Inel x86) alternate install CD alternate.
www.xubuntu.com/get
2. excute vmware.
3. installation xubuntu.
4. Add Stanford's TinyOS repository.
#vim /etc/apt/sources.list file
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main
update repository.
#sudo apt-get update
4. Add the packages.
#sudo apt-get install cvs subversion autoconf automake1.9 python-dev
#sudo apt-get install g++ g++-3.4 gperf swig sun-java5-jdk graphviz alien fakeroot
#sudo apt-get install msp430-tinyos avr-tinyos
#sudo apt-get install tinyos-tools (include all files)
5. Environment Variables
#vim /etc/profile.d/tinyos.sh
----------------------------------------------------------------------
#Java
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JDKROOT=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=$CLASSPATH:.
#Java can find libtoscomm.so and libgetenv.so
export LD_LIBRARY_PATH=$JDKROOT/jre/lib/i386
#Conditional environmental setup for TinyOS-1.x
export TOSROOT=/opt/tinyos-1.x
export TOSDIR=$TOSROOT/tos
export MAKERULES=$TOSROOT/tools/make/Makerules
export CLASSPATH=$CLASSPATH:$TOSROOT/tools/java
# Finally set the path for the MSPGCCROOT
export MSPGCCROOT=/usr/msp430
export PATH="$MSPGCCROOT/bin:$PATH"
---------------------------------------------------------------------------
6. Install TinyOS 1.x
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x
# sudo mv tinyos-1.x /opt
7. Install TinyOS 2.x
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x-contrib
# sudo mv tinyos-2.x /opt
# sudo mv tinyos-2.x-contrib /opt
8. Java Serial Communications for TinyOS 1.x
$TOSROOT/beta/TOSComm/comm/Makefile with:
JAVADIR=/usr/lib/jvm/java-1.5.0-sun
Now install it.
#alias g++=g++-3.4; cd $TOSROOT/beta/TOSComm/comm; sudo make install
or,,
RXTXComm install...
download site http://.www.rxtx.org/
$JAVA_HOME/jre/lib/i386/
librxtxParallel.so & librxtxSerial.so file
$JAVA_HOME/jre/lib/ext/
RXTXComm.jar file
tinyos java application source file modify...
import javax.comm.*; -> import gnu.io.*;
댓글 없음:
댓글 쓰기