我在Ubuntu 12.04LTS的64位版本安装过一次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-2.1.1/tos/platforms/telosb/PlatformLedsC.nc:12, > from /opt/tinyos-2.1.1/tos/system/LedsC.nc:38, > from BlinkAppC.nc:45: > In component `HplMsp430GeneralIOC': > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:227: > syntax error before `;' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:321: > cannot find `P30' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:322: > cannot find `P31' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:323: > cannot find `P31' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:324: > cannot find `P32' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:325: > cannot find `P33' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:326: > cannot find `P33' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:327: > cannot find `P34' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:328: > cannot find `P35' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:330: > cannot find `P50' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:331: > cannot find `P51' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:332: > cannot find `P52' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:333: > cannot find `P53' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:334: > cannot find `P36' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:335: > cannot find `P37' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:337: > cannot find `P60' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:338: > cannot find `P61' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:339: > cannot find `P62' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:340: > cannot find `P63' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:341: > cannot find `P64' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:342: > cannot find `P65' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:343: > cannot find `P66' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:344: > cannot find `P67' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:346: > cannot find `P66' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:347: > cannot find `P67' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:349: > cannot find `P67' > /opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:350: > cannot find `P57' > In component `PlatformLedsC': > /opt/tinyos-2.1.1/tos/platforms/telosb/PlatformLedsC.nc:22: cannot find > `Port54' > /opt/tinyos-2.1.1/tos/platforms/telosb/PlatformLedsC.nc:25: cannot find > `Port55' > /opt/tinyos-2.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-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
这样再make telosb就不会报这个错误了。
时间: 2024-12-25 22:15:44