[Tinyos-devel] nesc.xml bitoffset error

David Gay dgay42 at gmail.com
Thu Feb 7 11:55:05 PST 2008


On Feb 7, 2008 11:25 AM, WenZhan Song <wenzhan.song at gmail.com> wrote:
> David,
>
> Your suggestions can correct the XML bitoffset problem of non-packed
> structure, but it does not solve the second problem:
> http://sensorweb.vancouver.wsu.edu/wiki/index.php/Tips#Problem2:_If_not.2C_the_initial_values_are_even_set_to_the_wrong_addresse_in_memory
>
> According to our test, without "structure_size_boundary=32", it works great
> if we always define packed structure. With it, it even has problems with
> "packed" structure.

I'll look at the details later, but the nesC compiler has no influence
on the layout of regular C structures (as opposed to nx_structs, which
are layed out by nesC). If you're not getting what you expect in terms
of layout from a C structure, either:
- there's a bug in gcc
- you're not understanding gcc's layout rules for your architecture correctly

David Gay


More information about the Tinyos-devel mailing list