ICC错误集锦.doc_第1页
ICC错误集锦.doc_第2页
ICC错误集锦.doc_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ICC错误集锦 看懂ICC AVR的报错一、正常编译通过CODE:C:iccbinimakew -f main.mak iccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED应用霓虹灯main.c iccavr -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.lk -lcatmegaDevice 1% full.Done.这是我们最想看到的了,万事大吉。二、工程中未加入.C文件CODE:C:iccbinimakew -f main.mak iccavr -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.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: 1解决办法:将你的程序加入工程中,可以右键程序区ADD to project三、程序没有后缀名,或者后缀名不正确。CODE:C:iccbinimakew -f main.makC:iccbinimakew.exe: main is up to dateDone.这是一个很难理解的错误,它是由工程中的程序文件没有后缀名造成的。解决办法:将原有文件移出工程,将文件的后缀名改为.C,然后再加入工程中。四、没有main函数CODE:C:iccbinimakew -f main.mak iccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED应用霓虹灯main.c iccavr -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.lk -lcatmega!ERROR file crtatmega.o: undefined symbol _mainC:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1解决办法,编写程序主函数MAIN。五、没有选择目标芯片出现如下错误:CODE:C:iccbinimakew -f main.mak iccavr -c -IC:iccinclude -e -l -g -Wa-W D:桌面实验教程LED应用霓虹灯main.c iccavr -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 already contains a valueC:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1解决办法:projectOptionstargetdevice configuration 选择合适的芯片。六、缺少分号CODE:C:iccbinimakew -f main.mak iccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED应用霓虹灯main.c!E D:桌面实验教程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: 1上面的报告说明了第52行缺少一个分号,预期分号的地方出现了“”。解决方法,在52行末尾添加分号。类似的有:缺少的报错 CODE:C:iccbinimakew -f main.mak iccavr -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 void!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.Done: there are error(s). Exit code: 1七:变量没有定义CODE:C:iccbinimakew -f main.mak iccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面实验教程LED应用霓虹灯main.c!E D:桌面实验教程LED应用霓虹灯main.c(48): undeclared identifier iC:iccbinimakew

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论