Getting started with Contiki and CC2530

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

The Getting Started with Contiki and CC2530 is an effort to kickstart an open source development using the SDCC 8051 Compiler [1] and The Contiki Operating System [2]. This Crowdsourcing [3] is trying to build an open source effort to get Contiki running on the TI LPRF SmartRF05 platform with CC2530.

The CC2530 is a IEEE 802.15.4 SoC. It enables robust network nodes to be built with very low total cost. The CC2530 combines an enhanced 8051 MCU, in-system programmable flash memory, 8-KB RAM, and many other powerful features. The CC2530 comes in four different flash versions: CC2530F32/64/128/256, with 32/64/128/256 KB of flash memory, respectively. The CC2530 has various operating modes, making it highly suited for systems where ultralow power consumption is required such as Contiki based system Short transition times between operating modes further ensure low energy consumption.

Contiki

Contiki is an open-source multitasking event-driven operating system designed for networked embedded devices. Its lightweight footprint makes it suitable for memory constraint microcontrollers.

Contiki gathers several independent modules such as an event-driven thread-like multitasking environment with the protothread library, the uIP TCP/IP (v4 and v6) stack, the wireless sensor network set of protocols: the Rime stack.

  • Contiki Wiki [4]
  • SICS Contiki Wiki [5]

Already out on the web are multiple excellent resources as a very good starting point for this porting effort:

  • Experiences from Porting the Contiki Operating System to a Popular Hardware Platform [6]
  • Loughborough Univeristy - Contiki Sensinode/cc2430 with uIPv6 and RPL [7]
  • SensTools WSN430 Effort [8]

Needed for Development

Hardware List:

  • CC2530 Development Kit [9]
  • CC2531 USB Evaluation Module [10]

or

  • CC2530 ZigBee Development Kit[11]

Software List:

or

  • VMWare Workstation [13]
  • Instant Contiki 2.5 [14]
  • Terra Term [15](not Necessary, preferred)
  • SDCC 3.0.3 [16] (It is what I used, downloaded a snap build)
  • SDCC Snap Shot Builds [17]
  • TI Packet Sniffer [18]
  • Smart RF Flash Programmer [19]

Getting Started and Quick Start

First familiarize yourself with a few basic things highlighted in the steps below:

Step 1:

  • Getting started with the SRF05EB HW [20]

Step 2:

  • Install Instant Contiki [21]

Step 3:

  • Build SDCC from source [22]

Step 4:

  • Develop your first application [23]

Step 5:

  • Program the CC2530 using the SRF Flash Programmer and SRF05EB with the hex file from cross-compiling under Linux using make

CC2530 Contiki/6LowPan port

The port is now available from George Oikonomou. A very special thank you to him for the excellent job to make it available to everyone

  • cc2530 port with examples has been pushed to github, branch cc2530 at [24]

What has been ported so far is the basic framework to use the SmartRF05 Evaluation Board (SRF05EB) as the development platform for this effort. The following is currently supported:

  • SDCC banking with my automatic bank allocator.
  • uipv6 with RPL, icmp and udp (not tested tcp). 6lowpan header compression also works.
  • Working SmartRF/cc2530EM Drivers: RF, watchdog, uart, clock via sleep timer, rtimer via timer 1, button, LEDS 1-3, h/w random number generator, ADC (temp and VDD).
  • The port builds on ubuntu and Mac OS X.

Future Work

The plan for the future will be to get support for the CC2531

  • Next drivers to implement: cc2531 USB (CDC), joystick, LCD, serial flash, DMA

For anyone interested in this work continue to post on the Contiki Developers list

  • Contiki Developers List [25]

For step-by-step guide on running Contiki demo for CC2538DK on Windows, please refer to the following link.

Follow the Effort on E2E

Thank you!

  • LPRF Rocks the World - Contiki/6LowPan CC2530 Effort [26]

"Customer Centricity, Enthusiasm, Mass collaboration and Great minds are the best path towards great products"