KEIL軟件錯誤代碼與錯誤信息_第1頁
KEIL軟件錯誤代碼與錯誤信息_第2頁
KEIL軟件錯誤代碼與錯誤信息_第3頁
KEIL軟件錯誤代碼與錯誤信息_第4頁
已閱讀5頁,還剩22頁未讀, 繼續(xù)免費閱讀

付費下載

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、.錯誤代碼及錯誤信息錯誤釋義error 1: Out of memory內(nèi)存溢出error 2: Identifier expected缺標識符error 3: Unknown identifier未定義的標識符error 4: Duplicate identifier重復定義的標識符error 5: Syntax error語法錯誤error 6: Error in real constant實型常量錯誤error 7: Error in integer constant整型常量錯誤error 8: String constant exceeds line字符串常量超過一行error 10:

2、 Unexpected end of file文件非正常結束error 11: Line too long行太長error 12: Type identifier expected未定義的類型標識符error 13: Too many open files打開文件太多error 14: Invalid file name無效的文件名error 15: File not found文件未找到error 16: Disk full 磁盤滿error 17: Invalid compiler directive無效的編譯命令error 18: Too many files文件太多error 19:

3、Undefined type in pointer def指針定義中未定義類型error 20: Variable identifier expected缺變量標識符error 21: Error in type類型錯誤.專業(yè)專注.error 22: Structure too large結構類型太長error 23: Set base type out of range集合基類型越界error 24: File components may not be files or objectsfile分量不能是文件或對象error 25: Invalid string length無效的字符串長度

4、error 26: Type mismatch類型不匹配error 27 :error 27 : Invalid subrange base type無效的子界基類型error 28 :Lower bound greater than upper bound下界超過上界error 29 :Ordinal type expected缺有序類型error 30 :Integer constant expected缺整型常量error 31 :Constant expected 缺常量error 32 :Integer or real constant expected缺整型或實型常量error 3

5、3 :Pointer Type identifier expected缺指針類型標識符error 34:Invalid function result type無效的函數(shù)結果類型error 35:Label identifier expected缺標號標識符error 36 :BEGIN expected缺 BEGINerror 37 :END expected缺 END.專業(yè)專注.error 38 :Integer expression expected缺整型表達式error 39 :Ordinal expression expected缺有序類型表達式error 40 :Boolean e

6、xpression expected缺布爾表達式error 41 :Operand types do not match操作數(shù)類型不匹配error 42 :Error in expression表達式錯誤error 43 :Illegal assignment非法賦值error 44:Field identifier expected缺域標識符error 45:Object file too large目標文件太大error 46 :Undefined external未定義的外部過程與函數(shù)error 47:Invalid object file record無效的 OBJ 文件格式error

7、 48 :Code segment too large代碼段太長error 49 :Data segment too large數(shù)據(jù)段太長error 50:DO expected 缺 DOerror 51 :Invalid PUBLIC definition無效的 PUBLIC 定義error 52 :Invalid EXTRN definition無效的 EXTRN 定義error 53: Too many EXTRN definitions太多的 EXTRN 定義error 54 :OF expected 缺 OFerror 55:INTERFACE expected 缺 INTERFAC

8、Eerror 56:Invalid relocatable reference無效的可重定位引用error 57:THEN expected 缺 THENerror 58:TO or DOWNTO expected缺 TO 或 DOWNTO.專業(yè)專注.error 59 :Undefined forward提前引用未經(jīng)定義的說明error 61:Invalid typecast無效的類型轉換error 62 :Division by zero被零除error 63:Invalid file type無效的文件類型error 64 :Cannot read or write variables o

9、f this type不能讀寫此類型變量error 65 :Pointer variable expected缺指針類型變量error 66 :String variable expected缺字符串變量error 67 :String expression expected缺字符串表達式error 68 :Circular unit reference單元 UNIT 部件循環(huán)引用error 69 :Unit name mismatch單元名不匹配error 70 :Unit version mismatch單元版本不匹配error 71:Internal stack overflow內(nèi)部堆棧

