Skip to content

Setup contiki toolchain in ubuntu 13.04

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

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}\.)?|' /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:// 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

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

Clone this wiki locally