tinyos 2.1.2 ubuntu下运行make micaz sim出现问题
在Ubuntu虚拟机中安装了Tinyos2.1.2,需要进行基于Python的仿真,利用TOSSIM工具,具体的步骤如下:
https://blog.csdn.net/HoraceYan/article/details/130295664
但是在我进行到2.2的时候,切换到 RadioCountToLeds程序所在目录并执行指令:make micaz sim
报错如下:
root@user-virtual-machine:/opt/tinyos-2.1.2/apps/RadioCountToLeds# make micaz sim
mkdir -p simbuild/micaz
mig python -target=micaz -DIDENT_APPNAME=\"RadioCountToLed\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"user-virtual-ma\" -DIDENT_USERHASH=0x0859c1faL -DIDENT_TIMESTAMP=0x64606722L -DIDENT_UIDHASH=0x02a153fbL -python-classname=RadioCountMsg RadioCountToLeds.h radio_count_msg -o RadioCountMsg.py
In file included from /opt/tinyos-2.1.2/tos/chips/atm128/atm128hardware.h:50,
from /opt/tinyos-2.1.2/tos/platforms/micaz/hardware.h:56,
from /opt/tinyos-2.1.2/tos/system/SchedulerBasicP.nc:52:
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/io.h:623:6: warning: #warning "device type not defined"
In file included from /opt/tinyos-2.1.2/tos/chips/atm128/atm128hardware.h:57,
from /opt/tinyos-2.1.2/tos/platforms/micaz/hardware.h:56,
from /opt/tinyos-2.1.2/tos/system/SchedulerBasicP.nc:52,
from /opt/tinyos-2.1.2/tos/system/TinySchedulerC.nc:51:
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h: In function `wdt_enable':
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:454: `WDT' undeclared (first use in this function)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:454: (Each undeclared identifier is reported only once
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:454: for each function it appears in.)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:465: `WDCE' undeclared (first use in this function)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:465: `WDE' undeclared (first use in this function)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h: In function `wdt_disable':
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:494: `WDT' undeclared (first use in this function)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:508: `WDCE' undeclared (first use in this function)
/usr/lib/gcc/avr/5.4.0/../../../avr/include/avr/wdt.h:508: `WDE' undeclared (first use in this function)
In file included from /opt/tinyos-2.1.2/tos/system/TinySchedulerC.nc:52:
In component `McuSleepC':
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc: At top level:
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:68: `SM0' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:69: `SM2' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:69: `SM1' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:69: `SM0' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:70: `SM1' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:70: `SM0' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:71: `SM2' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:71: `SM1' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:72: `SM1' undeclared here (not in a function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc: In function `getPowerState':
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:80: `TIMSK' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:80: `OCIE0' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:80: `TOIE0' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:80: `TOIE1' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:80: `TOIE2' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:81: `ETIMSK' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:81: `TOIE3' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:85: `SPCR' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:85: `SPE' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:89: `UCSR0B' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:89: `UCSR1B' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:89: `TXEN' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:89: `RXEN' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:93: `TWCR' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:93: `TWEN' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:97: `ADCSR' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:97: `ADEN' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc: In function `McuSleep.sleep':
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:109: `MCUCR' undeclared (first use in this function)
/opt/tinyos-2.1.2/tos/chips/atm128/McuSleepC.nc:110: `SE' undeclared (first use in this function)
failed to parse message file RadioCountToLeds.h
make: *** [Makefile:7:RadioCountMsg.py] 错误 1
我已经尝试了很多种办法,例如切换gcc版本等,还是无法解决。
但我觉得这不是特定的头文件或代码出现的问题。
这应该如何解决?