10、溢出error 72:Unit file format error單元文件格式錯誤error 73 :IMPLEMENTATION expected缺IMPLEMENTATIONerror 74 :Constant and case types do not match常量和CASE 類型不匹配error 75 :Record or object variable expected缺記錄或對象變量error 76 :Constant out of range常量越界.專業(yè)專注.error 77 :File variable expected缺文件變量error 78 :Pointer expr

11、ession expected缺指針表達式error 79 :Integer or real expression expected缺整型或實型表達式error 80:Label not within current block標號不在當前塊內(nèi)error 81:Label already defined標號已定義error 82:Undefined label in preceding statement part在前面未定義標號error 83 :Invalid argument無效的 參數(shù)error 84 :UNIT expected 缺 UNITerror 85: ""

12、; expected缺“;”error 86 : ":" expected缺“:”error 87 : "," expected缺“,”error 88 : "(" expected缺“(”error 89 : ")" expected缺“)”error 90 : "=" expected缺“ =”error 91: ":=" expected 缺 “ := ”error 92: "" or "(." Expected缺“或”“( .

13、”error 93: "" or ".)" expected缺“或”“ . )”error 94: "." expected缺“.”error 95: "." expected缺“ .”error 96:Too many variables變量太多.專業(yè)專注.error 97 :Invalid FOR control variable無效的 FOR 循環(huán)控制變量error 98 :Integer variable expected缺整型變量error 99 :Files and procedure types ar

14、e not allowed here該處不允許文件和過程類型error 100 : String length mismatch字符串長度不匹配error 101: Invalid ordering of fields無效域順序error 102: String constant expected缺字符串常量error 103: Integer or real variable expected缺整型或實型變量error 104: Ordinal variable expected缺有序類型變量error 105 : INLINE error INLINE 錯誤error 106 : Char

15、acter expression expected缺字符表達式error 107 : Too many relocation items重定位項太多error 108: Overflow in arithmetic operation算術運算溢出error 112 : CASE constant out of range CASE常量越界error 113: Error in statement 表達式錯誤error 114: Cannot call an interrupt procedure不能調用中斷過程error 116 : Must be in 8087 mode to compil

16、e this必須在8087 模式編譯.專業(yè)專注.error 117 : Target address not found找不到目標地址error 118 : Include files are not allowed here該處不允許INCLUDE 文件error 119: No inherited methods are accessible here該處繼承方法不可訪問error 121: Invalid qualifier 無效的限定符error 122: Invalid variable reference無效的變量引用error 123 : Too many symbols 符號太

17、多error 124: Statement part too large語句體太長error 126 : Files must be var parameters文件必須是變量形參error 127 : Too many conditional symbols條件符號太多error 128: Misplaced conditional directive條件指令錯位error 129 : ENDIF directive missing 缺 ENDIF 指令error 130: Error in initial conditional defines初始條件定義錯誤error 131: Head

18、er does not match previous definition和前面定義的過程或函數(shù)不匹配error 133 : Cannot evaluate this expression不能計算該表達式error 134 : Expression incorrectly terminated表達式錯誤結.專業(yè)專注.束error 135 : Invalid format specifier無效格式說明符error 136 : Invalid indirect reference無效的間接引用error 137 : Structured variables are not allowed her

19、e該處不允許結構變量error 138 : Cannot evaluate without System unit沒有System 單元不能計算error 139 : Cannot access this symbol不能存取符號error 140: Invalid floating point operation無效的符號運算error 141 : Cannot compile overlays to memory不能編譯覆蓋模塊至內(nèi)存error 142: Pointer or procedural variable expected缺指針或過程變量error 143: Invalid pr

