TinyOS学习 - Ubuntu 12.04LTS安装TinyOS 2.1.1后make telosb报错之解决方案
来源:程序员人生 发布时间:2015-02-27 08:06:35 阅读次数:2315次
我在Ubuntu 12.04LTS的64位版本安装过1次TinyOS,但是最后编译是成功的,但是所有的java工具都不能用。这次我重装了个32位的Ubuntu系统。这个是肯定可以安装的。
但是在我依照教程全部安装完以后发现出现了毛病。
在make telosb的时候
> mkdir -p build/telosb > compiling BlinkAppC to a telosb binary > ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -fnesc-separator=__ > -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c > -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME="BlinkAppC" > -DIDENT_USERNAME="cj" -DIDENT_HOSTNAME="reddawn" > -DIDENT_USERHASH=0x44c45aa7L -DIDENT_TIMESTAMP=0x4ca60354L > -DIDENT_UIDHASH=0x630b51c3L BlinkAppC.nc -lm > In file included from > /opt/tinyos⑵.1.1/tos/platforms/telosb/PlatformLedsC.nc:12, > from /opt/tinyos⑵.1.1/tos/system/LedsC.nc:38, > from BlinkAppC.nc:45: > In component `HplMsp430GeneralIOC': > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:227: > syntax error before `;' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:321: > cannot find `P30' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:322: > cannot find `P31' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:323: > cannot find `P31' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:324: > cannot find `P32' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:325: > cannot find `P33' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:326: > cannot find `P33' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:327: > cannot find `P34' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:328: > cannot find `P35' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:330: > cannot find `P50' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:331: > cannot find `P51' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:332: > cannot find `P52' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:333: > cannot find `P53' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:334: > cannot find `P36' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:335: > cannot find `P37' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:337: > cannot find `P60' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:338: > cannot find `P61' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:339: > cannot find `P62' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:340: > cannot find `P63' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:341: > cannot find `P64' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:342: > cannot find `P65' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:343: > cannot find `P66' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:344: > cannot find `P67' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:346: > cannot find `P66' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:347: > cannot find `P67' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:349: > cannot find `P67' > /opt/tinyos⑵.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:350: > cannot find `P57' > In component `PlatformLedsC': > /opt/tinyos⑵.1.1/tos/platforms/telosb/PlatformLedsC.nc:22: cannot find > `Port54' > /opt/tinyos⑵.1.1/tos/platforms/telosb/PlatformLedsC.nc:25: cannot find > `Port55' > /opt/tinyos⑵.1.1/tos/platforms/telosb/PlatformLedsC.nc:28: cannot find > `Port56' > make: *** [exe0] Error 1
这些毛病我之前遇到过,解决的方法就是由于msp430这个毛病。由于Ubuntu 12.04安装tinyos的时候版本比较高,所以编译报错。
解决方法:
1. 首先: dpkg -l | grep "msp430"
应当看到6个软件包包括:
msp430-binutils-tinyos
msp430-gcc-tinyos
msp430-libc-tinyos
msp430-tinyos
msp430mcu-tinyos
tinyos-required-msp430
2. 先卸载掉,以下命令:
sudo apt-get autoremove --purge msp430-tinyos
sudo apt-get autoremove --purge msp430-gcc-tinyos
只用这两个就能够了。
3. 下载旧版本的msp430
网址:
http://tinyos.stanford.edu/tinyos/dists/old/ubuntu.old/pool/main/m/
这个网址下有6个软件包,都下载下来~ 要下载对应的32位版本。
4. 安装
sudo dpkg -i msp430-gcc-tinyos_3.2.3⑵0080806_i386.deb
sudo dpkg -i msp430-tinyos-base_2.1⑵0080806_all.deb
sudo dpkg -i msp430-binutils-tinyos_2.17⑵0080806_i386.deb
sudo dpkg -i msp430-gcc-tinyos_3.2.3⑵0080806_i386.deb
sudo dpkg -i msp430-libc-tinyos_20060801cvs⑵0080806_i386.deb
sudo dpkg -i msp430-tinyos_2.1⑵0080806_all.deb
sudo dpkg -i msp430-optional-tinyos_2.1⑵0090326_all.deb
这样再make telosb就不会报这个毛病了。
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