Setup contiki toolchain in ubuntu 13.04

来源:互联网 发布:考研网络辅导班 编辑:程序博客网 时间:2024/04/30 20:00
This shows how to setup the Contiki toolchain in a freshly installed Ubuntu 13.04.1. Run this command in terminal so that the URLs point to the right repositories (older repos are moved to archive server):    sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list    sudo apt-get update2. Install the following packages:    sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-7-jdk openjdk-7-jre ant libncurses5-dev doxygen gitThis will allow you to cross-compile for MSP430- and AVR-platforms.3. Clone the Contiki sources from Github:     git clone --recursive git://github.com/contiki-os/contiki.git contikiAnd you should be good to go.4. You can test your setup by compiling and running the hello-world-example as follows:    cd contiki/examples/hello-world    make TARGET=native hello-world    ./hello-world.nativeThe last command should result in an output like this:    Contiki-2.6-584-g807293a started    Rime started with address 2.1    MAC nullmac RDC nullrdc NETWORK Rime    Hello, world
0 0