Ubuntu installation TinyOS-2.1.1 complete process and Error Handling Methods

Source: Internet
Author: User
This tutorial is to install and configure the TinyOS development environment under Ubuntu11.10. Install jdk1. compile a source file sudogedit/etc/apt/sources. list. d/partner. list2. add debhttp: // us.archive.ubuntu.com/ubuntu/hardymultiverse3.to the file and return it to sudoapt-ge.

In this tutorial, install and configure the TinyOS development environment in Ubuntu 11.10.

1. Install jdk

1. Compile a source file

sudo gedit /etc/apt/sources.list.d/partner.list

2. Add:

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse

3. Save the file and exit. Execute

Sudo apt-get update

4. Final execution

Sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk

5. Configure JDK Environment Variables

Set the environment variables, modify. bashrc or. profile, and refer to the path to be decompressed by your system.

Export JAVA_HOME =/use/lib/jvm/java-6-sunexport PATH = $ JAVA_HOME/bin: $ PATHexport classPath =/use/lib/jvm/java-6-sun enter java in the terminal, javac check whether the configuration is correctIi. Install tinyosPython-dev g ++ needs to be installed,
sudo apt-get install python-dev g++

Remember to check the python version, which needs to be set later in TinyOS

python --version

Next we will talk about how to install TinyOS

First, add a TinyOS Source

 deb http://tinyos.stanford.edu/tinyos/dists/ubuntu natty main

Then update and install

sudo apt-get install tinyos-2.1.1

If you have not installed java before, java openjdk 1.6 is automatically installed here. After the installation is complete, tinyos will be placed under/opt /.

Open/opt/tinyos-2.1.1/support/make/sim. extra, find PYTHON_VERSION = 2.x, and change 2.x to the current python version. For example, if you use python -- version to view the result as "Python 2.7.3", you need to change it to 2.7.

Edit Environment Variables/opt/tinyos-2.1.1/tinyos.shFile, modify the CLASSPATH environment variable

export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:.

Note that there is a last point. Then, modify. bashrc and add

source /opt/tinyos-2.1.1/tinyos.sh

You can.

 

Install JNI

tos-install-jni

 

Use

tos-check-env

Check the environment, and the java and graphviz warning versions can be ignored directly. If you have any other errors, check whether the environment is not configured or what components are missing.


Now go to the directory/opt/tinyos-2.1.1/apps/Blink, make micaz and make micaz sim will be successful.
However, if the TOSSIM syntax is incorrect when using python, make a change.

Open the isim. extra (/support/make) file and find the PYDIR variable.
Original
# PYDIR = $ (shell python $ (PYTHON_VERSION)-config-prefix)/usr/include/python $ (PYTHON_VERSION)
Change
PYDIR =/usr/include/python $ (PYTHON_VERSION)
You can.
Modify PLATFORM_LIB_FLAGS =-shared-L/usr/lib/python $ (PYTHON_VERSION)/config-L/$ (PYDIR)/config-Lstdc ++-lpython $ (PYTHON_VERSION)

SetRed part-L/$ (PYDIR)/configChange-L/binYou can.

So far, the entire installation process is complete.
3. nesC highlighted in vim
Download plug-ins of Version 2.0
Http://www.vim.org/scripts/script.php? Script_id = 1, 1847
Create a new folder named mkdir ~ in the/home directory ~ /. Vim copy the decompressed plug-in to this folder
Create a new file in the/home Directory (if it already exists, you do not need to create a new file). Add the following code in the file:

Augroup filetypedetect
Au! BufRead, BufNewFile * nc setfiletype nc
Augroup END


So far, the nesC code can be highlighted in vim.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.