[Tinyos-devel] nesc.xml bitoffset error
Adler, Robert P
robert.p.adler at intel.com
Wed Feb 6 14:04:55 PST 2008
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??
Thanks!
-Robbie
-----Original Message-----
From: tinyos-devel-bounces at millennium.berkeley.edu
[mailto:tinyos-devel-bounces at millennium.berkeley.edu] On Behalf Of David
Gay
Sent: Wednesday, February 06, 2008 1:36 PM
To: WenZhan Song
Cc: tinyos-devel at millennium.berkeley.edu
Subject: Re: [Tinyos-devel] nesc.xml bitoffset error
On Feb 5, 2008 9:38 AM, WenZhan Song <wenzhan.song at gmail.com> wrote:
> x1 address = 5c006fe0
> x2 address = 5c006fe4
> The address difference is 4 bytes, that is 32 bits.
>
>
> But in nesc.xml, it shows that:
> <field bit-offset="I:8" name="x2" ref="0x2aaaac3e9aa0"
size="I:1">
> <type-tag alignment="I:1" size="I:1">
> <struct-ref name="tTestArray" ref="0x2aaaac3eded0" />
> <typename>
> <typedef-ref name="tTestArray" ref="0x2aaaac3ec928" />
> </typename>
> </type-tag>
> </field>
> </struct>
>
> The bit-offset of x2 shall be "I:32". Could someone tell me how to
fix it
> ot which program generates the nesc.xml file?
The .platform file for the imote2 is presumably broken (I can only
find the 2.x file, so can't check the 1.x one, but the 2.x one is
broken too): it needs to specify the "structure size boundary" value
(which affects structure layout, hence field offsets). For the 2.x,
that means replacing
$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";
with
$ENV{NESC_MACHINE} = "structure_size_boundary=32, 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";
in the .platform file.
David Gay
_______________________________________________
Tinyos-devel mailing list
Tinyos-devel at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-deve
l
More information about the Tinyos-devel
mailing list