20、ocedure or function reference無效的過程或函數(shù)調用error 144: Cannot overlay this unit不能覆蓋該單元error 146: File access denied 不允許文件訪問error 147: Object type expected缺對象類型error 148: Local object types are not allowed不允許局部對象類型error 149 : VIRTUAL expected缺 VIRTUALerror 150: Method identifier expected缺方法標識符.專業(yè)專注.error

21、151: Virtual constructors are not allowed不允許虛構造函數(shù)error 152: Constructor identifier expected缺構造函數(shù)標識符error 153: Destructor identifier expected缺析構函數(shù)標識符error 154: Fail only allowed within constructors只能在構造函數(shù)內(nèi)使用Fail 標準過程error 155 : Invalid combination of opcode and operands操作數(shù)與操作符無效組合error 156 : Memory r

22、eference expected缺內(nèi)存引用指針error 157 : Cannot add or subtract relocatable symbols不能加減可重定位符號error 158 : Invalid register combination無效寄存器組合error 159 : 286/287 instructions are not enabled未激活286/287 指令error 160 : Invalid symbol reference無效符號指針error 161 : Code generation error代碼生成錯誤error 162 : ASM expecte

23、d缺 ASMerror 166 : Procedure or function identifier expected缺過程或函數(shù)標識符error 167 : Cannot export this symbol不能輸出該符號.專業(yè)專注.error 168 : Duplicate export name外部文件名重復error 169 : Executable file header too large可執(zhí)行文件頭太長error 170 : Too many segments段太多一、 運行錯誤信息運行錯誤分為四類 :1-99 為 DOS 錯誤;100-149 為 I/O 錯誤,發(fā)生 I/O 后

24、,如果使用了編譯開關 $I+ ,程序將終止執(zhí)行 ,否則編譯開關為 $I- ,程序繼續(xù)執(zhí)行 ,并由 IOResult 函數(shù)返回錯誤信息 ; 150-199 為嚴重錯誤 , 200-255 為致命錯誤 ,致命錯誤將立即終止程序執(zhí)行 。錯誤代碼及錯誤信息錯誤釋義error 1 : Invalid function number無效函數(shù)號error 2 : File not found文件未找到error 3: Path not found找不到路徑error 4: Too many open files打開文件太多error 5: File access denied文件不允許訪問error 6:

25、Invalid file handle無效文件句柄error 12 :Invalid file access code無效文件存取代碼.專業(yè)專注.error 15 :Invalid drive number無效驅動器號error 16 :Cannot remove current directory不能刪除當前目錄error 17 :Cannot rename across drives不能跨驅動器改名error 18 :No more files 沒有文件了error 100: Disk read error讀磁盤錯error 101: Disk write error寫磁盤錯error 1

26、02: File not assigned文件變量未賦值error 103: File not open 文件未打開error 104: File not open for input文件未打開為寫方式error 105: File not open for output文件未打開為讀方式error 106: Invalid numeric format無效數(shù)值格式error 150: Disk is write-protected磁盤寫保護error 151: Bad drive request struct length錯誤的驅動器請求結構長度error 152: Drive not re

27、ady驅動器未準備好error 154 : CRC error in data數(shù)據(jù) CRC 校驗錯error 156: Disk seek error磁盤定位錯error 157 : Unknown media type未知的介質類型error 158 : Sector Not Found找不到扇區(qū)error 159: Printer out of paper打印機缺紙error 160: Device write fault設備寫錯誤.專業(yè)專注.error 161 : Device read fault設備讀錯誤error 162 : Hardware failure硬件故障error 20

28、0 : Division by zero被零除error 201 : Range check error范圍檢查出錯error 202: Stack overflow error棧溢出error 203: Heap overflow error堆溢出error 204: Invalid pointer operation無效的指針操作error 205: Floating point overflow浮點運算上溢error 206: Floating point underflow浮點運算下溢error 207: Invalid floating point operation無效的浮點運算e

