[Tinyos-host-mote-wg] [Tinyos-2.0wg] Adding support for families of platforms

Kevin Klues klues at tkn.tu-berlin.de
Fri Apr 22 03:24:30 PDT 2005


I tried sending this email to the nescc-devel mailing list, but somehow 
it didn't seem to go through.  It makes sense to have it here as well 
anyway since we talked about this in the meeting on Wednesday.

Per the discussion from the tinyos 2.x working group yesterday.....



The possibility of having families of platforms exisiting in the 
platforms directory was discussed.  That would mean that instead of just 
allowing the platforms directory to have the following structure....

 tools
    \
    |- platforms
           \
           |- platform1
           |- platform2
           |- platform3

a structure allowing families of platforms to be grouped, would also be 
allowed.

It would be important to be able to specify platforms using the 
traditional directory structure, but allow new ones to define familes of 
platforms if desired.  Such a directory structure can be seen below.

 tools
    \
    |- platforms
           \
           |- platform1
           |- platform2
           |- family1
           |     \
           |     |- platform3
           |     |- platform4
           |- family2
           |     \
           |     |- platform5
           |     |- platform6
           |- platform7

 From playing with the ncc code, I found a simple solution that allows 
platforms to be organized in such a way.

1) A new nesc flag "-family" is introduced.
       elsif(/^-family=(.*)/) {
           $family = $1;
           $strip = 1;
       }
2) A platform sets the -family flag from its .target file in the make 
directory
     i.e. NESC_FLAGS:=-Wnesc-all -mdisable-hwmul -family=eyes
3) If a platform does not set this flag, then it is undefined
4) nesc tries the following assignment
     $platform_def = "$TOSDIR/$platform/$family/$target/.platform" if 
defined($family);

The diff file (patch) from the exisiting ncc.in file in the 
tools/src/ncc directory and the one that contains these modifications 
has been attached to this email.
To apply the patch just run:
 patch ncc.in ncc.in.patch

Let me know if this seems like a reasonable approach, or if you have any 
better ideas.

Kevin
-------------- next part --------------
35a36,39
> 	if (/^-family=(.*)/) {
> 	    $family = $1;
> 	    $strip = 1;
> 	}  
105a110
> $platform_def = "$TOSDIR/$platform/$family/$target/.platform" if defined($family);
-------------- next part --------------
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
http://Mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list