I am using Codewarrior 11.1 and need to specify a couple structures to be stored in memory as little candida format. Supposedly the attribute " __attribute__((bitfields(little_endian)))" is suppose to accomplish this but it seems to just be ignored. Can anyone tell me if this is basically a nop in Codewarrior 11.1 when compiling for Coldfire? If not, is there some special way it needs to be used to actually be activated. Thanks.
I guess my question on this reply is, how does it apply to my original question? This seems to have nothing to do with why an attribute that is documented in CodeWarrior 11.1 does Nothing.
You can find the reference here: CodeWarrior for Microcontrollers V11.x > ColdFire for Microcontrollers > ColdFire Build Tools Reference Manual > Addressing > Sections > Bitfield Ordering
The example code does not work. According to the current documentation, the compiler should allow a structure to be stored in little endian format when this attribute is used. The compiler does not complain about it, it just seems to ignore it with no warning or other notification it is ignoring it.
Hi,
The compiler generates code to access both LE and BE bitfields.
We don't see a problem with the example.
Note the attribute defined how the bitfield is stored in memory, the value is always converted to the native endian of the machine when the value is in a register.
Regards
Soledad
Hi,
Please check the following link and let me know if this helps,
A little or big Indian? A Plea for Peace… | MCU on Eclipse
Regards
Soledad