29、rror 208: Overlay manager not installed未安裝覆蓋管理程序error 209: Overlay file read error讀覆蓋文件錯誤error 210: Object not initialized對象未初始化error 211: Call to abstract method調用抽象方法error 212: Stream registration error流注 _冊錯誤error 213: Collection index out of range集合下標越界error 214: Collection overflow error集合上溢err

30、or 215: Arithmetic overflow error算術運算上溢error 216: General Protection fault一般保護性錯誤.專業(yè)專注.keil c 編譯器錯誤與解決方法1. Warning280: i :unreferenlocaledvariable說明局部變量i 在函數(shù)中未作任何的存取操作解決方法消除函數(shù)中 i 變量的宣告2 Warning206: Music3 :missingfunction-prototype說明 Music3( ) 函數(shù)未作宣告或未作外部宣告所以無法給其他函數(shù)調用解決方法將敘述void Music3(void)寫在程序的最前端

31、作宣告如果是其他文件的函數(shù)則要寫成 extern void Music3(void),即作外部宣告3 Compling :C:8051MANN.CError:318:canopentfile beep.h說明在編譯C:8051MANN.C程序過程中由于main.c 用了指令 i nclude“beep.h ”,但卻找不到所致解決方法編寫一個beep.h 的包含檔并存入到c:8051的工作目錄中4 Compling:C:8051LED.CError 237: LedOn :functionalready has a body.專業(yè)專注.說明 LedOn( ) 函數(shù)名稱重復定義即有兩個以上一樣的函

32、數(shù)名稱解決方法修正其中的一個函數(shù)名稱使得函數(shù)名稱都是獨立的5 *WARNING 16:UNCALLED SEGMENT,IGNORED FOR OVERLAY PROCESSSEGMENT: ?PR?_DELAYX1MS?DELAY說明 DelayX1ms( ) 函數(shù)未被其它函數(shù)調用也會占用程序記憶體空間解決方法去掉DelayX1ms( ) 函數(shù)或利用條件編譯#if .#endif,可保留該函數(shù)并不編譯6 *WARNING 6 :XDATA SPACE MEMORY OVERLAP FROM : 0025HTO: 0025H說明外部資料ROM 的 0025H 重復定義地址解決方法外部資料ROM

33、 的定義如下Pdata unsigned char XFR_ADC _at_0x25其中 XFR_ADC變量的名稱為0x25,請檢查是否有其它的變量名稱也是定義在0x25 處并修正它7 WARNING206: DelayX1msmissing:function-prototypeC:8051INPUT.C.專業(yè)專注.Error 267: DelayX1ms :requiresANSI-style prototype C:8051INPUT.C說明程序中有調用DelayX1ms 函數(shù)但該函數(shù)沒定義即未編寫程序內(nèi)容或函數(shù)已定義但未作宣告解決方法編寫DelayX1ms 的內(nèi)容編寫完后也要作宣告或作外

34、部宣告可在 delay.h 的包含檔宣告成外部以便其它函數(shù)調用8 *WARNING 1:UNRESOLVED EXTERNAL SYMBOLSYMBOL:MUSIC3MODULE:C:8051MUSIC.OBJ(MUSIC)*WARNING 2:REFERENCE MADE TO UNRESOLVED EXTERNALSYMBOL:MUSIC3MODULE:C:8051MUSIC.OBJ(MUSIC)ADDRESS:0018H說明程序中有調用MUSIC 函數(shù)但未將該函數(shù)的含擴檔C 加入到工程檔 Prj 作編譯和連接解決方法設MUSIC3 函數(shù)在 MUSIC C 里將 MUSIC C 添加到工程

35、文件中去.專業(yè)專注.9 *ERROR 107:ADDESS SPACE OVERFLOW SPACE: DATASEGMENT: _DATA_GOUP_LENGTH: 0018H*ERROR 118: REFERENCE MADE TO ERRONEOUS EXTERN ALSYMBOL: VOLUMEMODULE: C:8051OSDM.OBJ (OSDM)ADDRESS: 4036H說明 data 存儲空間的地址范圍為00x7f, 當公用變量數(shù)目和函數(shù)里的局部變量如果存儲模式設為SMALL 則局部變量先使用工作寄存器R2R7 作暫存當存儲器不夠用時則會以 data 型別的空間作暫存的個數(shù)超

36、過 0x7f 時就會出現(xiàn)地址不夠的現(xiàn)象解決方法將以 data 型別定義的公共變量修改為 idata 型別的定義10.*WARNING L15: MULTIPLE CALL TO SEGMENTSEGMENT: ?PR?_WRITE_GMVLX1_REG?D_GMVLX1CALLER1: ?PR?VSYNC_INTERRUPT?MAINCALLER2: ?C_C51STARTUP.專業(yè)專注.*WARNING L15: MULTIPLE CALL TO SEGMENTSEGMENT: ?PR?_SPI_SEND_WORD?D_SPICALLER1: ?PR?VSYNC_INTERRUPT?MAIN

37、CALLER2: ?C_C51STARTUP*WARNING L15: MULTIPLE CALL TO SEGMENTSEGMENT: ?PR?SPI_RECEIVE_WORD?D_SPICALLER1: ?PR?VSYNC_INTERRUPT?MAINCALLER2: ?C_C51STARTUP該警告表示連接器發(fā)現(xiàn)有一個函數(shù)可能會被主函數(shù)和一個中斷服務程序 (或者調用中斷服務程序的函數(shù) )同時調用 ,或者同時被多個中斷服務程序調用。出現(xiàn)這種問題的原因之一是這個函數(shù)是不可重入性函數(shù) ,當該函數(shù)運行時它可能會被一個中斷打斷 ,從而使得結果發(fā)生變化并可能會引起一些變量形式的沖突 (即引起函數(shù)內(nèi)一

38、些數(shù)據(jù)的丟失,可重入性函數(shù)在任何時候都可以被ISR 打斷 ,一段時間后又可以運行 ,但是相應數(shù)據(jù)不會丟失)。原因之二是用于局部變量和變量 (暫且這樣翻譯 ,arguments, 自變量 ,變元一數(shù)值 ,用于確定程序或子程序的值)的內(nèi)存區(qū)被其他函數(shù)的內(nèi)存區(qū)所覆蓋,.專業(yè)專注.如果該函數(shù)被中斷,則它的內(nèi)存區(qū)就會被使用 ,這將導致其他函數(shù)的內(nèi)存沖突。例如 ,第一個警告中函數(shù)WRITE_GMVLX1_REG 在D_GMVLX1.C 或者 D_GMVLX1.A51 被定義 ,它被一個中斷服務程序或者一個調用了中斷服務程序的函數(shù)調用了,調用它的函數(shù)是VSYNC_INTERRUPT,在MAIN.C 中。解決

39、方法 :如果你確定兩個函數(shù)決不會在同一時間執(zhí)行(該函數(shù)被主程序調用并且中斷被禁止),并且該函數(shù)不占用內(nèi)存(假設只使用寄存器),則你可以完全忽略這種警告。如果該函數(shù)占用了內(nèi)存,則應該使用連接器(linker)OVERLAY 指令將函數(shù)從覆蓋分析(overlay analysis) 中除去 ,例如:OVERLAY (?PR?_WRITE_GMVLX1_REG?D_GMVLX1 ! *)上面的指令防止了該函數(shù)使用的內(nèi)存區(qū)被其他函數(shù)覆蓋。如果該函數(shù)中調用了其他函數(shù),而這些被調用在程序中其他地方也被調用,你可能會需要也將這些函數(shù)排除在覆蓋分析(overlay analysis) 之外。 這種 OVERL

