[Tinyos-help] cleaner and fast way of tiny os setup in windows + cygwin

Michael Schippling schip at santafe.edu
Fri Oct 31 10:27:12 PDT 2008


All this should not be so danged hard, but that's the way things get...

I threw in the towel on using automated scripts and helpful installs.
Instead I put everything explicitly in my .bashrc file so I can change
it when needed...this is especially useful in you use multiple versions
of Java and TOS... I'm using T1 so some of this may be different for the
modern user, and I also made a jar file out of the TOS java tools (which
I think is the default in T2 anyway) but I include the class tree as well.

Here's the relevant portions (again note there may be T2 variations)
note that backslashes '\' are used to continue lines for readability.
You can also include all the old cra...err...settings by adding $PATH or
$CLASSPATH to the end of the relevant export:

--------------------------------------------------------------------------
###
### Java stuff -- select a  JDK here
###  note: I have installed all my Java SDKs in C:/JAVA
###   and that CLASSPATHs need to have native, not cygwin, syntax
###
#JV="j2sdk1.3.1_10"
#JV="j2sdk1.4.2_04"
JV="jdk1.5.0_07"

# used by CLASSPATH so you don't have to keep editing things
JAVA_ROOT=C:/JAVA
# used by PATH so you don't have to keep editing things
JAVA_DIR=/cygdrive/c

###
### TinyOS stuff -- select TOS version directory to use here
###
#TV="tinyos-1.1.7"
#TV="tinyos-1.1.10"
#TV="tinyos-1.1.14"
TV="tinyos-1.x"

# used by TOS build system to find files
#  TOSROOT is for external programs and must have Windows syntax,
#  TOSDIR is used in makefiles and must have cygwin syntax
export TOSROOT=C:/cygwin/opt/$TV
export TOSDIR=/opt/$TV/tos
export MAKERULES=/opt/$TV/tools/make/Makerules

## for the mote Listen program and it's ilk
##  set to your COM port of interest
#export MOTECOM="serial at COM3:mica2"
export MOTECOM="serial at COM16:tmote"

## for serial port programmer, your syntax may vary...
export MIB510=COM3
#export MIB510=/dev/ttyS2

###
###  CLASSPATH for TOS and others
###    Many programs and packages add a huge number of extraneous jars...
###    I have just included the absolute basic TOS stuff: class tree and jar,
###     and just one example of an extra Java package:
###     the JMF I installed under C:/JAVA
###
export CLASSPATH="\
.;\
$TOSROOT/tools/java;\
$TOSROOT/tools/java/jars/tinytools.jar;\
$JAVA_ROOT/JMF2.1.1e/lib/jmf.jar"

###
### improve upon the execution PATH
###  gotta be careful here as many programs make addenda to the
###   PATH at will when they are installed, this is just the basics.
###  note: the REAL Java SDK needs to come before Win32
###
export PATH="\
/usr/local/bin:\
/usr/bin:\
/bin:\
$JAVA_DIR/$JV/bin:\
/cygdrive/c/WINDOWS/system32:\
/cygdrive/c/WINDOWS:\
/cygdrive/c/WINDOWS/System32/Wbem:\
/cygdrive/c/Program Files/GRAPHICS/GraphViz/bin:\
/opt/msp430/bin:\
/usr/avr/bin:\
."

----------------------------------------------------------------------------

Hope this helps and that I haven't left something out while trying to simplify.
MS


nisha jain wrote:
> Hello All,
>  
> I am installing Tiny OS 2.0x version in windows + cygwin and I did it 
> first time successfully after lot of problem resolution.
> Unfortunately I haven't written steps down and now I am facing very 
> basic problem with cygwin and Tiny OS set up again....
>  
> I found tutorial is not correct as I had done it previosuly and it 
> provides many places wrong information
> for exaple those RPM's to get install one has to always to 
> give --ignoreos option.
>  
> I am getting now the problem in the tos-check-env I tried setting 
> classpath in windows enviornment variables
> it didn't worked then ultimately I have to create the tinyos.sh file in 
> the /etc/profile.d folder which fortunately i
> recollected from my RAM....
>  
> Please let me know if some one knows exact solution for following 
> problem I have tried many things to change
> this CLASSPATH for example putting in Windows enviornment variable etc...
>  
>  
> $ tos-check-env
> Path:
>         /usr/local/bin
>         /usr/bin
>         /bin
>         /usr/X11R6/bin
>         /cygdrive/c/Program Files/Java/jdk1.5.0_16/bin
> Classpath:
> --> WARNING: CLASSPATH environment variable doesn't exist.
> Your classpath should contain  and a pointer
> to the cwd (a dot)
> 
> rpms:
>         /usr/bin/rpm
>         msp430tools-base-0.1-20050607
>         msp430tools-binutils-2.16-20050607
>         msp430tools-libc-20050308cvs-20050608
>         tinyos-2.0.2-2
>         nesc-1.2.8b-1
>         msp430tools-python-tools-1.0-1
>         msp430tools-gcc-3.2.3-20050607
>         tinyos-tools-1.2.4-2
> 
> nesc:
>         /usr/bin/nescc
>         Version: nescc: 1.2.8a
> 
> perl:
>         /usr/bin/perl
>         Version: v5.8.5 built for cygwin-thread-multi-64int
> flex:
>         /usr/bin/flex
> bison:
>         /usr/bin/bison
> java:
>         /cygdrive/c/Program Files/Java/jdk1.5.0_16/bin/java
>         java version "1.5.0_16"
> Cygwin:
> could not execute cygcheck -s at /usr/bin/tos-check-env line 74.
>  
> I want to get the classpath setting ?
>  
> This time I am going to create a very clear document for windows users 
> who are suffering with this if any one help me to resolve this last 
> problem it will be greatly appriciated !!!!
>  
> Regards,
> jain
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-- 
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew



More information about the Tinyos-help mailing list