ARCH linux創建contiki開發環境

 

  1. 安裝 Instant Contiki運行環境
pacman -S  base-devel git jdk8-openjdk jre8-openjdk apache-ant

    2.從contiki分支下載源碼文件。 java

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

    或者從官方分支clone源碼文件linux

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

    3.下載而且安裝msp430的編譯工具c++

    下載地址:git

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

    或者:github

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

-------------------     (預留:下載不下來的直接聯繫我)apache

   4.將環境變量添加到系統的profile中。經過source更新系統變量.bash

vi /etc/profile


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

      更新系統變量:app

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。jvm

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

       熟悉的界面就出如今眼前了。                     工具

            

相關文章
相關標籤/搜索