[Tinyos-devel] Re: [Tinyos-help] .platform question

David Gay dgay42 at gmail.com
Mon Dec 17 11:48:15 PST 2007


On Dec 17, 2007 11:02 AM, Kevin Klues <klueska at gmail.com> wrote:
> OK, I think you've convinced me that %C might be a bad idea with the
> argument that the tinyos-2.x-contrib isn't the only place for outside
> contributions to come from.  Tying %C to just this single outside source
> would be a hack and probably not the right thing to do.
>
> Let's standardize on the environment variable used for contrib though so
> that .platform files, etc can be set up once and others can use them as long
> as they have the proper environment set up.  Martin uses, CONTRIBROOT, I
> proposed TOSCONTRIBROOT, and David proposes TOSCONTRIB.  Since we decided
> its best not to use %C, I am leaning more towards davids proposal now, so
> lets' go with TOSCONTRIB.
>
> To make this work we need to then:
>
> Add this environment variable to the .profile file (or wherever environment
> variables are set up):
> export TOSCONTRIB=/path/to/tinyos-2.x-contrib
>
> in the .platform file do
>
> $ecosensdir = "$ENV{TOSCONTRIB}/ecosenys"
> push( @includes, qw(
>
>   $ecosensdir/platforms/ecosens1
>    $ecosensdir/platforms/ecosens1/chips/stm25p
>    $ecosensdir/platforms/ecosens1/chips/cc2420
>
>    %T/chips/cc2420
>    %T/chips/cc2420/alarm
>    %T/chips/cc2420/control
>    %T/chips/cc2420/csma
>    %T/chips/cc2420/interfaces  ...
>   ...

All sounds good to me, though I will quickly point out again that the
above example at least could be:

push( @includes, qw(

  %P/chips/stm25p
  %P/chips/cc2420

  %T/chips/cc2420
  %T/chips/cc2420/alarm
  %T/chips/cc2420/control
  %T/chips/cc2420/csma
  %T/chips/cc2420/interfaces
  ...
  ...

as %P is replaced by the directory of the .platform file... Note that
this does assume you're eventually invoking ncc something like this:
  ncc -I$TOSCONTRIB/ecosens1 -target=ecosens1 <other options and files>

David


More information about the Tinyos-devel mailing list