kei编译时的错误

[复制链接]
2145|1
 楼主| pkat 发表于 2011-10-28 14:55 | 显示全部楼层 |阅读模式
keil编译时,提示入下错误:(我估计不应该是程序的错误,不知道哪里没有设置正确)

Build target 'Target 1'
assembling STARTUP.A51...
compiling Lcd.c...
C51 FATAL-ERROR -
  ACTION:     GOBAL OPTIMIZATION
  FUNCTION:   _ChineseChar
  ERROR:      CANNOT OPTIMIZE FUNCTION
COMPILATION TERMINATED.
use the following work-around:
  #pragma OPTIMIZE (7)
           /* your original function        */
    _ChineseChar ()  {
       ....
    }
           /* end of your original function */
  #pragma OPTIMIZE (8)
Target not created



源程序如下,
//显示一个16x16汉字
void ChineseChar(uint x, uint y, uint For_color, uint Bk_color )
{
   uchar temp;
   uchar pos,t;
   uchar CHAR_W,CHAR_H;
   CHAR_W=16;
   CHAR_H=16;
   LCD_SetRamAddr(x,x+CHAR_W-1,y,y+CHAR_H-1);
   for(pos=0;pos<32;pos++)
     {
    temp=hz16_1[pos];
    for(t=0;t<8;t++)
      {
    if(temp&0x80)
       LCD_Wirte_Data16(For_color);  //textcolor
       else
       LCD_Wirte_Data16(Bk_color);   //backcolor
          temp<<=1;
   }
  }
}
米其林r 发表于 2011-10-30 18:37 | 显示全部楼层
不懂这是啥错误了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

196

主题

2726

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部