[Tinyos Core WG] AdcConfigure and struct return
Vlado Handziski
handzisk at tkn.tu-berlin.de
Thu Sep 21 13:47:42 PDT 2006
On 9/21/06, David Gay <dgay42 at gmail.com> wrote:
>
> The C spec specifies that a variable declared on the stack only lives
> until the function exits. The compiler can assume this wherever it
> wishes. Assuming that some particular quirk of some particular
> implementation means your code will always work is stupid. Fix: write
> "static const", not "const".
>
> For instance, I'd be rather surprised if msp430-gcc placed x in
>
> void g(void) {
> struct { int a; } const x = { f() };
> }
>
> in flash. If you write static const, you'll at least get a compile-time
> error.
I don't want to nitpick this, but the mspgcc manual says: "All global
variables with the "const" attribute are allocated in the main ROM space".
And I've always assumed that variables declared after implements{... are
global.
> Cool. Now we agree that it is not an issue of performance anymore, but of
> > religion :)
>
> And I'm tired of fighting stupid religous wars. Write the TEP however
> you wish, and find somebody to update the atm128 code. Probably Xbow
> will do it.
Was this the real problem?
> As I said, it has to do with history (we have always used structs on the
> > msp430, from the very first implementation) and religion,
>
> I.e., you did it this way, so it must be the right way. So you'll
> carefully define HIL so that only your way is acceptable, even though
> it has no real advantage. Fine, go ahead. I'm tired of this whole
> silly discussion about the purity of the way of particular ways of
> expressing platform-dependent concepts.
David, I am _proposing_ something. I've stated my arguments why I think it
is a better top level interface then the existing HAL2 mess.
You and I can disagree on the importance of architectural concepts or if
something is silly or not, but you can not deny the obvious benefits that
the HAA brought to the project in terms of number of ported platforms. What
I am getting tired of is pushing these "silly" architectural things against
all the accumulated corporate interest in this less and less academic
project.
As long as we don't have a proper TEP voting procedure (like the +1, 0, -1,
which I proposed on the same telecon together with the whole TEP concept)
pushing a TEP out when there is no consensus is a war of attrition. The TEP
is out, and the ball is in Phil's corner as WG leader.
> This being such a major issue, I invite once again all interested parties
> to
> > participate in the HIL telecon next thursday. Hopefully we can come to
> some
> > agreement.
>
> I'll skip - I've had too many "angels on the head of a pin"
> discussions on this topic.
>
>
Fine. Maybe we should just go back to good old tinyos-1.x ways, when there
were zero tinyos ports outside Berkeley on non-atmel platforms. I am not
sure who is pushing his idea as the only "right way" here.
Vlado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-2.0wg/attachments/20060921/35057c2b/attachment.html
More information about the Tinyos-2.0wg
mailing list