40、AY 指令能.專業(yè)專注.使編譯器除去上述警告信息。如果函數(shù)可以在其執(zhí)行時被調用,則情況會變得更復雜一些。這時可以采用以下幾種方法:1.主程序調用該函數(shù)時禁止中斷,可以在該函數(shù)被調用時用#pragma disable語句來實現(xiàn)禁止中斷的目的 。必須使用 OVERLAY 指令將該函數(shù)從覆蓋分析中除去 。2.復制兩份該函數(shù)的代碼 ,一份到主程序中 ,另一份復制到中斷服務程序中 。3.將該函數(shù)設為重入型。例如:void myfunc(void) reentrant .這種設置將會產(chǎn)生一個可重入堆棧,該堆棧被被用于存儲函數(shù)值和局部變量 ,用這種方法時重入堆棧必須在STARTUP.A51 文件中配置 。這

41、種方法消耗更多的RAM 并會降低重入函數(shù)的執(zhí)行速度。11. * WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESSSEGMENT: ?PR?_COMPARE?TESTLCD.專業(yè)專注.說明:程序中有些函數(shù) (或片段 )以前(調試過程中 )從未被調用過 ,或者根本沒有調用它的語句 。這條警告信息前應該還有一條信息指示出是哪個函數(shù)導致了這一問題 。 只要做點簡單的調整就可以 。不理它也沒什么大不了的。解決方法 :去掉 COMPARE()函數(shù)或利用條件編譯#if .#endif,可保留該函數(shù)并不編譯。-C 編譯器錯誤信息中文翻譯Amb

42、iguous operators need parentheses不明確的運算需要用括號括起Ambiguous symbol xxx不明確的符號Argument list syntax error參數(shù)表語法錯誤Array bounds missing丟失數(shù)組界限符Array size toolarge數(shù)組尺寸太大Bad character in paramenters參數(shù)中有不適當?shù)淖址鸅ad file name format in include directive包含命令中文件名格式不正確.專業(yè)專注.Bad ifdef directive synatax編譯預處理ifdef 有語法錯Bad

43、 undef directive syntax編譯預處理 undef有語法錯Bit field too large位字段太長Call of non-function調用未定義的函數(shù)Call to function with no prototype調用函數(shù)時沒有函數(shù)的說明Cannot modify a const object不允許修改常量對象Case outside of switch漏掉了 case 語句Case syntax error Case語法錯誤Code has no effect代碼不可述不可能執(zhí)行到Compound statement missing分程序漏掉 "&

44、quot;Conflicting type modifiers不明確的類型說明符Constant expression required要求常量表達式Constant out of range in comparison在比較中常量超出范圍Conversion may lose significant digits轉換時會丟失意義的數(shù)字Conversion of near pointer not allowed不允許轉換近指針Could not find file xxx找不到 XXX 文件Declaration missing ;說明缺少 ";"Declaration s

45、yntax error說明中出現(xiàn)語法錯誤Default outside of switch Default出現(xiàn)在 switch 語句之外Define directive needs an identifier定義編譯預處理需要標識.專業(yè)專注.符Division by zero用零作除數(shù)Do statement must have while Do-while語句中缺少while 部分Enum syntax error枚舉類型語法錯誤Enumeration constant syntax error枚舉常數(shù)語法錯誤Error directive :xxx錯誤的編譯預處理命令Error writi

46、ng output file寫輸出文件錯誤Expression syntax error表達式語法錯誤Extra parameter in call調用時出現(xiàn)多余錯誤File name too long 文件名太長Function call missing )函數(shù)調用缺少右括號Fuction definition out of place函數(shù)定義位置錯誤Fuction should return a value函數(shù)必需返回一個值Goto statement missing label Goto語句沒有標號Hexadecimal or octal constant too large16進制或 8 進制常數(shù)太大Illegal character x非法字符 xIllegal initialization非法的初始化Illegal octal digit非法的 8 進制數(shù)字Illegal pointer subtraction非法的指針相減Illegal structure operation非法的結構體操作.專業(yè)專注.Illegal use of floating point非法的浮點運算Illegal use of pointer指針使用非法Improper use of a typedefsymbol類型定義符號使用不恰當In-li

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論