Skip to content

在Linux架构下设置Contiki工具链

Benoît Thébaudeau edited this page Sep 23, 2019 · 5 revisions

本文描述如何在Linux架构下设置Contiki工具链

  1. 从AUR安装下列包:

    yaourt -S mspgcc-binutils-bin mspgcc-gcc-bin mspgcc-libc-bin mspgcc-mcu-bin
    

    这样你就可以交叉编译MSP430-和AVR-平台.

  2. 从Github克隆Contiki源码:

    git clone --recursive git://github.com/contiki-os/contiki.git contiki
    

    这样你就能继续下去了.

  3. 为了测试你的设置是否正确,你可以以下面的方式编译、运行hello-world例程:

    cd contiki/examples/hello-world
    make TARGET=native hello-world
    ./hello-world.native
    

    最后一个命令将产生下面的输出:

    Contiki-2.6-584-g807293a started
    Rime started with address 2.1
    MAC nullmac RDC nullrdc NETWORK Rime
    Hello, world
    
Clone this wiki locally