-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Setup contiki toolchain in ubuntu 13.04
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 update
;2. 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 binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi openjdk-7-jdk openjdk-7-jre ant libncurses5-dev doxygen srecord git
This 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 contiki
And 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.native
The 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
If you see a compilation error while trying to compile some of the examples that looks like:
/usr/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h:9:26 fatal error: stdint.h: No such file or directory
#include_next <stdint.h>
For latest versions of Debian based distros the package libnewlib-arm-none-eabi
is also necessary.
sudo apt-get install libnewlib-arm-none-eabi