Download Operating Precautions Embedded Workbench for 78K
Transcript
Operating Precautions for IAR EW78K
No. G47
Internal Compiler Error: EctContextBase::GetValue
Details
A far data access inside an interrupt function may cause an internal compiler error at optimization level
medium or higher.
Example1
typedef struct
{
int
unsigned char
} uart_t;
rx_busy;
rx_byte;
__far uart_t uart;
__interrupt void isr_sr2(void)
{
if(uart.rx_busy == 1)
{
uart.rx_byte = SDR21;
}
}
Workarounds
1) Reduce the optimization level for the interrupt function:
#pragma optimize=low
__interrupt void isr_sr2(void)
{
…
}
2) use a near data access: __near uart_t uart;
Customer Notification R20UT0002ED0737
68