AnsweredAssumed Answered

MPC574xB/C/G Device Header Files - structure packing

Question asked by Heath Smith on Apr 11, 2019
Latest reply on Apr 12, 2019 by David Tosenovjan

Can anyone tell me if structure packing should be used with these file? My target is an MPC5748G and I am using the GreenHills compiler/linker v7.1.4.

 

I thought that packing with a 1 byte alignment would be the safest option (GHS - #pragma pack(1)) but doing so there were problems detected at run-time. I then tried a 4-byte alignment (#pragma pack(4)) and this worked Ok.

 

Can anyone tell if there is an assumption about the structure packing?

 

See:

 

https://www.nxp.com/downloads/en/libraries/MPC574xB_C_G.zip

 

Thanks in advance.

Outcomes