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:
- Defintion of chips that creates the platform
- Definition of the Platform(Combining chips to platform) and
- 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
- including the code of each of the chips
- providing any additional code that is specific to this particular platform.
- .platform file which contains the include paths and other arguments for nesC.
- PlatformP/PlatformC file which has the Platform Boot procedure.
- 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
- 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:
- .rules file which should be placed in /support/make/MCUx
- .target file in the /support/make folder.
You can see the null platform in tos/platforms/null for reference.... There is also a TEP131 on this..
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