Why the uint32_t is not aligned on a 32 bit boundary. Is it because the MSP430 used on TelosB is 16-bit and 32-bit is sort of software-implemented? Thanks.
On Fri, Aug 20, 2010 at 2:50 AM, Eric Decker <[email protected]> wrote: > > > On Thu, Aug 19, 2010 at 10:01 PM, Xiaohui Liu <[email protected]> wrote: > >> Hi, >> >> For the following structure >> struct foo{ >> uint8_t foo_a; >> uint32_t foo_b; >> }; >> what is the actual layout after compilation on a TelosB platform? Will it >> be packed? Thanks. >> > > unless explicit package is requested no packing is done. The struct will > be laid out > > byte > pad > 32 d > 32 c > 32 b > 32 a > > > The 32 bit uint32_t will be laid out in little endian order on a 16 bit > boundary. > > eric > > > >> >> -- >> -Xiaohui Liu >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Eric B. Decker > Senior (over 50 :-) Researcher > > > -- -Xiaohui Liu
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
