AnsweredAssumed Answered

Compiler error?

Question asked by pfeifferc on Oct 20, 2009
Latest reply on May 20, 2010 by SeanM

Hi !

I use a structure which is stored in ext.SDRAM and my function code is also in ext. prgmemory.

but my code fragment which is an if declaration which use a var contained in this structure seems to be missinterpreted if i look at the generated asm code (see my screenshoot of my VDSP)


my structure(shown below) : if i use bigger(u32) vars before the smaller vars - look at marked line - the access to the next following members seems to be wrong. i have never observed this behaviour. So i move u32 declare after the u8 vars and it works but i guess that the compiler have to handle this.

i know that memory is saved if i declare smaller vars before bigger ones.(allignment etc).



typedef struct stationSettings { //macAddress[6]; // char[6];   //6bytes for a macaddr
volatile bool onAir;   //true if connected via lan
   bool running;     // set after main loop is reached
   bool LANReady;  //if lan device driver is opened->link established
   bool firstTimeAfterLinkUP;   //true after linkUp used to send the JoinIntoCommand
   bool stateChange;  //flag to sign a statechange since last check
   bool sendCyclicData;
   bool DSPUartActive;
   bool isPitB107;      //specialFlag to identify PitBuilding107
   bool isAddP122;      //specialFlag to identify AddPitBuilding122
   bool isPlayer102;    //specialFlag to identify player STID=102
   bool PitB107Active;
   bool AddPB122Active;
   bool SDCardPluggedIn;
   u32  stateChange_content;
   u8   VLAN_PCP;    //priority used for VLAN audio
   u8   audioSystem[2];
   u8   FWVersion;
   u8   HWDetect;
   u8   HWOptions;
   u8   SMM_Priority; //priority for SyncMasterModule changes-joins..
   u8   faultStateCOP; //used for several faultStates
   u8   extUARTProtocol;
   u8   extUARTMode;  // new 24.08.09 -- since protov0.8 FW Build4
   u8   SoftwareID;
   u8   SPriority;
   u16  SysLogInterval;
   u16  cyclicDataInterval;
   u16  reqStationCount;
   u16  stationID;   //12bit are effectifely used to mark a station with an ID
   u16  VLAN_ID;  //used to sep. store from packetized VLAN_Station_ID
   u32  extFaultStateCOP; //int used additional info