Ubuntu搭建tinyos-2.1.2开发环境

Ubuntu搭建tinyos-2.1.2开发环境

删除旧版本tinyos

如果安装过tinyos,用下面的命令删除tinyos旧版本

$ sudo dpkg -P`dpkg -l nesc '*tinyos*' | grep ^ii | awk '{ print $2 }' | xargs`

$ sudo apt-get clean                 

安装tinyos

l  添加apt签名密钥

$ wget -O -http://tinyprod.net/repos/debian/tinyprod.key | sudo apt-key add –

$ gpg--keyserver keyserver.ubuntu.com --recv-keys A9B913B9

$ gpg -a--export A9B913B9 | sudo apt-key add -

l  添加源

  $ sudo -s

  $ cd /etc/apt/sources.list.d

  $ echo "debhttp://tinyprod.net/repos/debian squeeze main" >>tinyprod-debian.list

  $ echo "debhttp://tinyprod.net/repos/debian msp430-46 main" >>tinyprod-debian.list

 

l  安装

  $ sudo apt-get update

  $ sudo apt-get install nesc tinyos-toolsmsp430-46 avr-tinyos

 

l  如果你想卸载,可以使用以下命令

  $ sudo apt-get autoremove --purge nesctinyos-tools msp430-46 avr-tinyos

 

l  下载tinyos源码

wgethttp://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz

sudo tar xf tinyos-2_1_2.tar.gz –C /opt/

 

 

l  新建文件/opt/tinyos-release-tinyos-2_1_2/tinyos.env, 输入以下内容

export TOSROOT="/opt/tinyos-release-tinyos-2_1_2"

export TOSDIR="$TOSROOT/tos"

exportCLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java

exportMAKERULES="$TOSROOT/support/make/Makerules"

exportPYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python

 

echo "setting up TinyOS on source path$TOSROOT"

 

编译Blink

 

复制/opt/tinyos-release-tinyos-2_1_2/apps/Blink文件夹到你的工作目录并打开终端

source /opt/tinyos-release-tinyos-2_1_2/tinyos.env

make telosb

make telosb install

#make ucmote

#make ucmoteinstall

 

你可能感兴趣的:(Ubuntu搭建tinyos-2.1.2开发环境)