Tinyos2.x Installation Problems

Following this link (http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html) and setting up TinyOS 2.0 on cygwin took more than 3 hours for me, mainly because of these three problems, well finally I am able set it up properly and write programs to Micaz and Mica2.

My life would have been a lot easier had I known these three issues before hand. So here we go as a public service message. Leave comments if you run into problems I will try to answer them.


Error #1 : /bin/sh is needed by msp430tools-base-0.1-20050607
Solution: rpm --ignoreos --nodeps -ivh *.rpm

***My Environment variables***
TOSROOT: /opt/tinyos-2.x
TOSDIR: /opt/tinyos-2.x/tos
CLASSPATH: C:/tinyos2.0/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar
MAKERULES: /opt/tinyos-2.x/support/make/Makerules
PATH: /opt/msp430/bin:$PATH

Error #2
--> WARNING: CLASSPATH may not include '.' (that is, the symbol for the current
working directory). Please add '.' to your CLASSPATH or you may experience configuration problems.
--> WARNING: No java in current path.
--> WARNING: No dot in current path.
--> WARNING: tos-check-env could not find the 'dot' executable which is part of the AT&T Graphviz package. Please install version 1.1.0 of Graphviz if you'd like to use the nescdoc documentation generator. If Graphviz is already installed,then dot may not be in your PATH.

**Path Environment variable
./opt/msp430/bin:$PATH;"C:/Program Files/Graphviz2.16/Bin";C:/Java/jdk1.6.0/bin;
C:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar

--> WARNING: CLASSPATH may not include '.' (that is, the symbol for the current
working directory). Please add '.' to your CLASSPATH or you may experience configuration problems.

to solve this we are changing
CLASSPATH: c:/cygwin/opt/tinyos-2.x/support/sdk/java/tinyos.jar

to CLASSPATH: .$TOSROOT/support/sdk/java/tinyos.jar

------------------------
ERROR: when we compile the first program like, Blink a lot of error messages appear
***********fixing this problem `->' token
/opt/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx:3238: error: ISO C++ forbids
Declaration of `Py_INCREF' with no type

*************
SOLUTION:
1- Go to Cygwin, with TinyOS stuff install, write "Python" to check the version, something like below will appear
$ python
Python 2.3.4 (#1, Jun 13 2004, 11:21:03)
[GCC 3.3.1 (cygming special)] on cygwin Type "help", "copyright", "credits" or "license" for more information.

2- Note down the version of Python mine is 2.3.4

3- Search for a file "sim.extra" in cygwin/tossim directory, use windows search if you like. its usually in
C:/cygwin/opt/tinyos-2.x/support/make

4- Open it in notepad, and find the link PYTHON_VERSION=2.5 and change it to PYTHON_VERSION=2.3 (depending on the version you checked before,if its 2.3.4 change it to 2.3 if its 2.4.5 change it to 2.4 etc.)

5- Save the file, restart cygwin and compile again.

6- Voilà *** Successfully built micaz TOSSIM library.

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值