Based on the ubuntu11.04 environment. There is java installed. You can check the version with 'java -version', it should be java version "1.6.0_22".
I use the 'deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main' for the repository. Add it to the /etc/apt/sources.list.
sudo apt-get update
sudo apt-get install tinyos-2.1.1
It will automatically install all the related toolchains and compiles, including MSP430 toolchain, AVR toolchain, nesc compliers etc.
I use 'dpkg -l |grep tinyos*' and similar commands to see the installed packages. Also, I use 'nescc -v' to check the nesc version.
Use tos-check-env to check the env. There will be two warnings about java version and graphviz, I skipped them.
Then test is coming! Run 'make telosb' in /opt/tinyos-2.1.1/apps/Blink, you will see a lot of errors about msp430 related nc file, said can not find port....
The problem is discussed in here. The keypoint of this problem is msp430 packages.
There are 6 msp430 packages after your original installation: (dpkg -l |grep msp430*)
msp430-binutils-tinyos
msp430-gcc-tinyos
msp430-libc-tinyos
msp430-tinyos
msp430mcu-tinyos
tinyos-required-msp430
What I did is remove all these packages and install the old version, here are the instructions:
1 remove msp430 packages
sudo apt-get autoremove --purge msp430-tinyos
sudo apt-get autoremove --purge msp430-gcc-tinyos
2 download the old version from here
3 install the old msp430 packages, because of the dependency, the steps is important, of course, you can try one by one...
sudo dpkg -i msp430-gcc-tinyos_3.2.3-20080806_i386.deb
sudo dpkg -i msp430-tinyos-base_2.1-20080806_all.deb
sudo dpkg -i msp430-binutils-tinyos_2.17-20080806_i386.deb
sudo dpkg -i msp430-gcc-tinyos_3.2.3-20080806_i386.deb
sudo dpkg -i msp430-libc-tinyos_20060801cvs-20080806_i386.deb
sudo dpkg -i msp430-tinyos_2.1-20080806_all.deb
sudo dpkg -i msp430-optional-tinyos_2.1-20090326_all.deb
Then try Blink again, you will see the blue LED is flashing. Congrats!
2 条评论:
thank you very much...I have resolved the problem by your solutions...Are you chinese?
there is a little mistake in your article:
the first line below should be erased.
sudo dpkg -i msp430-gcc-tinyos_3.2.3-20080806_i386.deb
sudo dpkg -i msp430-tinyos-base_2.1-20080806_all.deb
sudo dpkg -i msp430-binutils-tinyos_2.17-20080806_i386.deb
sudo dpkg -i msp430-gcc-tinyos_3.2.3-20080806_i386.deb
sudo dpkg -i msp430-libc-tinyos_20060801cvs-20080806_i386.deb
sudo dpkg -i msp430-tinyos_2.1-20080806_all.deb
sudo dpkg -i msp430-optional-tinyos_2.1-20090326_all.deb
thank you :)
发表评论