[Tinyos-devel] About adding new platform

Hristo Bojkov hbojkov at idxs.eu
Fri Mar 7 01:42:37 PST 2008


Hello coders,

After tmote sunset, we focused on testing any other platform to switch our 
projects to them. So in the way of testing many types, we received few motes 
from Meshnetics. They are with RF230 radio and Atmega1281 cpu in module 
which Meshnetics named zigbit. Very similar to Iris platform of Xbow. But 
there is big difference in ports pin usage, so the easiest way to test them 
was to get Irsi platform and remap the ports for the zigbit.

There are several documents describing *HOW-TO*  to add new platform to 
TinyOS2, so this mail is mainly as feedback to Klueska for the wiki, and 
Martin Leopold for the TEP131. In them they described *HOW-TO* add new 
platform to Tinyos2, but as I realized - they mainly focused on how to add 
new platform to tinyos-2.x directory.

I read in details the description that is given in TEP and WIKI, so thank 
you for the job you have done. Both documents are very good and helped me a 
lot in way of adding new platform to tinyos-2.x directory.  When we started 
tests with this "zigbit" platform, we decided to add the new platform to 
tinyos-2.x-contrib to allow others to use it with tinyOS and test it. So 
following the description I was able to add the zigbit platform in 
tinyos-2.x directory (I.e. zigbit. target in make subdir,  and inside I 
created sub dir zigbit with zigbit.rules file, and .platform in 
tos/platforms/zigbit). This worked fine, but the compilation was failing if 
I moved the files in the tinyos-2.x-contrib directory. So I traced the 
problems and solve them, by setting the TOSMAKE_PATH in Makefile, and adding 
one additional change related to zigbit.platform file, which compilation was 
not able to locate. The wiki said noting about how the compiler should 
locate the platform file, but the TEP 131 was misleading for me. In the 
TEP131 in section 4.The Platform, there was (is) one explanation:
... " This directory must be found in the TinyOS tool chain search path for 
example tos/platforms (or found in TOSHMAKE_PATH see Section 3.2.1).  "...
, which in the part in brackets is not accurate. the TOSMAKE_PATH is used in 
Makerules file to add directory in which a .target file is located. The path 
to ".platform" file must be added in the toolchain search path. This can be 
done in the Makefile of each project, using this new platform, and is done 
by means of CFLAGS, like in this example:
CFLAGS 
+= -I/opt/tinyos-2.x-contrib/<contribname>/tos/platforms/<platformname>

Best regards
Hristo Bojkov

.......TOS environment....................................
OS  : WinXP + cygwin
TOS: 2.0.2
Dev : tmote sky
Java: jdk1.5.0_06

 



More information about the Tinyos-devel mailing list