[Tinyos-devel] nesc.xml bitoffset error

WenZhan Song wenzhan.song at gmail.com
Wed Feb 6 14:45:30 PST 2008


Looks like if we use packed attribute, then the problem does not exist. But
here is the problem we have seen:
http://sensorweb.vancouver.wsu.edu/wiki/index.php/Tips#Always_define_a_struct_with___attribute__.28.28packed.29.29_in_nesC
By the way, since you mentioned .platform file, the default one in CVS even
does not work, we have to comment out "gcc=xscale-elf-gcc" to compile - is
this right? Like this:

@opts = ("-fnesc-target=env",
         "-gcc=xscale-elf-gcc",
  "-nostartfiles",
  "-T$TOSDIR/platform/imote2/bare.x",
  "-fnesc-no-debug",
  "-DTINY_OS",
#  "-I$TOSDIR/lib/CC2420Radio",
  "-I$TOSDIR/platform/pxa27x/lib");
push @opts, "-mingw-gcc" if $cygwin;

# $ENV{NESC_MACHINE} = "pointer=4,4 float=4,4 double=8,4 long_double=8,4
short=2,2 int=4,4 long=4,4 long_long=8,4 int1248_align=1,2,4,4
wchar_size_size=4,4 char_wchar_signed=false,true gcc=xscale-elf-gcc";

$ENV{NESC_MACHINE} = "pointer=4,4 float=4,4 double=8,4 long_double=8,4
short=2,2 int=4,4 long=4,4 long_long=8,4 int1248_align=1,2,4,4
wchar_size_size=4,4 char_wchar_signed=false,true";

@commonplatforms = ("pxa27x");




On Feb 6, 2008 2:20 PM, David Gay <dgay42 at gmail.com> wrote:

> On Feb 6, 2008 2:04 PM, Adler, Robert P <robert.p.adler at intel.com> wrote:
> > Would this issue affect code generation in any way or only documentation
> > creation?  Also, is structure_size_boundary a relatively new
> > option/field, or has it been around for a while?  Finally, would the
> > change be backwards compatible with older versions of ncc??
>
> It showed up in v1.2.6 (it's alluded to in nesC's notes for that
> release). The env target doesn't like options it doesn't know, so
> specifying it for earlier releases would be a bad idea. It affects:
> - mig (as it needs to know structure layout)
> - XML structure layout output
> - constant folding (but it's unlikely to have an actual effect, except
> if you use an offsetof/sizeof result affected by this rule as a
> generic component argument)
>
> David Gay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080206/68dc3b4f/attachment.htm


More information about the Tinyos-devel mailing list