在icc AVR7.22中碰到了这个问题,百度了一下,有网友碰到了和我一样的问题,试了几个网上的解决方法没用。(把const改为flash、去掉#pragma data:code)我在6.23版本里放进同样的程序也没有解决。不知道那位大侠遇过同样的问题,怎么解决的?
源程序显示错误处
#pragma data:code
//#define BEEP() PORTD^=BIT(PD7) //蜂鸣器
//0-9,A-F的数码管段码
const table[]=
{
0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,
0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71,0
};
这是出现的警告和错误。
C:\iccv7avr\bin\imakew -f 09.mak
iccavr -c -e -D__ICC_VERSION=722 -D_EE_EXTIO -DATMega1280 -l -g -MLongJump -MHasMul -MEnhanced -Wf-use_elpm 09.c
!W E:\avrstudy\099\09.c(26):[warning] old-style function definition for `Key_press'
!W E:\avrstudy\099\09.c(50):[warning] old-style function definition for `Keys_Scan'
!W E:\avrstudy\099\09.c(52):[warning] calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
!W E:\avrstudy\099\09.c(53):[warning] calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
!W E:\avrstudy\099\09.c(146):[warning] old-style function definition for `main'
!W E:\avrstudy\099\09.c(152):[warning] calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
!W E:\avrstudy\099\09.c(154):[warning] calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
!E 09.s(7): cannot initialize RAM area
C:\iccv7avr\bin\imakew.exe: Error code 1
C:\iccv7avr\bin\imakew.exe: '09.o' removed.
Done: there are error(s). Exit code: 1. Wed Jun 15 22:19:17 2011 |