2010年3月29日星期一

Install TinyOS 2 on Cygwin (ZZ)

1. Grab the Cygwin installer from http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html.
2. Unzip and install using the local package option. This will install packages necessary for TinyOS 2.
3. Grab the latest Cygwin installer from http://www.cygwin.com
4. Now, install using the Internet option. Remember to also check packages that you need, besides the default ones. For example, Python, GIT, SVN, and so on. This step will also upgrade any packages installed previously.
5. Download all the RPM packages (MSP430, AVR, and nesC. Don’t download tinyos and tinyos-tools) from http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html. At the time of writing, you should download the latest nesC RPM package to solve the cygwin.dll procedure entry point problem (nesc-1.2.8b-1.cygwin.i386.rpm).
6. Install these RPM packages: rpm –ivh –ignoreos –nodeps *.rpm
7. Create and switch to /local/src directory, and use either one of the following ways to download TinyOS:
1. GIT: git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git
2. CVS: cvs -z3 -d:pserver: anonymous@tinyos.cvs.sourceforge.net :/cvsroot/tinyos co tinyos-2.x
8. We need to setup some paths.
1.
Create a file called tinyos.sh with the following content in etc/profile.d:

export PATH=/local/bin:/opt/msp430/bin:$PATH

export TOSROOT=/local/src/tinyos-2.x

export TOSDIR=$TOSROOT/tos

export MAKERULES=$TOSROOT/support/make/Makerules

export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.

export PYTHONPATH=$TOSROOT/support/sdk/python:/local/lib/tinyos:$PYTHONPATH

export PATH=/local/src/tinyos-2.x/support/sdk/c:$PATH

2. chmod a+x tinyos.sh
3. dos2unix tinyos.sh, to make sure that file is in the right format
9. Compile TinyOS 2 tools:
1. cd /local/src/tinyos-2.x/tools
2. ./Bootstrap
1. It might complain that aclocal is not found, just create soft links in usr/autotool/devel/bin to aclocal-1.9 and automake-1.9 in the same directory.
3. ./configure –prefix=/local
4. Make all
5. Make install
1. It might complain about something like below. Just change “install_sh” in tinyos-2.x\tools\platforms\mica\uisp\Makefile to a path not using spaces. For example, I created a soft link in my home directory.

make[5]: Entering directory `/local/src/tinyos-2.x/tools/platforms/mica/uisp'

make[5]: Nothing to be done for `install-exec-am'.

/cygdrive/c/Documents and Settings/a-milian/local/src/tinyos-2.x/tools/platforms/mica/uisp/config/instll-sh -d /local/share/doc/uisp-20050519tinyos

make[5]: /cygdrive/c/Documents: Command not found

10. Download pySerial from http://sourceforge.net/project/showfiles.php?group_id=46487&package_id=39324. Unzip and install: python setup.py install.

没有评论:

发表评论