This lesson shows you what a platform port consists of, and how TinyOS reuses as much code as possible between different platforms. The lesson will proceed by showing how to do the port for an imaginary mote called "yamp", which has a MSP microcontroller and a CC radio transceiver. The target audience of this lesson consists of those people that want to better understand what the difference between e. Note that the material covered in this tutorial is not strictly necessary for regular tinyos developers, and you can safely skip it if you have no intention of working down to the lowest level or developing new platforms. Chips vs Platforms Two key building blocks for any mote are the microcontroller and radio transceiver.
|Country:||Bosnia & Herzegovina|
|Published (Last):||3 November 2005|
|PDF File Size:||3.17 Mb|
|ePub File Size:||17.68 Mb|
|Price:||Free* [*Free Regsitration Required]|
This lesson shows you what a platform port consists of, and how TinyOS reuses as much code as possible between different platforms. The lesson will proceed by showing how to do the port for an imaginary mote called "yamp", which has a MSP microcontroller and a CC radio transceiver. The target audience of this lesson consists of those people that want to better understand what the difference between e. Note that the material covered in this tutorial is not strictly necessary for regular tinyos developers, and you can safely skip it if you have no intention of working down to the lowest level or developing new platforms.
Chips vs Platforms Two key building blocks for any mote are the microcontroller and radio transceiver. Of course, both a microcontroller and a radio can be used on more than one platform. Given this multiplicity of platforms, it would be vasly redundant if each platform developer had to rewrite the software support for each chip from scratch. While a chip may be physically wired in a different way on different platforms e.
Thus, platform-independent code to support a chip is placed in a chip-specific directory. Note that in general there may be more to a platform port than pulling in existing code for different chips, in particular when a new platform uses a chip that is not yet supported.
Developing drivers for a new chip can be a non-trivial undertaking especially for radios and microcontrollers ; these aspects are not covered here. Initial platform bring-up As a first step to bring up the platform, we will stick to the bare minimum in order to compile and install the Null application on our yamp mote. The second statement defines the opts list, that contains various parameters passed to nesc. Please consult the nesc documentation for information on the meaning of these parameters.
The hardware. This can define platform-specific constants, pin names, or also include other "external" header files e. Some other very important functions that are defined in msphardware. How interrupts are disabled is of course microcontroller specific; the same applies to putting the microcontroller to sleep as is done by the scheduler when there are no more tasks to run, using the McuSleep interface.
In addition, there must be a file named "platform. Setting up the build environment and building the "null" app Before pulling in existing chip drivers or writing any code, we must set up the build environment so that it is aware of and supports our platform. Once this is done, we will define the basic TinyOS module for our platform, and use the Null app in tinyos It is useful to test that the build environment is functional in its most minimal sense, i.
You must specify one of the valid targets and possibly some combination of the extra options. Many targets have custom extras and extended help, so be sure to try "make help" to learn of all the available features.
The problem is that we need to define the platform in the TinyOS build system, so that the make invocation above recognizes the yamp platform. The TinyOS build system is a Makefile-based set of rules and definitions that has a very rich functionality. This includes invoking necessary compilation commands as with any build system, but goes much further and includes support for other important aspects such as device reprogramming or supporting multiple platforms and targets.
A full description of the inner workings of the TinyOS build system is beyond the scope of this tutorial. For now, we will simply see how to define the yamp platform so that the "make yamp" command does what it should. For those that want to delve deeper, start with "tinyos Defining a make target The TinyOS build system resides in "tinyos The strict minimum for a platform to be recognized by the build system i. So, create the file "tinyos The ncc compiler is unhappy about not finding a "PlatformC" component.
The "PlatformC" component must be defined for each platform. Its role and placement in the system is described in more detail in TEP The next step in the bring-up of a platform, that we will cover in this part, is to program a node with an application and verify that it actually works.
As the name indicates, "PlatformLedsC" is a platform-specific component, and thus we will need to define this component for the yamp platform. Why should there be such a platform-specific component for accessing Leds? This is because at the lowest level, i. This is in fact the model used on all current TinyOS platforms.
Now, consider Leds from another perspective, namely that of the Leds. In this interface, we have commands such as get ; in principle such a command does not need to be platform-dependent: the code that maintains the current state of a Led and returns it via the get call does not need to be re-written each time a Led is connected to a different pin of course re-writing get for each platform would not be much overhead given its simplicity; this argument clearly becomes far stronger in more complex situations involving entire chips rather than individual GPIOs.
The key notion that the above example is simply that there is a boundary above which software components are platform-independent, and below which components are specifically written with one hardware platform in mind.
This is at heart a very simple concept; its complete instantiation in TinyOS is of course richer than the above example, and is the topic of TEP2 Hardware Abstraction Architecture. For the purpose of this lesson, the key point is that we are wiring to ports 5.
With the above file in place, we can now compile Blink for the yamp platform. How do we test that the application actually works? We have thus far presented yamp as an imaginary platform, but it turns out that the above application should work on any platform with the MSPx microcontroller and where the Leds are connected to microcontroller ports 5. Testing on a tinynode or eyes mote is also easy and only requires changing the pin wirings in PlatformLedsC to follow those of that platform; running this application on mica-family motes will require more changes since they use a different microcontroller.
Conclusion This lesson has introduced the notion of per-platform support in TinyOS using as a guiding example the development of a platform port to an imaginary "yamp" platform. We have seen how introducing support for a new platform requires touching not only nesc code but also adding some rules to the build system.
This tutorial also touched upon the notions of Hardware Abstraction Architecture HAA that is central to the clean and modular support of different platforms and chips in TinyOS.
The steps outlined here did not cover what is the hardest part of a platform port: developing the components to drive a radio transceiver or MCU which are necessary if the platform uses chips that are not currently supported in TinyOS. Developing such drivers is an advanced topic that is beyond the scope of the tutorials; for those curious to gain some insight we recommend perusing the code for a chip e. Related Documentation.
tinyos on stm32
You are on your own for the installation Suggested Steps Tutorials Unzip apps. Then plug the sound board into the MIB programmer and connect the power and serial cables to the programmer. Battery power must be OFF! Launch Cygwin and use the alias "cdapps" to navigate to the apps folder on your z: drive. The aliases are provided to make navigation around TinyOS easier.
Introduction to TinyOS
TinyOS has been ported to a variety of hardware platforms. OpenVMS — Wikimonde Design and simulation of a modified perturbed digital chaotic signal generator for secure data communication. An Operating System for Sensor Networks stacks, and programming tools. If you wish, you may, at home, install version 1. Design and simulation of a modified perturbed digital chaotic signal generator for secure data communication.