[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinyos-devel] RE: [avr-gcc-list] Fwd: [Tinyos-help] TinyOs avr-gcc-

From: Philip Levis
Subject: Re: [Tinyos-devel] RE: [avr-gcc-list] Fwd: [Tinyos-help] TinyOs avr-gcc-4
Date: Mon, 15 Oct 2007 15:12:03 -0700

On Oct 15, 2007, at 2:30 PM, John Regehr wrote:

Eric I'm not an authority on this topic but here are my two cents:

- nesC adds plenty of value beyond facilitating inlining, for example the component model, support for concurrency, generic components, network
  types, etc.

- I see no reason why nesC/TinyOS cannot use the latest and greatest AVR
  toolchain.  Probably it's mainly a matter of the TinyOS maintainers
finding time for toolchain work. Also note that some TinyOS/nesC ports
  like msp430 are hopelessly mired in gcc3 for the foreseeable future.

- David has spent a fair amount of effort on C interoperability for nesC

- nesC isn't that obscure, I think it can parse all of C.

Right -- nesC is a superset of C. If people wanted to, they can write a huge application as a bunch of C files which are #included into a single nesC component, and add some shims for downcalls/upcalls. People mostly don't, though, for a bunch of good reasons...

IIRC, the reason we haven't moved to avr-gcc v4 has to do with its interpretation of optimization parameters. Kevin looked a bit into this and found that -Os leads to huge code bloat, but that -O3 leads to similar results as is observed with -Os in 3.2/3.4. There was definitely talk of moving to avr-gcc 4 for the 2.1 release. But making this change requires more than compiling and seeing if code size is different; as far as we know, there might be weird compiler bug edge cases that nesC tends to tickle. So it would require a lot of testing. But I think that now might be a good time to get our feet wet. New Atmega MCUs are going to push this more and more as time moves forward.

Eric -- with respect to why it's not just a matter of changing to C, I suggest you take a look at the chapter of the TinyOS programming manual entitled "Namespaces." It's only about 10 pages of double- spaced text, so isn't a long read. It explains the fundamental limitations of C and why its namespace model fundamentally makes efficient composition difficult. TinyOS is, in part, an exploration of how modern (read, post-1970s) language and OS techniques can improve the robustness, maintenance, extensibility, and performance of embedded codes.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]