Creating a New Platform in TInyOS

What is aTinyOS Platform?

    A physical platform is comprised of a set of chips. Similarly a TinyOS platform is nothing but  collection of components representing these chips(drivers of the chips)..

How to create a New Platform?


  If the chips of the new platform are already present in the exixsting platform then implementing a new platform simply means wiring existing components. If the chips of the new platform are not present in any existing platforms then implementing the new platform consists of implementing components (drivers) for those chips and then wiring them.

Things Required For a New Platform:

    A new platform definition requires three things:

  1. Defintion of chips that creates the platform
  2. Definition of the Platform(Combining chips to platform) and
  3. Tool Chain or make definition

Chips Defintions:(tos/chips/chipX)


    Each chip will be assigned a specific directory under tos/chips.

   Each of the chips that provide software accessible functionality should have defintion in chips directory such as sensors,radios and microcontrollers.

Eg: msp430 chip has its defintion in tos/chips/msp430

Here defintions means chip specific interfaces and their implementations

Some chips such as MCU have subsystems such as ADC,SPI,UART and  Timer. then these subsystems should be placed in the subdirectory of it.for example tos/chips/chipX/timer....


If a platform is using some feature of the chip then the platform directory should contain the code that is specific to the combination of  chip and platform such as pin assignments and Interrupt assignments. It should be placed in tos/platforms/platformX/chips/chipX  for the platformX.

Eg:mica2 uses the cc1000 chips. So the platform folder of mica2 has chips directory which contains the code that is the combination of both chips and platform.

Platform Defintions:(tos/chips/PlatformX)

      A platform directory will be placed in tos/platform.
A TinyOS platform is a collection of components corresponding to physical devices.
Eg: mica2 uses the cc1000radio +Atmega128.
     The platform directory will join the components of the physical chips(drivers) together to form a platform.This is done by
  1. including the code of each of the chips
  2. providing any additional code that is specific to this particular platform.
tos/platforms/platformX should contains mainly 3 elements.

  1. .platform file which contains the include paths and other arguments for nesC.
  2. PlatformP/PlatformC file which has the Platform Boot procedure.
  3. Platform specific code such as PlatformLedsC, and code that is specific to the combination of chip and platform such as pin assignments and modifications etc
  4. hardware.h file which has hardware specific functions

Tool-Chain(Make System)


     Build system controls the process from pre-processing a TinyOS application to a single C file and will pass the file to the appropriate compiler and other tools.

We require two files:

  1. .rules file which should be placed in /support/make/MCUx
  2. .target file in the /support/make folder.


These are the files which are required to create a platform.

You can see the null platform in tos/platforms/null for reference.... There is also a TEP131 on this.. 







Comments

  1. How can we add a new radio chip to it, what all things do i need. i want to add cc3000 to my MSP430 and design a application for tinyos.

    ReplyDelete

Post a Comment

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto