文档库 最新最全的文档下载
当前位置:文档库 › IAR编译问题

IAR编译问题

IAR编译问题
IAR编译问题

Error[Pe020]: identifier "ccc" is undefined C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 63

问题:红色部分没有定义,黄色部分是路径,63是行数。

解决:先定义ccc后使用。

Fatal Error[Lc002]: could not open file "C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\..\stm32f10x_flash.icf"

问题:找不到黄色路径中的文件。

解决:查找下图中路径设置是否正确。

Warning[Pa084]: pointless integer comparison, the result is always false C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 219

问题:警告条件判断结果一直是假。比如:unsigned char i = 0;if(i > 0xFF){}

Error[Pe513]: a value of type "int *" cannot be assigned to an entity of type "char *" C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 219

问题:两个类型不一样,不能直接赋值。

解决:

Warning[Pe223]: function "spi_config" declared implicitly C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 216

问题:红色部分没有声明或在其它地方声明过,但是main.c没有引用。

解决:如果此函数在其它文件声明过,那么在使用前声明下extern void spi_config(void);红色字体要与函数声明时保持一致,或者包含声明函数的头文件,#include "xxx.h"。

Warning[Pa093]: implicit conversion from floating point to integer C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 220

问题:float类型赋值给int类型。

Warning[Pe047]: incompatible redefinition of macro "SINGLE_ROW_NUM" (declared at line 27) C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.h 29

问题:相同的宏定义并且定义不同。

Error[Pe029]: expected an expression C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 207

问题:有格式问题,比如多了

一个括号。

Error[Pe018]: expected a ")" C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 207

Error[Pe067]: expected a "}" C:\Documents and Settings\Administrator\桌面\ECG1200G-Printer-stm32\user\main.c 271

问题:缺少成对的括号。如

问题:在main.h中定义了一个变量aaaa,此时由main.c、init.c、printer.c、stm32f10x_it.c中都包含此头文件时,就会出现此重复定义问题。解决:

声明此变量是main.c文件中的变量,其他*.c文件引用时都是外部变量。

相关文档