Previously, I also told my friends that TinyOS under Ubuntu is very stable and will be okay no matter how it is done. Because a colleague previously used Fedora and the system could not be updated once TinyOS. Now it seems that I am wrong. Today, my TinyOS cannot start. In the past, the system was also updated frequently, but never encountered any problems. I haven't played with it for a while, so I don't know which system upgrade has broken it down, not even the simplest Blink compilation. It cannot be solved after being reinstalled N times. Symptoms: Enter the compile command "ma" in the terminal.
Previously, I also told my friends that TinyOS under Ubuntu is very stable and will be okay no matter how it is done. Because a colleague previously used Fedora and the system could not be updated once TinyOS. Now it seems that I am wrong. Today, my TinyOS cannot start. In the past, the system was also updated frequently, but never encountered any problems. I haven't played with it for a while, so I don't know which system upgrade has broken it down, not even the simplest Blink compilation. It cannot be solved after being reinstalled N times.
The symptoms are as follows: Enter the compile command "make telosb" in the terminal and return a long string of syntax errors directly to me. How can the built-in routines still have syntax errors ?! The first two lines of the error message are:
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 =-clipboard = 0x22-DIDENT_APPNAME = \ "BlinkAppC \"-DIDENT_USERNAME = \ "shouyanbo \"-DIDENT_HOSTNAME = \ "yanbo-thinkpad \"-DIDENT_USERHASH = Taobao -DIDENT_TIMESTAMP = 0x4d5e9b04L-DIDENT_UIDHASH = 0xd22d1fe1L BlinkAppC. nc-lm
/Usr/lib/ncc/deputy_nodeputy.h: 4: 20: error: stddef. h: No such file or directory
/Usr/lib/ncc/nesc_nx.h: 14: 26: error: sys/inttypes. h: No such file or directory. Then there is a long string of syntax error messages:
/Usr/lib/ncc/nesc_nx.h: 235: syntax error before '_ nesc_ntoh_uint8'
/Usr/lib/ncc/nesc_nx.h: 240: syntax error before '_ nesc_hton_uint8'
/Usr/lib/ncc/nesc_nx.h: 242: warning: type defaults to 'int' in declaration of 'base'
/Usr/lib/ncc/nesc_nx.h: 242: 'value' undeclared here (not in a function)
/Usr/lib/ncc/nesc_nx.h: 242: warning: data definition has no type or storage class
/Usr/lib/ncc/nesc_nx.h: 243: syntax error before 'Return'
/Usr/lib/ncc/nesc_nx.h: 246: syntax error before '_ nesc_ntoh_leuint8'
/Usr/lib/ncc/nesc_nx.h: 251: syntax error before '_ nesc_hton_leuint8'
/Usr/lib/ncc/nesc_nx.h: 253: warning: type defaults to 'int' in declaration of 'base'
/Usr/lib/ncc/nesc_nx.h: 253: redefinition of 'base'
/Usr/lib/ncc/nesc_nx.h: 242: previous declaration of 'base'
/Usr/lib/ncc/nesc_nx.h: 253: 'value' undeclared here (not in a function)
/Usr/lib/ncc/nesc_nx.h: 253: warning: data definition has no type or storage class
/Usr/lib/ncc/nesc_nx.h: 254: syntax error before 'Return'
/Usr/lib/ncc/nesc_nx.h: 257: syntax error before '_ nesc_ntoh_int8'
/Usr/lib/ncc/nesc_nx.h: 257: syntax error before '_ nesc_hton_int8'
/Usr/lib/ncc/nesc_nx.h: 257: syntax error before '_ nesc_ntoh_leint8'
/Usr/lib/ncc/nesc_nx.h: 257: syntax error before '_ nesc_hton_leint8'
/Usr/lib/ncc/nesc_nx.h: 258: syntax error before '_ nesc_bf_decode8'
Etc. And the problem seems to be for Telob. There is no problem in compiling micaz, and "make micaz" runs well.
After a while, Google finally found a solution. Open the file/opt/tinyos-2.1.1/support/make/msp. rules in
OBJCOPY = msp430-objcopy
OBJDUMP = msp430-objdump
Join before two rows
CFLAGS + =-I/usr/msp430/include
CFLAGS + =-I/usr/lib/gcc-lib/msp430/3.2.3/include
Save and exit. The problem is solved.
According to the author of the original post, this is a "eccentric". I don't know if there is a more "beautiful" solution to this problem. To put it bluntly, it means to get together and use it. Think about it too. We use TinyOS. Leave this problem to TinyOS developers.
Now that automatic updates of Ubuntu have been disabled, you will be able to manually upgrade the required software. If you do not need to upgrade it, system stability is the most important thing.