Cvs-z9-d: pserver: anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x
. After confirming the installation directory of the TOS, you can add a function in. bashrc. If you want to work in the future, you just need to knock the tos:
. Now ncc is moved from nesc to TinyOS, And now ncc Compilation:
Cd $ TOSROOT/tools/src/ncc
./Bootstrap;./configure -- prefix =/opt/tos; make install
Let's see if everything is different:
./Tools/scripts/toscheck may think that some versions are incorrect, which may cause some problems. In the Assembly program generated by nesc, there will be a lot of variable names with the $ symbol in the middle, gcc-avr will see this will be uncomfortable. When you make mica2, errors will be reported frantically, similar to the following:
Some TinyOS Java programs use JNI libgetenv. So we need ...... Compile:
Cd $ TOSROOT/tools/java/jni make
Before making, you also need to modify a script $ TOSROOT/tools/scripts/locate-jre. Comment out all programs from lines 37 to 47, and then add:
J = \ "$ JAVA_HOME \"/bin/javac
Of course, the premise is that you have set the $ JAVA_HOME environment variable. In the modified row 70th, modify it:
-Dir = \ "$ jhome/jre/bin
+ Dir = \ "$ jhome/jre/lib/i386
These problems are caused by the absence of ibm jdk and the absence of rpm db installed in Debian.
5. Now set the ports used by the Programming Board, as well as the frequency band and power used by mica2.
Write a file $ TOSROOT/apps/Makelocal,
DEFAULT_PROGRAM = mib510 # Programming Board Model
MIB510 =/dev/ttyUSB0 # USB to serial is like this in GNU/Linux
DEFAULT_LOCAL_GROUP = 0x88 # group id
FLAGS =-DCC1K_DEFAULT_FREQ = CC1K_433_002_MHZ # frequency band used for wireless communication
CFLAGS + =-DRADIO_XMIT_POWER = 0xFF # use the maximum power
6. Check whether the hardware is normal.
Cd $ TOSROOT/apps/MicaHWVerify make mica2 if everything is normal, it means TinyOS is almost ready. The reason we say "almost" is that TinyOS also comes with a lot of tools, and we haven't compiled these tools yet. Next, burn the compiled program to the Board:
Make reinstall mica2 next, follow Tutorial to check communication and other functions. Now TinyOS has been installed on the Debian GNU/Linux platform. In addition, if you want to use deluge, you need to change the Makefile of deluge:
6. The last point is caused by the USB to serial adapter.
. Let Java programs know/dev/ttyUSB0
To modify the $ JAVA_HOME/jre/lib/javax. comm. properties file, add a line:
Serpath2 =/dev/ttyUSB06.2. do not exit when Java programs set the baud rate
This is just a workaround, that is, all the grep java files under the $ TOSROOT/tools/java directory, find the place of setSerialPortParams, and change it to this:
This is to make it run twice. The first time there will be an error:
Exception in thread \ "AWT-EventQueue-0 \" java. io. IOException: Not all params are supported by kernel
At com. sun. comm. LinuxSerial. nativeSetSerialPortParams (Native Method)
At com. sun. comm. LinuxSerial. setSerialPortParams (LinuxSerial. java: 346)
At SerialConnection. setConnectionParameters (Unknown Source)
At SerialConnection. openConnection (Unknown Source)
At SerialDemo. actionreceivmed (Unknown Source)
At java. awt. Button. processActionEvent (Button. java: 388)
At java. awt. Button. processEvent (Button. java: 356)
At java. awt. Component. dispatchEventImpl (Component. java: 3955)
At java. awt. Component. dispatchEvent (Component. java: 3803)
At java. awt. EventQueue. dispatchEvent (EventQueue. java: 463)
At java. awt. EventDispatchThread. pumpOneEventForHierarchy (EventDispatchThread. java: 242)
At java. awt. EventDispatchThread. pumpEventsForHierarchy (EventDispatchThread. java: 163)
At java. awt. EventDispatchThread. pumpEvents (EventDispatchThread. java: 157)
At java. awt. EventDispatchThread. pumpEvents (EventDispatchThread. java: 149)
At java. awt. EventDispatchThread. run (EventDispatchThread. java: 110)
But this must not be a kernel issue, because C Programs can set the baud rate for the serial port. Some people have encountered the same problem here. Here I use the second method.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.