I have a struct containing several word8, word16 and word32. Writing a full 32-bits value causes mis-writing to the previous 32-bits value. 2 bytes go to the correct place, and 2 bytes to the previous. Having 8 or 16 bits entities in the same struct works fine and they align correctly. I don't use __packed. Some times I don't see the overwritten data, when I assume it's written to padded cells. We have 16 bits external ram for this. Little endian. Keil tool, ARM compiler.
Øyvind Teig home.no.net/.../work.html
Case closed!
Our local "malloc" reimplemented to align on 4-byte boundary!
Thank you very much!