TinyOS安裝以及eclipse for tinyos插件


TinyOS安裝

以下安裝基於ubuntu12.04,在普通用戶下操作:

1、首先添加源:sudo gedit /ect/apt/sources.list

   打開後,在最後一行輸入deb http://tinyos.stanford.edu/tinyos/dists/ubuntulucid main

2、更新 sudo apt-get update

3、sudo apt-get install tinyos-2.1.2  (這裏最好選擇這個,不然會出現msp430的問題,2.1.2版本貌似修復了這一問題)


4、sudo gedit ~/.bashrc

最後一行增加:source /opt/tinyos-2.1.2/tinyos.sh

然後更新下source ~./bashrc

注意:這時候有的安裝情況會出現提示bash: /opt/tinyos-2.1.2/tinyos.sh: 沒有那個文件或目錄

這時候我們可以編寫一個tinyos.sh: 執行 sudo gedit /opt/tinyos-2.1.2/tinyos.sh ,並輸入:

#! /usr/bin/env bash
# Here we setup the environment
# variables needed by the tinyos
# make system
echo "hello ,walfred,Setting up forTinyOS 2.1.2"
export TOSROOT=
export TOSDIR=
export MAKERULES=
TOSROOT="/opt/tinyos-2.1.2"
TOSDIR="$TOSROOT/tos"
CLASSPATH=$CLASSPATH:/opt/tinyos-2.1.2/support/sdk/java/tinyos.jar:.
MAKERULES="$TOSROOT/support/make/Makerules"
export TOSROOT
export TOSDIR
export CLASSPATH
export MAKERULES

關閉並保存文件

執行更新:source ~./bashrc

5、安裝 sudo tos-install-jni 一般情況下這個已經裝好了:


6、安裝g++    sudoapt-get install g++

7、安裝 python   sudo apt-get installpython2.7-dev  (這裏有好幾個版本,我選擇2.7的)

到這裏tinyos的安裝就OK了

8、可以進入Blink程序編譯測試下

make telosb


eclipse for tinyos

下面開始安裝eclipse  和  eclipse for  tinyos

參考文檔:http://en.wikipedia.org/wiki/TinyOS


安裝要求:

  • Eclipse 3.5 or newer. The plug-in still works on Eclipse 3.4.2, but support may stop with any new update.
  • The Graphical Editing Framework, this will be installed automatically when using Eclipse 3.4
  • Java 1.6. The plug-in still works with Java 1.5, but support may stop with any new update.
  • A Linux system, e.g. Ubuntu or a Windows XP system. MacOS, Solaris, and Windows Vista are not tested. The plug-in is optimized for Linux.
  • A complete installation of TinyOS 2.x. On windows that means that cygwin has to be installed.
  • TinyOS applications must compile from the command line
  • The plugin has a size of ~3 MB

安裝步驟:

1、sudo apt-get install eclipse  安裝eclipse

2、打開ecllipse help->install new software->add

Enter the update site http://tos-ide.ethz.ch/update/site.xml into the dialog.



安裝完畢,設置環境變量

Window->Preferences->TinyOS->Environments

檢查各個目錄,點擊 Apply , OK ,設置完畢。

8 )檢查 TinyOS 的安裝

TinyOS->Check Installation

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章