Error[Pe077]:
this declaration has no storage class or type specifier
不同的版本,就有不同的写法,就像环境不一样,中断函数的名字也不一样,我遇到过这样的情况(两个不同版本下定时器初始化时寄存器的名称不同). 如I/O口中断函数的名的两种版本:
版本1:interrupt[PORT2_VECTOR] void PORT2 (void)
版本2:#pragma vector=PORT1_VECTOR __interrupt void PORT1_ISR (void) 2012.2.x UESTC
8Q:
Error[Pe136]:
struct \Instruments\\ZStack-1.4.3-1.2.1\\Projects\\zstack\\Samples\\SampleApp\\Source\\SampleApp.c 417
//--------------------------------------------// afAddrType_t dstAddr;
dstAddr.addrMode = afAddrBroadcast;
dstAddr.addr.shortAddr = 0xFFFF; // 广播发送 cdwxl
dstAddr.endpoint = SAMPLEAPP_ENDPOINT; //error所在 //--------------------------------------------// A:
我们看看afAddrType_t这个结构就明白错在哪里了。 typedef struct { union {
uint16 shortAddr; } addr;
afAddrMode_taddrMode; byteendPoint; } afAddrType_t;
居然是 endPoint 大小写错误,Ω 。 9Q:
我最开始也是IAR仿真时找不到main函数, 显示:
Fri Jun 11 14:37:00 2010: Error (col 1): Unknown or ambiguous symbol. main Fri Jun 11 14:37:01 2010: Error (col 1): Unknown or ambiguous symbol. main Fri Jun 11 14:37:01 2010: Couldn't go to 'main'.
之后在project==>options==>linker里面的format设成debug,没有这个问题了,但是 程序又不能通过TI的那个Flash Programmer下载到板子里了,说是Could not open specified HEX file A:
这个烧录工具只认release code. 而且扩展名必须是.hex。 所以要用这个烧录工具来烧录必须做两件事: 1. output file设为release version
2. output file 扩展名改为.hex, 默认的是.a51
测试学习阶段可以不用.但产品量产就必须生成二进制文件. 同时programmer还有些其它的功能会常用的
Error[Pe142]: expression must have pointer-to-object type
表达式两边的类型不一样。2012.2.x uestc 例如:
“编译的错误是指第一个?*?的后面应该是指针,却给了是非指针表达式。
如果p是个指针,那么*(p+i)是p后面第i个域或单元的元素,这个域与p所指的变量类型有关,
也就是说'*(p+i)+j'是数,而非指针。与*结合就错了。 ” http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=931945
C++的该错误:
http://efreedom.com/Question/1-4943607/Expression-Must-Pointer-Object-Type-Subscript-Requires-Array-Pointer-Type Error[Pe148]:
variable \
\=0; \声明可外部调用需要赋值
Error[Pe159]: declaration is incompatible with previous
没加头文件,或者主函数内有子函数,而子函数定义在主函数后边而木有在主函数前声明一下。
Error[Pe169]: expected a declaration 错误原因可能性: 1、void read_gprs_return(); { …… }
定义函数的时候,结尾多了一个分号:;。
Error[Pe852]:
Error[Pe852]:expression must be a pointer to a complete object type
Error[Pe260]:
explicit type is missing (\桌面\\下位机\\塔吊防碰撞系统1.1版(SIM908 倾角查询)\\5438A塔吊防碰撞1.1\\LCD(SmallFonts).c 898
问题例子1:定义一个函数,落了红字部分声明
void DrawSector(int x,int y,int R1,int R2,float Ds ,float De,int fill,uchar color) {
…… }
11Q:Error[Pe513]:
a value of type \\
Instruments\\ZStack-1.4.3-1.2.1\\Components\\stack\\sapi\\sapi.c 968
A:估计是一个函数本没有返回值即void类型,而你却将这个函数赋给了一个int型变量了。。 static rxCB( uint8 port,uint8 event )改为 static void rxCB( uint8 port,uint8 event ) 12Q:
Fatal Error[e72]: Segment BANK_RELAYS must be defined in a segment definition option (-Z, -b or -P) A:
使用无线龙的串口互发,发现上述错误,原因是版本太高,具体原因不清,下载一下7.20H就可以了
Fatal Error[e89]: Too much object code produced (more than 0x1000 bytes) for this package 是4K限制版,请使用有非限制版的。
IAR常见错误请先从如下几方面入手: 1序列号是否正确。
2使用版本是否正确,应该使用7.30B打开的工程文件不能使用7.20H打开。 3尽量不要使用中文路径。
4ZigBee协议栈文件夹需要放在IAR安装盘根目录下。 5请确定当前编译文件夹是否具有读写权限。 6使用的版本是否是限制版
Fatal Error[Pe005]: could not open source file \这是什么原因?谢谢了
是因为头文件路径不对造成,改正的方法是在设置选项卡的C/C++ Compiler -> Preprocessor选项里,将$TOOLKIT_DIR$\\INC\\CLIB\\添到Include paths中。($TOOLKIT_DIR$指IAR的安装路径,一般用到标准库函数时要将它写入Include paths里面)
Fatal Error[Pe005]: could not open source file \例子程序\\无线通信综合测试\\Library\\cc2430\\HAL\\source\\setTimer34Period.c 7
先检查 C:\\Users\%user\\Desktop\\例子程序\\无线通信综合测试\\Library\\cc2430\\HAL\\source\\有无setTimer34Period.c 这个文件,若有,则是因为IAR对中文路径支持不好的缘故,你把这个工程复制到全英文路径下编译应该就不会报错了。 Fatal Error[Pe1696]: cannot open source file \注意config.h 存放的位置,最好与main同处于一个文件夹 15Q:
Fatal Error[Cp001]:
Copy protection check, No valid license found for this product [24] XP下装的IAR,到了Win7下出来的问题。
A:这个问题是使用注册机带来的,系统换了,本机ID也要改了。
、、单击IARID.EXE得到本机的ID号
、、右键点Key.cmd,选择编辑,打开,将ID修改为本机ID
、、运行KEY.cmd,在key.txt中的含有EW8051-EV的序列号就是7.30的序列号 16Q:
在用iar debug 下载进已有程序板子出现的 A:将核心板与扩展板分开,只烧写核心板。 17Q:
A:自小峰关于协议栈XDATA溢出的小结 (1)减小程序;
(2)把配置文件f8w2430.xcl/f8w2430pm.xcl中的-D_CODE_END改大点: ******************** f8w2430.xcl:
// CODE //
// These settings determine the size/location of the ROOT segment. // Increase _CODE_END to increase ROOT memory, i.e. for constants. -D_CODE_START=0x0000 // Code size = 128k for CC2430-F128 -D_CODE_END=0x4000 // Last address for ROOT bank ******************** f8w2430pm.xcl:
// CODE //
// These settings determine the size/location of the ROOT segment. // Increase _CODE_END to increase ROOT memory, i.e. for constants. -D_CODE_START=0x0000 // Code size = 128k for CC2430-F128 -D_CODE_END=0x29FF //(原0x28FF) Last address for ROOT bank
Warning[Pe001]: last line of file ends without a newline F:\\emoTion\\IAR\\PK升级\\CC1110-8\\main.c 179 A:
在使用IAR时常常会弹出类似这样一个警告,其实只要在最后一行多加一个回车就不会再有这个警告了. 6Q:
在编写一个串口程序时:编译没有错,但MAKE时就出现下面的错误