Bitfields and structs are not portable, so nothing strange you can't receive them on PC. However it's bit weird that CW5.0 has changed allocation order. I didn't try 5.0, but 4.6 header files are clearly least bit first. From MC9S12D64.H:
/*** PORTAB - Port AB Register; 0x00000000 ***/
typedef union {
word Word;
/* Overlapped registers: */
struct {
/*** PORTA - Port A Register; 0x00000000 ***/
union {
byte Byte;
struct {
byte BIT0 :1; /* Port A Bit 0 */
byte BIT1 :1; /* Port A Bit 1 */
..
Could you verify if you have it the same or not in CW5.0 header files?
Pozdrawiam!
on the CW5.0 "mc9s12xdg128.h" :
/*** PORTAB - Port AB; 0x00000000 ***/
typedef union {
word Word;
/* Overlapped registers: */
struct {
/*** PORTA - Port A Register; 0x00000000 ***/
union {
byte Byte;
struct {
byte PA0 :1; /* Port A Bit 0 */
byte PA1 :1; /* Port A Bit 1 */
byte PA2 :1; /* Port A Bit 2 */
byte PA3 :1; /* Port A Bit 3 */
byte PA4 :1; /* Port A Bit 4 */
byte PA5 :1; /* Port A Bit 5 */
byte PA6 :1; /* Port A Bit 6 */
byte PA7 :1; /* Port A Bit 7 */
} Bits;
} PORTASTR;
Hi SMX,
I'm not aware of any changes in CodeWarrior v5.0 related to the bitfields.
I'd suggest you to doublecheck compiler settings. You might use different bitfield allocation in the projects (-BfaBxx option).
You can generate the list of predefined compiler macros "-Ldf=predef.h" to check compiler bitfield allocation options (e.g __BITFIELD_LSBIT_FIRST__, __BITFIELD_MSBYTE_FIRST__, __BITFIELD_MSWORD_FIRST__, __BITFIELD_TYPE_SIZE_REDUCTION__...)
Stanish