




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、ICC AVR編譯時常見的錯誤報告新手用ICC編程的時候,經(jīng)常會出現(xiàn)一些錯誤,現(xiàn)在將常見的錯誤報告整理如下:一、正常編譯通過CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面實驗教程LED應(yīng)用霓虹燈main.ciccavr -o main -LC:icclib -g -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:16
2、-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
3、 main.lk -lcatmegaunknown file type main.lk, passed to linker!ERROR unknown file type 'main.lk'C:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1Copy to clipboard解決辦法:將你的程序加入工程中,可以右鍵程序區(qū)>>ADD to project三、程序沒有后綴名,或者后綴名不正確。CODE:C:iccbinimakew -f main.makC:i
4、ccbinimakew.exe: 'main' is up to dateDone.Copy to clipboard這是一個很難理解的錯誤,它是由工程中的程序文件沒有后綴名造成的。解決辦法:將原有文件移出工程,將文件的后綴名改為.C,然后再加入工程中。四、沒有main函數(shù)CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面實驗教程LED應(yīng)用霓虹燈main.ciccavr -o main -LC:icclib -g -ucr
5、tatmega.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 '_main'C:iccbinimakew.exe: Error code 1Done: there are error(s). Exit code: 1Copy to clipboard解決辦法
6、,編寫程序主函數(shù)MAIN。五、沒有選擇目標(biāo)芯片出現(xiàn)如下錯誤:CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -l -g -Wa-W D:桌面實驗教程LED應(yīng)用霓虹燈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 addre
7、ss 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: 1Copy to clipboard解決辦法:project>>Options>>target>>device configuration 選擇合適的芯片。六、缺少分號CODE:C:iccbinimakew -f main.makicc
8、avr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面實驗教程LED應(yīng)用霓虹燈main.c!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(52): unrecognized statement!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(53): syntax error; found ' expecting ;'!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(53): syntax error; found end of input' expecting 'C:
9、iccbinimakew.exe: Error code 1C:iccbinimakew.exe: 'main.o' removed.Done: there are error(s). Exit code: 1Copy to clipboard上面的報告說明了第52行缺少一個分號,預(yù)期分號的地方出現(xiàn)了“”。解決方法,在52行末尾添加分號。類似的有:缺少的報錯CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enhanced D:桌面實驗教程LED應(yīng)
10、用霓虹燈main.c!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(55): illegal statement termination!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(55): skipping void'!W D:桌面實驗教程LED應(yīng)用霓虹燈main.c(55):warning calling function without prototype may cause errors!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(56): syntax error; found ' expecting ;'!E D:桌面實驗教程LED應(yīng)用霓虹燈
11、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: 1Copy to clipboard七:變量沒有定義CODE:C:iccbinimakew -f main.makiccavr -c -IC:iccinclude -e -DATMEGA -DATMega16 -l -g -Mavr_enha
12、nced D:桌面實驗教程LED應(yīng)用霓虹燈main.c!E D:桌面實驗教程LED應(yīng)用霓虹燈main.c(48): undeclared identifier i'C:iccbinimakew.exe: Error code 1C:iccbinimakew.exe: 'main.o' removed.Done: there are error(s). Exit code: 1Copy to clipboard解決辦法:在程序開始前添加變量定義,比如unsigned char i;注意,定義變量要在函數(shù)的最前面進(jìn)行,及在進(jìn)行計算操作之前定義所有變量。第 1 樓 :
13、0; 回復(fù)主題:ICCAVR報錯集錦 發(fā)布時間 : 2008-2-25 下午5:00提問者 : Williams感謝 小飛一凡 提供下面的內(nèi)容。!E touchpad.c(67): unrecognized statement!E touchpad.c(68): syntax error; found void' expecting ;'上一行缺少“;”號所致。!W touchpad.c(325):warning calling function without prototype may c
14、ause errors沒有在頭文件中添加調(diào)用的函數(shù)庫!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):Codeaddress 0x1 already contains a value 沒有選擇芯片型號。!E library(31) area ' te
15、xt' not large enough程序空間不夠。?!E _3Q0.AAA(0): area 'data' not large enough 內(nèi)存不足C:/icc/include/iom8v.h(18): D:icc圓織機程序8.c(288): Macro redefinition of TWBR重復(fù)定義TWBRcalling function without prototype may cause errors沒有extern聲明!E lianxi.o(103): multiple define: '_main'main函數(shù)重復(fù)了,應(yīng)該只能有一個m
16、ain.warning declaring a function without prototype may cause errors函數(shù)原型沒有聲明。你調(diào)用的某個函數(shù)沒有聲明。Ambiguous operators need parentheses 不明確的運算需要用括號括起Ambiguous symbol xxx 不明確的符號Argument list syntax error 參數(shù)表語法錯誤Array bounds missing 丟失數(shù)組界限符Array size toolarge 數(shù)組尺寸太大Bad character in paramenters 參數(shù)中有不適當(dāng)?shù)淖址鸅ad fil
17、e name format in include directive 包含命令中文件名格式不正確Bad ifdef directive synatax 編譯預(yù)處理ifdef有語法錯Bad undef directive syntax 編譯預(yù)處理undef有語法錯Bit field too large 位字段太長Call of non-function 調(diào)用未定義的函數(shù)Call to function with no prototype 調(diào)用函數(shù)時沒有函數(shù)的說明Cannot modify a const object 不允許修改常量對象Case outside of switch 漏掉了case
18、 語句Case syntax errorCase 語法錯誤Code has no effect 代碼不可述不可能執(zhí)行到Compound statement missing 分程序漏掉""Conflicting type modifiers 不明確的類型說明符Constant expression required 要求常量表達(dá)式Constant out of range in comparison 在比較中常量超出范圍Conversion may lose significant digits 轉(zhuǎn)換時會丟失意義的數(shù)字Conversion of near pointer no
19、t allowed 不允許轉(zhuǎn)換近指針Could not find file xxx 找不到XXX文件Declaration missing ; 說明缺少";"小飛一凡(490152151) 12:03:21很多人用它,學(xué)起來資源多. 圣心決(350310876) 12:03:26Declaration syntax error 說明中出現(xiàn)語法錯誤Default outside of switchDefault 出現(xiàn)在switch語句之外Define directive needs an identifier 定義編譯預(yù)處理需要標(biāo)識符Division by zero 用零作除
20、數(shù)Do statement must have whileDo-while語句中缺少while部分Enum syntax error 枚舉類型語法錯誤Enumeration constant syntax error 枚舉常數(shù)語法錯誤Error directive :xxx 錯誤的編譯預(yù)處理命令Error writing output file 寫輸出文件錯誤Expression syntax error 表達(dá)式語法錯誤Extra parameter in call 調(diào)用時出現(xiàn)多余錯誤File name too long 文件名太長Function call missing ) 函數(shù)調(diào)用缺少右
21、括號Fuction definition out of place 函數(shù)定義位置錯誤Fuction should return a value 函數(shù)必需返回一個值Goto statement missing labelGoto語句沒有標(biāo)號Hexadecimal or octal constant too large16進(jìn)制或8進(jìn)制常數(shù)太大Illegal character x 非法字符xIllegal initialization 非法的初始化Illegal octal digit 非法的8進(jìn)制數(shù)字Illegal pointer subtraction 非法的指針相減Illegal struc
22、ture operation 非法的結(jié)構(gòu)體操作Illegal use of floating point 非法的浮點運算Illegal use of pointer 指針使用非法Improper use of a typedefsymbol 類型定義符號使用不恰當(dāng)In-line assembly not allowed 不允許使用行間匯編Incompatible storage class 存儲類別不相容Incompatible type conversion 不相容的類型轉(zhuǎn)換Incorrect number format 錯誤的數(shù)據(jù)格式Incorrect use of defaultDefa
23、ult使用不當(dāng)?shù)?2 樓 : 回復(fù)主題:ICCAVR報錯集錦 發(fā)布時間 : 2008-2-25 下午5:01提問者 : WilliamsInvalid indirection 無效的間接運算Invalid pointer addition 指針相加無效Irreducible expression tree 無法執(zhí)行的表達(dá)式運算Lvalue required 需要邏輯值0或非0值Macro argument syntax error 宏參數(shù)語法錯誤Macro expansion too long 宏
24、的擴(kuò)展以后太長Mismatched number of parameters in definition 定義中參數(shù)個數(shù)不匹配Misplaced break 此處不應(yīng)出現(xiàn)break語句Misplaced continue 此處不應(yīng)出現(xiàn)continue語句Misplaced decimal point 此處不應(yīng)出現(xiàn)小數(shù)點Misplaced elif directive 不應(yīng)編譯預(yù)處理elifMisplaced else 此處不應(yīng)出現(xiàn)elseMisplaced else directive 此處不應(yīng)出現(xiàn)編譯預(yù)處理elseMisplaced endif directive 此處不應(yīng)出現(xiàn)編譯預(yù)處理en
25、difMust be addressable 必須是可以編址的Must take address of memory location 必須存儲定位的地址No declaration for function xxx 沒有函數(shù)xxx的說明No stack 缺少堆棧No type information 沒有類型信息Non-portable pointer assignment 不可移動的指針(地址常數(shù))賦值Non-portable pointer comparison 不可移動的指針(地址常數(shù))比較Non-portable pointer conversion 不可移動的指針(地址常數(shù))轉(zhuǎn)換N
26、ot a valid expression format type 不合法的表達(dá)式格式Not an allowed type 不允許使用的類型Numeric constant too large 數(shù)值常太大Out of memory 內(nèi)存不夠用Parameter xxx is never used 能數(shù)xxx沒有用到Pointer required on left side of -> 符號->的左邊必須是指針Possible use of xxx before definition 在定義之前就使用了xxx(警告)Possibly incorrect assignment 賦值可
27、能不正確Redeclaration of xxx 重復(fù)定義了xxxRedefinition of xxx is not identicalxxx的兩次定義不一致Register allocation failure 寄存器定址失敗Repeat count needs an lvalue 重復(fù)計數(shù)需要邏輯值Size of structure or array not known 結(jié)構(gòu)體或數(shù)給大小不確定Statement missing ; 語句后缺少";"Structure or union syntax error 結(jié)構(gòu)體或聯(lián)合體語法錯誤Structure size too
28、 large 結(jié)構(gòu)體尺寸太大Sub scripting missing 下標(biāo)缺少右方括號Superfluous & with function or array 函數(shù)或數(shù)組中有多余的"&"Suspicious pointer conversion 可疑的指針轉(zhuǎn)換Symbol limit exceeded 符號超限Too few parameters in call 函數(shù)調(diào)用時的實參少于函數(shù)的參數(shù)不Too many default casesDefault太多(switch語句中一個)Too many error or warning messages 錯誤或警告信息太多Too many type in declaration 說明中類型太多Too much auto memory in function 函數(shù)用到的局部存儲太多Too much global data defined in file 文件中全局?jǐn)?shù)據(jù)太多Two consecutive dots 兩個連續(xù)的句點Type mismatch in parameter xxx 參數(shù)xxx類型不匹配Type mismatch in redeclaration of xxx
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)院收費合同范本
- 農(nóng)體產(chǎn)品加工合同范本
- 醫(yī)院制氧機采購合同范本
- 絲接頭采購合同范本
- 公司買賣合同范本
- 買賣小商鋪合同范本
- 企業(yè)房產(chǎn)轉(zhuǎn)讓合同范本
- 單位考察合同范本
- 信息化合同范本
- 公司不執(zhí)行合同范本
- 風(fēng)電項目施工進(jìn)度計劃
- 芙蓉鎮(zhèn)足球協(xié)會成立申請書
- 鍘草機設(shè)備更新項目資金申請報告-超長期特別國債投資專項
- 急性呼吸窘迫綜合征-課件
- DB14∕T 1319-2016 公路工程標(biāo)準(zhǔn)工程量清單及計量規(guī)范
- 《黃金介紹》課件
- 2024年吉林省中考語文真題版有答案
- CHT 8023-2011 機載激光雷達(dá)數(shù)據(jù)處理技術(shù)規(guī)范(正式版)
- 第一單元 位置與方向(一)(單元測試)-2023-2024學(xué)年三年級下冊數(shù)學(xué)人教版
- 如何在小學(xué)語文教學(xué)中落實單元語文要素
- 《第四章多彩的光》復(fù)習(xí)課件
評論
0/150
提交評論