Difference between revisions of "Installation"

From Contiki
Jump to: navigation, search
(You will learn)
 
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This guide covers installation of Contiki 2.7.
+
[[Contiki_tutorials | Back to Contiki Tutorials]]
  
There are basically three way of installing Contiki:
+
__TOC__
* Download Instant Contiki [http://sourceforge.net/projects/contiki/files/Instant%20Contiki/]
+
* Download ContikiOS from Sourceforge repository [http://sourceforge.net/projects/contiki/files/latest/download]
+
* Clone ContikiOS from Github repository [https://github.com/contiki-os/contiki]
+
  
== Installing Contiki using Instant Contiki ==
+
== Introduction ==
  
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 Contiki development.
+
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 ==
 +
 
 +
This tutorial will take you through the steps for downloading and installing ContikiOS the following ways:
 +
 
 +
* Using Instant Contiki [http://sourceforge.net/projects/contiki/files/Instant%20Contiki/]
 +
* Using ContikiOS from Github repository [https://github.com/contiki-os/contiki]
 +
 
 +
=== 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: [http://sourceforge.net/projects/contiki/files/Instant%20Contiki/]'''
 
'''Link to download Instant Contiki: [http://sourceforge.net/projects/contiki/files/Instant%20Contiki/]'''
Line 14: Line 22:
 
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.
 
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'' '''passwork''': ''user''
+
IMPORTANT: To login in to Instant Contiki: '''username''': ''user'' '''password''': ''user''
  
== Installing ContikiOS 2.7 from its Sourceforge repository ==
+
=== Using ContikiOS from Github 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.
+
This method requires an existing installation of a Linux-based operating system. The guide assumes you are using Ubuntu 16.04 but should still be useful for similar versions.
  
Download contiki-2.7.zip from http://sourceforge.net/projects/contiki/files/latest/download
+
Download contiki-3.0.zip from [https://github.com/contiki-os/contiki/releases https://github.com/contiki-os/contiki/releases]
 +
 
 +
  wget https://github.com/contiki-os/contiki/archive/3.0.zip
  
 
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/
  
Rename the folder from contiki-2.7 to contiki.
+
  unzip 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 platforms (such as Tmote) you only need the following packages: ''binutils-msp430'', ''gcc-msp430'', ''msp430-libc'', ''msp430mcu'' and ''mspdebug''. If you intend to code for CC2538-based platforms (such as OpenMote), you should also install the following tool chains: ''gcc-arm-none-eabi'' and ''gdb-arm-none-eabi''.
 +
 
 +
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 gcc-arm-none-eabi gdb-arm-none-eabi 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
  
Run the following command: apt-get install binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug ant openjdk-7-jdk
+
You are done! You can now try to compile and run any example, such as [[Hello_World | Hello World]].
  
 +
[[Contiki_tutorials | Back to Contiki Tutorials]]
  
== Installing ContikiOS from Github repository ==
+
Edited by: Kwame, Pedro

Latest revision as of 10:05, 5 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:

  • Using Instant Contiki [1]
  • Using ContikiOS from Github repository [2]

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: [3]

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 ContikiOS from Github repository

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

Download contiki-3.0.zip from https://github.com/contiki-os/contiki/releases

 wget https://github.com/contiki-os/contiki/archive/3.0.zip

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

 unzip 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 platforms (such as Tmote) you only need the following packages: binutils-msp430, gcc-msp430, msp430-libc, msp430mcu and mspdebug. If you intend to code for CC2538-based platforms (such as OpenMote), you should also install the following tool chains: gcc-arm-none-eabi and gdb-arm-none-eabi.

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 gcc-arm-none-eabi gdb-arm-none-eabi 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.

Back to Contiki Tutorials

Edited by: Kwame, Pedro