icc avr编译时常见的错误报告

上传人:第*** 文档编号:33537846 上传时间:2018-02-15 格式:DOCX 页数:9 大小:19.71KB
返回 下载 相关 举报
icc avr编译时常见的错误报告_第1页
第1页 / 共9页
icc avr编译时常见的错误报告_第2页
第2页 / 共9页
icc avr编译时常见的错误报告_第3页
第3页 / 共9页
icc avr编译时常见的错误报告_第4页
第4页 / 共9页
icc avr编译时常见的错误报告_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《icc avr编译时常见的错误报告》由会员分享,可在线阅读,更多相关《icc avr编译时常见的错误报告(9页珍藏版)》请在金锄头文库上搜索。

1、ICC AVR 编译时常见的错误报告新手用 ICC 编程的时候,经常会出现一些错误,现在将常见的错误报告整理如下:一、正常编译通过CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED 应用霓虹灯 main.ciccavr -o main -LC:icclib -g -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_siz

2、e:16 -beeprom:1.512 -fihx_coff -S2 main.lk -lcatmegaDevice 1% full.Done.Copy to clipboard这是我们最想看到的了,万事大吉。二、工程中未加入.C 文件CODE:C:iccbinimakew -f main.makiccavr -o main -LC:icclib -g -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:16 -beeprom:1.512 -fihx_coff -S2 main.

3、lk -lcatmegaunknown file type main.lk, passed to linker!ERROR unknown file type main.lkC:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1Copy to clipboard解决办法:将你的程序加入工程中,可以右键程序区ADD to project三、程序没有后缀名,或者后缀名不正确。CODE:C:iccbinimakew -f main.makC:iccbinimakew.exe: main is up to dateD

4、one.Copy to clipboard这是一个很难理解的错误,它是由工程中的程序文件没有后缀名造成的。解决办法:将原有文件移出工程,将文件的后缀名改为.C,然后再加入工程中。四、没有 main 函数CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED 应用霓虹灯 main.ciccavr -o main -LC:icclib -g -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end

5、:0x45f -bdata:0x60.0x45f -dhwstk_size:16 -beeprom:1.512 -fihx_coff -S2 main.lk -lcatmega!ERROR file crtatmega.o: undefined symbol _mainC:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1Copy to clipboard解决办法,编写程序主函数 MAIN。五、没有选择目标芯片出现如下错误:CODE:C:iccbinimakew -f main.makiccavr -c -I

6、C:iccinclude -e -l -g -Wa-W D:桌面 实验教程LED 应用霓虹灯main.ciccavr -o main -LC:icclib -g -Wl-W -bfunc_lit:0.0x2000 -dram_end:0x25f -bdata:0x60.0x25f -dhwstk_size:16 -beeprom:1.512 -fihx_coff -S2 main.lk!E C:icclibcrtAVR.o(41): Code address 0 already contains a value!E C:icclibcrtAVR.o(41): Code address 0x1

7、already contains a valueC:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1Copy to clipboard解决办法:projectOptionstargetdevice configuration 选择合适的芯片。六、缺少分号CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED 应用霓虹灯 main.c!E D:

8、桌面实验教程LED 应用霓虹灯main.c(52): unrecognized statement!E D:桌面实验教程LED 应用霓虹灯main.c(53): syntax error; found expecting ;!E D:桌面实验教程LED 应用霓虹灯main.c(53): syntax error; found end of input expecting C:iccbinimakew.exe: Error code 1C:iccbinimakew.exe: main.o removed.Done: there are error(s). Exit code: 1Copy to

9、clipboard上面的报告说明了第 52 行缺少一个分号,预期分号的地方出现了“”。解决方法,在 52 行末尾添加分号。类似的有:缺少的报错CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED 应用霓虹灯 main.c!E D:桌面实验教程LED 应用霓虹灯main.c(55): illegal statement termination!E D:桌面实验教程LED 应用霓虹灯main.c(55): skipping voi

10、d!W D:桌面 实验教程LED 应用霓虹灯main.c(55):warning calling function without prototype may cause errors!E D:桌面实验教程LED 应用霓虹灯main.c(56): syntax error; found expecting ;!E D:桌面实验教程LED 应用霓虹灯main.c(57): syntax error; found end of input expecting C:iccbinimakew.exe: Error code 1C:iccbinimakew.exe: main.o removed.Don

11、e: there are error(s). Exit code: 1Copy to clipboard七:变量没有定义CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED 应用霓虹灯 main.c!E D:桌面实验教程LED 应用霓虹灯main.c(48): undeclared identifier iC:iccbinimakew.exe: Error code 1C:iccbinimakew.exe: main.o re

12、moved.Done: there are error(s). Exit code: 1Copy to clipboard解决办法:在程序开始前添加变量定义,比如 unsigned char i;注意,定义变量要在函数的最前面进行,及在进行计算操作之前定义所有变量。第 1 楼 : 回复主题:ICCAVR 报错集锦 发布时间 : 2008-2-25 下午 5:00提问者 : Williams感谢 小飞一凡 提供下面的内容。!E touchpad.c(67): unrecognized statement!E touchpad.c(68): syntax error; found void exp

13、ecting ;上一行缺少“;”号所致。!W touchpad.c(325):warning calling function without prototype may cause errors 没有在头文件中添加调用的函数库!E E:ICCAVRiccuser001main.c(100): undeclared identifier temp错误:变量temp未声明!E D:iccavr6.31.AicclibcrtAVR.(41):Codeaddress 0 already contains a value !E D:iccavr6.31.AicclibcrtAVR.(41):Codea

14、ddress 0x1 already contains a value 没有选择芯片型号。!E library(31) area text not large enough 程序空间不够。?!E _3Q0.AAA(0): area data not large enough 内存不足C:/icc/include/iom8v.h(18): D:icc 圆织机程序8.c(288): Macro redefinition of TWBR 重复定义 TWBRcalling function without prototype may cause errors 没有 extern 声明!E lianxi

15、.o(103): multiple define: _mainmain 函数重复了,应该只能有一个 main.warning declaring a function without prototype may cause errors 函数原型没有声明。你调用的某个函数没有声明。Ambiguous operators need parentheses 不明确的运算需要用括号括起Ambiguous symbol xxx 不明确的符号Argument list syntax error 参数表语法错误Array bounds missing 丢失数组界限符Array size toolarge 数组尺寸太大Bad character in paramenters 参数中有不适当的字符Bad file name format in include directive 包含命令中文件名格式不正确Bad ifdef directive synatax 编译预处理 ifdef 有语法错Bad undef directive syntax 编译预处理 undef 有语法错

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号