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

Re: [bluetooth-dev] Re: Porting to ARM

Norman Farquhar[SMTP:norman_farquhar@xxxxxxx.com] wrote:
> I do not know how gcc handles accesses to the structures with packed
> attribute, but in my experience with the arm toolkit this is sufficient to
> solve the problem.  What packed tells the compiler is not only DO NOT PAD
> the structure, but also that the structure is of UNKNOWN alignment.  That
> means that data sizes greater than bytes are accessed as bytes and assembled
> into larger units, at least for ARM7.  Take a look at the assembly output of
> your compiler to check its behavior on packed structures.
> Best of luck,
> Norman
Ah, thanks, I didn't know that. But the endian problem is still left, if you happen
to use a big-endian cpu, like m68k or some brands of ARM cpus.