Difference between revisions of "Installation"

From Contiki
Jump to: navigation, search
(Using Github repository)
Line 5: Line 5:
 
== Introduction ==
 
== Introduction ==
  
This guide covers the installation of ContikiOS 2.7.  You will need either a Linux-based operating system, or an operating system that supports [https://www.virtualbox.org/ VirtualBox] or [https://my.vmware.com/web/vmware/downloads VMWare Player].
+
This guide covers the installation of ContikiOS 3.0.  You will need either a Linux-based operating system, or an operating system that supports [https://www.virtualbox.org/ VirtualBox] or [https://my.vmware.com/web/vmware/downloads VMWare Player].
  
 
== You will learn ==
 
== You will learn ==
Line 29: Line 29:
 
This method requires an existing installation of a Linux-based operating system. The guide assumes you are using Ubuntu 12.04 but should still be useful for similar versions.
 
This method requires an existing installation of a Linux-based operating system. The guide assumes you are using Ubuntu 12.04 but should still be useful for similar versions.
  
Download contiki-2.7.zip from [http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%202.7/contiki-2.7.zip http://downloads.sourceforge.net/project/contiki/Contiki/Contiki 2.7/contiki-2.7.zip]
+
Download contiki-3.0.zip from [http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%202.7/contiki-2.7.zip http://downloads.sourceforge.net/project/contiki/Contiki/Contiki 2.7/contiki-2.7.zip]
  
 
   wget http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%202.7/contiki-2.7.zip
 
   wget http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%202.7/contiki-2.7.zip
Line 35: Line 35:
 
Unzip the file. For the purposes of this guide, it is assumed that the file is unzipped into /home/user/
 
Unzip the file. For the purposes of this guide, it is assumed that the file is unzipped into /home/user/
  
   unzip contiki-2.7.zip
+
   unzip contiki-3.0.zip
  
Rename the folder from contiki-2.7 to contiki.
+
Rename the folder from contiki-3.0 to contiki.
  
   mv contiki-2.7 contiki
+
   mv contiki-3.0 contiki
  
 
Install all the required packages for compiling and running ContikiOS.  
 
Install all the required packages for compiling and running ContikiOS.  
Line 47: Line 47:
 
You can run the following command to install all packages for multiple platforms:
 
You can run the following command to install all packages for multiple platforms:
  
   sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-7-jdk openjdk-7-jre ant libncurses5-dev
+
   sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-8-jdk openjdk-8-jre ant libncurses5-dev
  
 
When working with a 64-bit virtual machine, you may run into problems with the `serialdump-linux` executable because it may have been compiled for 32-bit machines. Install the following package to fix this issue.
 
When working with a 64-bit virtual machine, you may run into problems with the `serialdump-linux` executable because it may have been compiled for 32-bit machines. Install the following package to fix this issue.

Revision as of 10:13, 4 January 2017

Back to Contiki Tutorials

Introduction

This guide covers the installation of ContikiOS 3.0. You will need either a Linux-based operating system, or an operating system that supports VirtualBox or VMWare Player.

You will learn

This tutorial will take you through the steps for downloading and installing ContikiOS the following ways:

  • Download Instant Contiki [1]
  • Download ContikiOS from Sourceforge repository [2]
  • Clone ContikiOS from Github repository [3]

Using Instant Contiki

This is the easiest way of installing and using ContikiOS. You simply need to download Instant Contiki, which is a virtual machine created with all necessary toolchains and software for ContikiOS development.

Link to download Instant Contiki: [4]

After downloading Instant Contiki you need also to download either VMWare Player or VirtualBox, if you are using Windows as your host OS. If you use MacOS X you should download VMWare Fusion, instead of VMWare Player.

IMPORTANT: To login in to Instant Contiki: username: user password: user

Using Sourceforge repository

This method requires an existing installation of a Linux-based operating system. The guide assumes you are using Ubuntu 12.04 but should still be useful for similar versions.

Download contiki-3.0.zip from http://downloads.sourceforge.net/project/contiki/Contiki/Contiki 2.7/contiki-2.7.zip

 wget http://downloads.sourceforge.net/project/contiki/Contiki/Contiki%202.7/contiki-2.7.zip

Unzip the file. For the purposes of this guide, it is assumed that the file is unzipped into /home/user/

 unzip contiki-3.0.zip

Rename the folder from contiki-3.0 to contiki.

 mv contiki-3.0 contiki

Install all the required packages for compiling and running ContikiOS.

If you are using a MSP430-based platform (such as Tmote) you only need the following packages: binutils-msp430, gcc-msp430, msp430-libc, msp430mcu and mspdebug. If you intend to code for multiple platforms, you should also install the following tool chains for other micro-controller: binutils-avr, gcc-avr, gdb-avr, avr-libc and avrdude.

You can run the following command to install all packages for multiple platforms:

 sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-8-jdk openjdk-8-jre ant libncurses5-dev

When working with a 64-bit virtual machine, you may run into problems with the `serialdump-linux` executable because it may have been compiled for 32-bit machines. Install the following package to fix this issue.

 sudo apt-get install lib32ncurses5

You are done! You can now try to compile and run any example, such as Hello World.

Using Github repository

This method also requires an existing installation of a Linux-based operating system. It is very similar to the previous installation method, but instead of downloading the source code you are going to clone it from the official Github repository.

This method eases the update of your ContikiOS to the new releases.

You need to clone the repository using the following command:

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

After that you need to download all development tools as described in the previous installation method.

Back to Contiki Tutorials

Edited by: Kwame, Pedro