Skip to content

Cooja instalation linux

Kevin Velasco edited this page May 5, 2022 · 1 revision

Cooja installation Linux

due to the difficulty of running the tests in cooja, we decided to make our own tutorial on how to install cooja and how to do the first tests with an example code in Contiki.

  1. install necessary libraries

sudo apt update

sudo apt install build-essential doxygen git curl wireshark python-serial srecord rlwrap

  1. Install ARM compiler
$ wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
$ tar -xjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
  1. Install MSP430 compiler

generally, this part has some problems, if you have a Linux version of 64 bytes is really important that you use MSP430 gcc 4.7.2 version

 wget -nv http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 && \
  tar xjf mspgcc*.tar.bz2 -C /tmp/ && \
  cp -f -r /tmp/msp430/* /usr/local/ && \
  rm -rf /tmp/msp430 mspgcc*.tar.bz2

After you executed the last command and install the MSP430 gcc. You must install zlib1g

sudo apt-get install zlib1g:i386

  1. Install Java for the Cooja network simulator

sudo apt install default-jdk ant

update-alternatives --config java

Set JAVA_HOME as environment variables.

export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/

After configuration

Reboot the system after all configurations have been made.

Clone Contiki-NG

$ git clone https://github.com/contiki-ng/contiki-ng.git
$ cd contiki-ng
$ git submodule update --init --recursive

After cloning Contiki and downloading the submodules you should go to:

cd tools/cooja

to start cooja you must run

ant

Clone this wiki locally