HI buddies,
I am encountering a very strange problem in IAR 7.30B, when building a project for a CC2430 chip.
In project 'test04_lcd_hangzhou' in the attachment, such code in function Print8 cause XDATA almost 100% filled at building time.
>
uchar * p = pstr;
<
If such lines are commented, XDATA usage drops tremendously, from 3870 to 6 bytes.
It is the same case for lines in ClearRAM function. If following code is not commented, XDATA is fully filled when building the project.
>
for (i = 0; i < 8; i++)
{
SendCmd(i|0xb0);
SendCmd(0x10);
SendCmd(0x00);
for (j = 0; j < 132; j++)
{
SendData(0);
}
}
<
NOTE: xdata stack is set 0xEFF in project options.
Reference: ./test04_lcd_hangzhou 4670.test04_lcd_hangzhou.zip