[Tinyos-help] Preprocessor defines for platform detection
Urs Hunkeler
uhu at gmx.ch
Mon May 4 00:31:27 PDT 2009
Hi Oscar,
I haven't found any mention about deprecation anymore. Really not sure
where I would have read this. I found the following information, though:
There is a good explanation in this message on the mailing list:
http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg10058.html
It mentions the TEP2 about hardware-independent programming (the link is
in the message).
In addition, the ncc man page says the following:
--------------------
PREPROCESSOR SYMBOLS
In addition to the preprocessor symbols defined by gcc and
nescc, ncc
defines:
PLATFORM_target
where target is the selected target name, converted
to upper
case
BOARD_boardname
for each -board=boardname option (the boardname is
converted to
upper case)
--------------------
Cheers,
Urs
Rodriguez Oscar wrote:
> Hello,
>
> Thanks for your reply. In fact, it works as you mentioned.
>
> I'm a little worried about this being a deprecated feature. Do you
> remember where you read this?
>
> Oscar
>
>
> Urs Hunkeler さんは書きました:
>> Hi,
>>
>> As far as I know (it works in my code), the nesc compiler defines
>> PLATFORM_xxx (I have used it for PLATFORM_TELOSB, PLATFORM_MICAZ and
>> PLATFORM_MICA2). I vaguely remember having read somewhere that this is
>> a deprecated feature and should not be used anymore. Anyways,
>> CtpForwardingEngine.h in the TinyOS CTP implementation seems to use
>> various PLATFORM_xxx defines, including PLATFORM_IRIS:
>>
>> http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngine.h?view=markup
>>
>>
>> Cheers,
>> Urs
More information about the Tinyos-help
mailing list