AnsweredAssumed Answered

Internal Error with arrays on XGATE

Question asked by Ole Bonin on Jul 2, 2010
Latest reply on Jul 5, 2010 by CompilerGuru

Hi there,

 

i have a ringbuffer in shared data segment so both cpu and XGATE can access it :

 


typedef struct
{   
  unsigned char in;
  unsigned char out;
  unsigned int buffered;
  unsigned int timerOvrFl;
  unsigned char data[256];

} rBuffer;

rBuffer ring_buffer;

 In the cpu code the instruction

 

ring_buffer.data[ring_buffer.in];

 

 

 

works fine, but when i try the same on XGATE i get a error popup:

 

Internal Error #601in c:\......\ccpp.cpp while compiling xgate.cxgate, please report to freescale.

 

a workaround is :

 

in=ring_buffer.in;

ring_buffer.data[in];


 

 

but since timing is critical i cant afford the extra operation.

 

I´m using version 4.5 and a 9S12XDP512

 

Does anyone know a solution?

Outcomes