ARCH linux建立contiki开发环境

天大地大妈咪最大 提交于 2019-12-02 00:21:40

 

  1. 安装 Instant Contiki运行环境
 pacman -S  base-devel git jdk8-openjdk jre8-openjdk apache-ant 

    2.从contiki分支下载源码文件。 

https://github.com/JSLeo/contiki.git

    或者从官方分支clone源码文件

https://github.com/contiki-os/contiki.git

    3.下载并且安装msp430的编译工具

    下载地址:

http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2

    或者:

aur/mspgcc-gcc-bin 20120406-1 (0) (0.00)

-------------------     (预留:下载不下来的直接联系我)

   4.将环境变量添加到系统的profile中。通过source更新系统变量.

vi /etc/profile


# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/msp430/bin"
export PATH

      更新系统变量:

source  /etc/profile
 
[leonard@Archlinux opt]$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/msp430/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
[leonard@Archlinux opt]$ msp430-gcc -v
Using built-in specs.
Reading specs from /opt/msp430/bin/../lib/gcc/msp430/4.7.0/../../../../msp430/lib/msp430mcu.spec
COLLECT_GCC=msp430-gcc
COLLECT_LTO_WRAPPER=/opt/msp430/bin/../libexec/gcc/msp430/4.7.0/lto-wrapper
Target: msp430
Configured with: ../gcc-4.7.0/configure --prefix=/home/user/local/msp430 --target=msp430 --enable-languages=c,c++ --program-prefix=msp430-
Thread model: single
gcc version 4.7.0 20120322 (mspgcc dev 20120716) (GCC) 

        5.进入下载contiki/tools/cooja的目录,运行ant run。

[leonard@Archlinux tools]$ cd cooja/
[leonard@Archlinux cooja]$ ls
apps  build  build.xml  config  dist  examples  java  lib
[leonard@Archlinux cooja]$ ant run

       熟悉的界面就出现在眼前了。                     

            

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!