Thanks Eric, I'll try that.
As far as I can see, the "make <platform> docs" (nesdoc) output only displays 
the interfaces and internals of each component. i.e. if I look at a 
configuration I can see if it uses Xe1205SpiNoDma0P and how it wires it, but 
not the other way around.

Regards Flemming

From: Eric Decker [mailto:[email protected]]
Sent: 24. marts 2011 11:13
To: Flemming Nyboe
Cc: [email protected]
Subject: Re: [Tinyos-help] How can I find a wire?

Its all in knowing where to look....    And what the thing looks like.

There maybe a way to do this using the docs feature.   Doing something like.    
"make telosb docs" will generate html docs
that can be accessed using a browser that presents a graphical representation 
of how things are wired.

That might give you what you want.  But I'm not too sure about that.


What I do personally is look in the app.c   Which absolutely has to show what's 
up.    It is the output of nesc and
has to instantiate the wiring you've said you wanted.

But following what is going on takes some getting used to and has a learning 
curve.

For example....

I talk about some stuff but most is left as an exercise for the student....


You'll see something like the following in app.c

inline static const msp430_spi_union_config_t 
*/*Msp430SpiNoDma0P.SpiP*/Msp430SpiNoDmaP__0__Msp430SpiConfigure__getConfig(uint8_t
 arg_0x40ba15d8){
#line 39
  union __nesc_unnamed4280 const *__nesc_result;
#line 39

#line 39
    __nesc_result = 
/*Msp430SpiNoDma0P.SpiP*/Msp430SpiNoDmaP__0__Msp430SpiConfigure__default__getConfig(arg_0x40ba15d8);
#line 39

#line 39
  return __nesc_result;
#line 39
}


The naming is because of name space modification to avoid collisions because 
nesc is a complete program compilation scheme.

The SPI module is arbitrated and gets hooked up using one of the Shared 
wirings.   These get invoked using generic modules.  Each instantiation will
look like Msp430SpiNoDmaP__<n>   where <n> is the new instantiation.     In 
other words Msp430SpiNoDmaP__0 is one client of the
underlying h/w.

So when this client gets told it owns the hardware the arbiter kicks the 
configurator associated with it which just happens to be
Msp430SpiNoDmaP__0__Msp430SpiConfigure.   If you look in the module that 
defines all this you see that Msp430SpiConfigure is the interface
and the method is getConfig.

This one in particular isn't actually wired because if you look closely you see 
the call out is to Msp430SpiNoDmaP__0__Msp430SpiConfigure__default_getConfig


I was in BaseStation when I built "make telosb"  just so I had something to 
show you.



So what you want to do is look at your app.c and see if you can follow the call 
tree.  That will tell you what is wired to what.


hope that will put more tools in your toolbox...

eric


On Thu, Mar 24, 2011 at 2:44 AM, Flemming Nyboe 
<[email protected]<mailto:[email protected]>> wrote:
Hello,

In a TinyOS application, is there a trick to find the wiring of a particular 
singleton component?
e.g. If I want to know what is wired to the Msp430SpiConfigure interface used 
by Xe1205SpiNoDma0P in the BlinkToRadio app?

Regards Flemming

_______________________________________________
Tinyos-help mailing list
[email protected]<mailto:[email protected]>
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
Eric B. Decker
Senior (over 50 :-) Researcher

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to