AnsweredAssumed Answered

Code Warrior 5.0 Struct. Problem (Poland) PLEASE HELP !!!!!

Question asked by Pawel Poplawski on Apr 17, 2009
Latest reply on Apr 20, 2009 by stanish
Sorry for My English.
 
The system is connected thru rs232 with PC Computer. There is a program to save some settings to the device. And when I was using CW 4.6, 4.7 there was no problem at all. PC was connected to Device and read and save was ok.
 
BUT now when I have installed CW 5.0 There is a serious problem.
For example when I have Union in "C" and I have a struct on HCS12X side it looks like this below: 
But when I read it on PC side the struct is REVERSED (first bit of struct is the last one on PC Program) !!!!!!! 
 
When I'm using CW 4.7 there is no problem at all.  
 
volatile union
{
volatile struct
{
volatile unsigned int PkEm1 :1; //bits
volatile unsigned int PkEm2 :1; //
volatile unsigned int PkEm3 :1; //
volatile unsigned int PkEm4 :1; //
volatile unsigned int PkEm5 :1; //
volatile unsigned int PkEm6 :1; //
volatile unsigned int PkEm7 :1; //
volatile unsigned int PkEm8 :1; //

volatile unsigned int PrzekButlaRed :1; //
volatile unsigned int PrzekInjG :1; //
volatile unsigned int Stac :1; //
volatile unsigned int NORPM     :1;    //
volatile unsigned int Sleep :1; //
}bit;
volatile unsigned int ALL;
}HardStates;
 

Outcomes