Setup contiki toolchain in ubuntu 13.04

jcbastosportela edited this page Mar 14, 2018 · 6 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}\.)?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

NOTE:

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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.