Difference between revisions of "Working environment setup for Contiki OS"

From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
 
Line 78: Line 78:
 
Easiest part:
 
Easiest part:
  
<code>sudo apt-get install qtcreator</code>
+
<pre>sudo apt-get install qtcreator</pre>
  
 
=== Creating a new project ===
 
=== Creating a new project ===

Latest revision as of 16:52, 16 March 2017

Preparing your working Environment

Cross compilation for Contiki-OS is easier using Ubuntu OS.

You have two possible ways:


GCC for TelosB

sudo apt-get install gcc-msp430

Tools to program the TelosB

We will use the tos-bsl to upload the ihex file from the computer to the TelosB

sudo apt-get install tinyos-utils

Putty

Putty Installation

Putty will be used to communicate with the TelosB using its Serial communication.

wget https://the.earth.li/~sgtatham/putty/latest/putty-0.68.tar.gz

tar xzf putty-0.68.tar.gz

cd putty-0.68

./configure

make -j4 all

sudo make install

Putty Configuration

Default printf function used in Contiki-OS for TelosB outputs the data on the usb port with a Serial baud rate of 115200.

  1. Connection type: Serial
  2. Find the /dev/ttyUSB* of your board and enter it in the Serial line

ls /dev/ttyUSB*

  1. Default baud rate (if unchanged for default printf function): 115200
  2. Into Terminal Category: Check "Implicit CR in every LF"


Don't forget to run Putty as a root user! Or give general permissions to access your tty to all users.

Download Contiki-OS sources

To get the latest sources download them from github:

git clone https://github.com/contiki-os/contiki.git

If you downloaded Instant Contiki don't forget to pull the latest release:

cd ~

cd contiki

git pull origin master

QtCreator

I prefer QtCreator over other IDE because it is lighter and faster than Eclipse and easier to configure.

The choice is yours as you will be working with it.

Here how to configure it to work with Contiki-OS projects:

Install QtCreator

Easiest part:

sudo apt-get install qtcreator

Creating a new project

You need to create a new empty qt project.

I did mine in a folder named workspace in my home directory.

  • Kit: choose Desktop (this part doesn't matters but is mandatory)
  • Choose either Debug or Release (doesn't matter either as you will be using your own Makefile)

Now you have your empty project. Next step Contiki first project.