This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can't debug fatal error in my gsm code.

i am facing a problem in Keil uVision3 while running a gsm code. the output window shows fatal error, that i can't debug in the program

unsigned char Rxmsg()
{
 unsigned char i = 0, ret = 0;
 unsigned int j = 0;
 unsigned char p[90];
 for(i = 0; i < 90; i++)
 p[i] = 0x00;
 i = 0;
 SBUF = 'a';
 while(TI == 0);
 TI = 0;
 SBUF = 't';
 while(TI == 0);
 TI = 0; SBUF = '+';
 while(TI == 0);
 TI = 0;
 SBUF = 'c';
 while(TI == 0);
 TI = 0;
 SBUF = 'm';
 while(TI == 0);
 TI = 0;
 SBUF = 'g';
 while(TI == 0);
 TI = 0;
 SBUF = 'r';
 while(TI == 0);
 TI = 0;
 SBUF = '=';
 while(TI == 0);
 TI = 0;
 SBUF = '1';
 while(TI == 0);
 TI = 0;
 SBUF = 0x0D;
 while(TI == 0);
 TI = 0;
 for(i = 0; i < 90; i++)
 {
 j = 0;
 while(RI == 0)
 {
 if(j >= 1000)
 delay(1);
 j++;
 }  p[i] = SBUF;
 RI = 0;
 show(p[i]);
 cmnd(0x18);
 }
 return ret;
}


output shows:
Build target 'Target 1'
assembling STARTUP.A51...
compiling gsm.c...
C51 COMPILER V8.02
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2006
*** WARNING C500 IN LINE 1 OF ..\GSM.C: INCORRECT LICENSE ID CODE (LIC) IN 'TOOLS.INI'
C51 FATAL-ERROR - ACTION: GOBAL OPTIMIZATION FUNCTION: Rxmsg ERROR: CANNOT OPTIMIZE FUNCTION
COMPILATION TERMINATED.
use the following work-around: #pragma OPTIMIZE (7) /* your original function */ Rxmsg () { .... } /* end of your original function */ #pragma OPTIMIZE (8)
Target not created.

Parents Reply Children
No data