KEIL_C編譯器錯(cuò)誤與解決方法_第1頁(yè)
KEIL_C編譯器錯(cuò)誤與解決方法_第2頁(yè)
KEIL_C編譯器錯(cuò)誤與解決方法_第3頁(yè)
KEIL_C編譯器錯(cuò)誤與解決方法_第4頁(yè)
KEIL_C編譯器錯(cuò)誤與解決方法_第5頁(yè)
已閱讀5頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、編譯錯(cuò)誤信息表      可按 Ctrl+F進(jìn)行 查找 錯(cuò)誤代碼及錯(cuò)誤信息                                     &

2、#160; 錯(cuò)誤釋義 error 1: Out of memory                                   內(nèi)存溢出 error 2: Identifi

3、er expected                             缺標(biāo)識(shí)符 error 3: Unknown identifier          

4、60;                   未定義的標(biāo)識(shí)符 error 4: Duplicate identifier                      

5、;      重復(fù)定義的標(biāo)識(shí)符 error 5: Syntax error                                    語(yǔ)法

6、錯(cuò)誤 error 6: Error in real constant                          實(shí)型常量錯(cuò)誤 error 7: Error in integer constant   &

7、#160;                   整型常量錯(cuò)誤 error 8: String constant exceeds line                  

8、0; 字符串常量超過(guò)一行 error 10: Unexpected end of file                         文件非正常結(jié)束 error 11: Line too long    

9、                              行太長(zhǎng) error 12: Type identifier expected          &#

10、160;            未定義的類型標(biāo)識(shí)符 error 13: Too many open files                          

11、0; 打開(kāi)文件太多 error 14: Invalid file name                              無(wú)效的文件名 error 15: File not found &

12、#160;                               文件未找到 error 16: Disk full           

13、60;                          磁盤(pán)滿 error 17: Invalid compiler directive             

14、60;       無(wú)效的編譯命令 error 18: Too many files                                 文件太多

15、error 19: Undefined type in pointer def                  指針定義中未定義類型 error 20: Variable identifier expected         

16、          缺變量標(biāo)識(shí)符 error 21: Error in type                               

17、0;  類型錯(cuò)誤 error 22: Structure too large                            結(jié)構(gòu)類型太長(zhǎng) error 23: Set base type out 

18、;of range                        集合基類型越界 error 24: File components may not be files or objectsfile分量不能是文件或?qū)ο?error 25: I

19、nvalid string length                            無(wú)效的字符串長(zhǎng)度 error 26: Type mismatch         &

20、#160;                          類型不匹配 error 27:error 27:Invalid subrange base type          

21、0; 無(wú)效的子界基類型 error 28:Lower bound greater than upper bound            下界超過(guò)上界 error 29:Ordinal type expected              

22、              缺有序類型 error 30:Integer constant expected                        缺整型常量 error 

23、31:Constant expected                                缺常量 error 32:Integer or real constant expected  

24、              缺整型或?qū)嵭统A?error 33:Pointer Type identifier expected                缺指針類型標(biāo)識(shí)符 error 34:Invalid function 

25、result type                    無(wú)效的函數(shù)結(jié)果類型 error 35:Label identifier expected                 

26、60;      缺標(biāo)號(hào)標(biāo)識(shí)符 error 36:BEGIN expected                                    缺BEGI

27、N error 37:END expected                                    缺END error 38:Integer expression exp

28、ected                    缺整型表達(dá)式 error 39:Ordinal expression expected                   

29、60;缺有序類型表達(dá)式 error 40:Boolean expression expected                    缺布爾表達(dá)式 error 41:Operand types do not match        &#

30、160;               操作數(shù)類型不匹配 error 42:Error in expression                         

31、0;  表達(dá)式錯(cuò)誤 error 43:Illegal assignment                                非法賦值 error 44:Field identifier expec

32、ted                        缺域標(biāo)識(shí)符 error 45:Object file too large                &

33、#160;           目標(biāo)文件太大 error 46:Undefined external                               

34、; 未定義的外部過(guò)程與函數(shù) error 47:Invalid object file record                        無(wú)效的OBJ文件格式 error 48:Code segment too large   &#

35、160;                       代碼段太長(zhǎng) error 49:Data segment too large                 

36、;          數(shù)據(jù)段太長(zhǎng) error 50:DO expected                                  

37、;    缺DO error 51:Invalid PUBLIC definition                        無(wú)效的PUBLIC定義 error 52:Invalid EXTRN definition   

38、                     無(wú)效的EXTRN定義 error 53: Too many EXTRN definitions                 

39、       太多的EXTRN定義 error 54:OF expected                                    缺

40、OF error 55:INTERFACE expected                                缺INTERFACE error 56:Invalid relocatable reference

41、0;                   無(wú)效的可重定位引用 error 57:THEN expected                       

42、0;            缺THEN error 58:TO or DOWNTO expected                            缺T

43、O或DOWNTO error 59:Undefined forward                                提前引用未經(jīng)定義的說(shuō)明 error 61:Invalid typecast  

44、0;                             無(wú)效的類型轉(zhuǎn)換 error 62:Division by zero            

45、0;                   被零除 error 63:Invalid file type                       &

46、#160;        無(wú)效的文件類型 error 64:Cannot read or write variables of this type    不能讀寫(xiě)此類型變量 error 65:Pointer variable expected          

47、0;             缺指針類型變量 error 66:String variable expected                        缺字符串變量 error 67

48、:String expression expected                        缺字符串表達(dá)式 error 68:Circular unit reference          

49、0;             單元UNIT部件循環(huán)引用 error 69:Unit name mismatch                           

50、60;    單元名不匹配 error 70:Unit version mismatch                            單元版本不匹配 error 71:Internal stack overfl

51、ow                        內(nèi)部堆棧溢出 error 72:Unit file format error                

52、            單元文件格式錯(cuò)誤 error 73:IMPLEMENTATION expected                        缺IMPLEMENTATION error 74:Con

53、stant and case types do not match            常量和CASE類型不匹配 error 75:Record or object variable expected              

54、  缺記錄或?qū)ο笞兞?error 76:Constant out of range                            常量越界 error 77:File variable expected 

55、0;                          缺文件變量 error 78:Pointer expression expected              &

56、#160;     缺指針表達(dá)式 error 79:Integer or real expression expected            缺整型或?qū)嵭捅磉_(dá)式 error 80:Label not within current block       &

57、#160;            標(biāo)號(hào)不在當(dāng)前塊內(nèi) error 81:Label already defined                            標(biāo)

58、號(hào)已定義 error 82:Undefined label in preceding statement part    在前面未定義標(biāo)號(hào) error 83:Invalid  argument                       &

59、#160;        無(wú)效的參數(shù) error 84:UNIT expected                                   

60、; 缺UNIT error 85: "" expected                                    缺“;” error 86: 

61、":" expected                                    缺“:” error 87: "," expected 

62、;                                   缺“,” error 88: "(" expected      &

63、#160;                             缺“(” error 89: ")" expected           

64、60;                        缺“)” error 90: "=" expected                 

65、;                   缺“=” error 91: ":=" expected                      

66、              缺“:=” error 92: "" or "(." Expected                      

67、0;     缺“”或“(.” error 93:  "" or ".)" expected                            缺“”或“.)” er

68、ror 94: "." expected                                    缺“.” error 95:  ".&

69、quot; expected                                    缺“.” error 96:Too many variables   

70、                             變量太多 error 97:Invalid FOR control variable          

71、0;         無(wú)效的FOR循環(huán)控制變量 error 98:Integer variable expected                        缺整型變量 error 99:Files and

72、0;procedure types are not allowed here    該處不允許文件和過(guò)程類型 error 100:String length mismatch                        字符串長(zhǎng)度不匹配

73、error 101:Invalid ordering of fields                    無(wú)效域順序 error 102:String constant expected           

74、60;            缺字符串常量 error 103:Integer or real variable expected                缺整型或?qū)嵭妥兞?error 104:Ordinal variable exp

75、ected                        缺有序類型變量 error 105:INLINE error                  

76、60;                 INLINE錯(cuò)誤 error 106:Character expression expected                    缺字符表達(dá)式 error

77、 107:Too many relocation items                        重定位項(xiàng)太多 error 108:Overflow in arithmetic operation      &

78、#160;         算術(shù)運(yùn)算溢出 error 112:CASE constant out of range                    CASE常量越界 error 113:Error in statement&

79、#160;                           表達(dá)式錯(cuò)誤 error 114:Cannot call an interrupt procedure         

80、0;  不能調(diào)用中斷過(guò)程 error 116:Must be in 8087 mode to compile this            必須在8087模式編譯 error 117:Target address not found         

81、;               找不到目標(biāo)地址 error 118:Include files are not allowed here            該處不允許INCLUDE文件 error 119:No inherited me

82、thods are accessible here        該處繼承方法不可訪問(wèn) error 121:Invalid qualifier                           &#

83、160;    無(wú)效的限定符 error 122:Invalid variable reference                    無(wú)效的變量引用 error 123:Too many symbols       

84、60;                        符號(hào)太多 error 124:Statement part too large               

85、0;        語(yǔ)句體太長(zhǎng) error 126:Files must be var parameters                    文件必須是變量形參 error 127:Too many conditional 

86、symbols                    條件符號(hào)太多 error 128:Misplaced conditional directive                條件指令錯(cuò)位 error&#

87、160;129:ENDIF directive missing                        缺ENDIF指令 error 130:Error in initial conditional defines      

88、;      初始條件定義錯(cuò)誤 error 131:Header does not match previous definition    和前面定義的過(guò)程或函數(shù)不匹配 error 133:Cannot evaluate this expression            &

89、#160;   不能計(jì)算該表達(dá)式 error 134:Expression incorrectly terminated                表達(dá)式錯(cuò)誤結(jié)束 error 135:Invalid format specifier         

90、60;              無(wú)效格式說(shuō)明符 error 136:Invalid indirect reference                    無(wú)效的間接引用 error 137:Structured&

91、#160;variables are not allowed here        該處不允許結(jié)構(gòu)變量 error 138:Cannot evaluate without System unit            沒(méi)有System單元不能計(jì)算 error 139:Cannot acc

92、ess this symbol                        不能存取符號(hào) error 140:Invalid floating point operation          &#

93、160;     無(wú)效的符號(hào)運(yùn)算 error 141:Cannot compile overlays to memory                不能編譯覆蓋模塊至內(nèi)存 error 142:Pointer or procedural variable expected &#

94、160;      缺指針或過(guò)程變量 error 143:Invalid procedure or function reference        無(wú)效的過(guò)程或函數(shù)調(diào)用 error 144:Cannot overlay this unit          

95、0;             不能覆蓋該單元 error 146:File access denied                            不

96、允許文件訪問(wèn) error 147:Object type expected                            缺對(duì)象類型 error 148:Local object types are not allowed

97、            不允許局部對(duì)象類型 error 149:VIRTUAL expected                              &#

98、160; 缺VIRTUAL error 150: Method identifier expected                    缺方法標(biāo)識(shí)符 error 151:Virtual constructors are not allowed    &#

99、160;       不允許虛構(gòu)造函數(shù) error 152:Constructor identifier expected                缺構(gòu)造函數(shù)標(biāo)識(shí)符 error 153:Destructor identifier expected     

100、;           缺析構(gòu)函數(shù)標(biāo)識(shí)符 error 154:Fail only allowed within constructors    只能在構(gòu)造函數(shù)內(nèi)使用Fail標(biāo)準(zhǔn)過(guò)程 error 155:Invalid combination of opcode and operands    操作數(shù)

101、與操作符無(wú)效組合 error 156:Memory reference expected                        缺內(nèi)存引用指針 error 157:Cannot add or subtract relocatable symbols &

102、#160;  不能加減可重定位符號(hào) error 158:Invalid register combination                    無(wú)效寄存器組合 error 159:286/287 instructions are not enabled   &#

103、160;        未激活286/287指令 error 160:Invalid symbol reference                        無(wú)效符號(hào)指針 error 161:Code generation

104、 error                            代碼生成錯(cuò)誤 error 162:ASM expected             

105、0;                      缺ASM error 166:Procedure or function identifier expected        缺過(guò)程或函數(shù)標(biāo)識(shí)符 error 167:Cannot 

106、export this symbol                        不能輸出該符號(hào) error 168:Duplicate export name            &#

107、160;               外部文件名重復(fù) error 169:Executable file header too large                可執(zhí)行文件頭太長(zhǎng) error 170:Too ma

108、ny segments                                段太多一、    運(yùn)行錯(cuò)誤信息     運(yùn)行錯(cuò)誤分為四類:1-99為DOS錯(cuò)誤;100-149為I/O錯(cuò)

109、誤,發(fā)生I/O后,如果使用了編譯開(kāi)關(guān)$I+,程序?qū)⒔K止執(zhí)行,否則編譯開(kāi)關(guān)為$I-,程序繼續(xù)執(zhí)行,并由IOResult函數(shù)返回錯(cuò)誤信息; 150-199為嚴(yán)重錯(cuò)誤,200-255為致命錯(cuò)誤,致命錯(cuò)誤將立即終止程序執(zhí)行。 錯(cuò)誤代碼及錯(cuò)誤信息                             

110、60;  錯(cuò)誤釋義 error 1:Invalid function number                    無(wú)效函數(shù)號(hào) error 2:File not found            

111、;                文件未找到 error 3:Path not found                          

112、0; 找不到路徑 error 4:Too many open files                        打開(kāi)文件太多 error 5:File access denied        

113、;                文件不允許訪問(wèn) error 6:Invalid file handle                        無(wú)效文件句柄 er

114、ror 12:Invalid file access code                無(wú)效文件存取代碼 error 15:Invalid drive number                

115、0;   無(wú)效驅(qū)動(dòng)器號(hào) error 16:Cannot remove current directory        不能刪除當(dāng)前目錄 error 17:Cannot rename across drives            不能跨驅(qū)動(dòng)器改名 error 18:No

116、60;more files                            沒(méi)有文件了 error 100:Disk read error           &#

117、160;            讀磁盤(pán)錯(cuò) error 101:Disk write error                        寫(xiě)磁盤(pán)錯(cuò) error 102:File not&

118、#160;assigned                        文件變量未賦值 error 103:File not open                &

119、#160;           文件未打開(kāi) error 104:File not open for input                文件未打開(kāi)為寫(xiě)方式 error 105:File not open for output

120、                文件未打開(kāi)為讀方式 error 106:Invalid numeric format                無(wú)效數(shù)值格式 error 150:Disk is write-prote

121、cted                磁盤(pán)寫(xiě)保護(hù) error 151:Bad drive request struct length        錯(cuò)誤的驅(qū)動(dòng)器請(qǐng)求結(jié)構(gòu)長(zhǎng)度 error 152:Drive not ready    

122、60;                   驅(qū)動(dòng)器未準(zhǔn)備好 error 154:CRC error in data                     &#

123、160;  數(shù)據(jù)CRC校驗(yàn)錯(cuò) error 156:Disk seek error                        磁盤(pán)定位錯(cuò) error 157:Unknown media type       

124、             未知的介質(zhì)類型 error 158:Sector Not Found                        找不到扇區(qū) error 159:Printer&

125、#160;out of paper                    打印機(jī)缺紙 error 160:Device write fault                 &#

126、160;  設(shè)備寫(xiě)錯(cuò)誤 error 161:Device read fault                        設(shè)備讀錯(cuò)誤 error 162:Hardware failure        &#

127、160;               硬件故障 error 200:Division by zero                        被零除 error 2

128、01:Range check error                        范圍檢查出錯(cuò) error 202:Stack overflow error            &#

129、160;       棧溢出 error 203:Heap overflow error                    堆溢出 error 204:Invalid pointer operation     &#

130、160;          無(wú)效的指針操作 error 205:Floating point overflow                浮點(diǎn)運(yùn)算上溢 error 206:Floating point underflow    

131、0;           浮點(diǎn)運(yùn)算下溢 error 207:Invalid floating point operation        無(wú)效的浮點(diǎn)運(yùn)算 error 208:Overlay manager not installed        

132、    未安裝覆蓋管理程序 error 209:Overlay file read error                讀覆蓋文件錯(cuò)誤 error 210:Object not initialized          &#

133、160;     對(duì)象未初始化 error 211:Call to abstract method                調(diào)用抽象方法 error 212:Stream registration error         

134、;       流注_冊(cè)錯(cuò)誤 error 213:Collection index out of range            集合下標(biāo)越界 error 214:Collection overflow error         

135、60;      集合上溢 error 215:Arithmetic overflow error                算術(shù)運(yùn)算上溢 error 216:General Protection fault         

136、       一般保護(hù)性錯(cuò)誤keil c編譯器錯(cuò)誤與解決方法 1. Warning 280:i:unreferenced local variable 說(shuō)明局部變量i 在函數(shù)中未作任何的存取操作解決方法消除函數(shù)中i 變量的宣告 2 Warning 206:Music3:missing function-prototype 說(shuō)明Music3( )函數(shù)未作宣告或未作外部宣告所以無(wú)法給其他函數(shù)調(diào)用 解決方法將敘述void&

137、#160;Music3(void)寫(xiě)在程序的最前端作宣告如果是其他文件的函數(shù)則要寫(xiě) 成extern void Music3(void),即作外部宣告 3 Compling :C:8051MANN.C Error:318:cant open file beep.h 說(shuō)明在編譯C:8051MANN.C 程序過(guò)程中由于main.c 用了指令i nclude “beep.h”,但 卻找不到所致解決方法編寫(xiě)一個(gè)beep.h 的包含檔并存入到c:8051 的工作目錄中 4

138、60;Compling:C:8051LED.C Error 237:LedOn:function already has a body 說(shuō)明LedOn( )函數(shù)名稱重復(fù)定義即有兩個(gè)以上一樣的函數(shù)名稱 解決方法修正其中的一個(gè)函數(shù)名稱使得函數(shù)名稱都是獨(dú)立的 5 *WARNING 16:UNCALLED SEGMENT,IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_DELAYX1MS?DELAY 說(shuō)明DelayX1ms( )

139、函數(shù)未被其它函數(shù)調(diào)用也會(huì)占用程序記憶體空間解決方法去掉 DelayX1ms( )函數(shù)或利用條件編譯#if .#endif,可保留該函數(shù)并不編譯 6 *WARNING 6 :XDATA SPACE MEMORY OVERLAP FROM : 0025H TO: 0025H 說(shuō)明外部資料ROM 的0025H 重復(fù)定義地址 解決方法外部資料ROM 的定義如下Pdata unsigned char XFR_ADC _at_0

140、x25 其中XFR_ADC 變量的名稱為0x25,請(qǐng)檢查是否有其它的變量名稱也是定義在0x25 處并修正它 7 WARNING 206:DelayX1ms: missing function-prototype C:8051INPUT.C Error 267 :DelayX1ms :requires ANSI-style prototype C:8051INPUT.C 說(shuō)明程序中有調(diào)用DelayX1ms 函數(shù)但該函數(shù)沒(méi)定義即未編寫(xiě)程序內(nèi)容或函數(shù)已定義但未作 宣告 解

141、決方法編寫(xiě)DelayX1ms 的內(nèi)容編寫(xiě)完后也要作宣告或作外部宣告可在delay.h 的包含檔 宣告成外部以便其它函數(shù)調(diào)用 8 *WARNING 1:UNRESOLVED EXTERNAL SYMBOL SYMBOL:MUSIC3 MODULE:C:8051MUSIC.OBJ(MUSIC) *WARNING 2:REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL:MUSIC3 MODULE:C:8051MUSIC.OBJ(MUSIC) ADDRES

142、S:0018H 說(shuō)明程序中有調(diào)用MUSIC 函數(shù)但未將該函數(shù)的含擴(kuò)檔C 加入到工程檔Prj 作編譯和連接 解決方法設(shè)MUSIC3 函數(shù)在MUSIC C 里將MUSIC C 添加到工程文件中去 9 *ERROR 107:ADDESS SPACE OVERFLOW SPACE: DATA SEGMENT: _DATA_GOUP_ LENGTH: 0018H *ERROR 118: REFERENCE MADE 

143、TO ERRONEOUS EXTERNAL SYMBOL: VOLUME MODULE: C:8051OSDM.OBJ (OSDM) ADDRESS: 4036H 說(shuō)明data 存儲(chǔ)空間的地址范圍為00x7f,當(dāng)公用變量數(shù)目和函數(shù)里的局部變量如果存 儲(chǔ)模式設(shè)為SMALL 則局部變量先使用工作寄存器R2R7 作暫存當(dāng)存儲(chǔ)器不夠用時(shí)則會(huì) 以data 型別的空間作暫存的個(gè)數(shù)超過(guò)0x7f 時(shí)就會(huì)出現(xiàn)地址不夠的現(xiàn)象 解決方法將以data 型別定義的公共變量修改為idata 型

144、別的定義 10.*WARNING L15: MULTIPLE CALL TO SEGMENT SEGMENT: ?PR?_WRITE_GMVLX1_REG?D_GMVLX1 CALLER1: ?PR?VSYNC_INTERRUPT?MAIN CALLER2: ?C_C51STARTUP *WARNING L15: MULTIPLE CALL TO SEGMENT SEGMENT: ?PR?_SPI_SEND_WORD?D_SPI CALLER1: 

145、;?PR?VSYNC_INTERRUPT?MAIN CALLER2: ?C_C51STARTUP *WARNING L15: MULTIPLE CALL TO SEGMENT SEGMENT: ?PR?SPI_RECEIVE_WORD?D_SPI CALLER1: ?PR?VSYNC_INTERRUPT?MAIN CALLER2: ?C_C51STARTUP 該警告表示連接器發(fā)現(xiàn)有一個(gè)函數(shù)可能會(huì)被主函數(shù)和一個(gè)中斷服務(wù)程序(或者調(diào)用中斷 服務(wù)程序的函數(shù))同時(shí)調(diào)用, 或者同時(shí)被多個(gè)中斷服務(wù)程序調(diào)用。 出現(xiàn)這種

146、問(wèn)題的原因之一是這個(gè)函數(shù)是不可重入性函數(shù),當(dāng)該函數(shù)運(yùn)行時(shí)它可能會(huì)被一 個(gè)中斷打斷,從而使得結(jié)果發(fā)生變化 并可能會(huì)引起一些變量形式的沖突(即引起函數(shù)內(nèi)一些數(shù)據(jù)的丟失,可重入性函數(shù)在任何時(shí) 候都可以被ISR 打斷,一段時(shí)間后又可以 運(yùn)行,但是相應(yīng)數(shù)據(jù)不會(huì)丟失)。 原因之二是用于局部變量和變量(暫且這樣翻譯,arguments,自變量,變?cè)粩?shù)值,用于 確定程序或子程序的值)的內(nèi)存區(qū)被其他函數(shù)的內(nèi)存區(qū)所覆蓋,如果該函數(shù)被中斷,則它的 內(nèi)存區(qū)就會(huì) 被使用,這將導(dǎo)致其他函數(shù)的內(nèi)存沖突。 例如,第一個(gè)警告中函數(shù)WRITE_GMVLX1_REG 在D_GMVLX1.C 或者D_

147、GMVLX1.A51 被定義, 它被一個(gè)中斷服務(wù)程序或者一個(gè)調(diào)用了中斷 服務(wù)程序的函數(shù)調(diào)用了,調(diào)用它的函數(shù)是VSYNC_INTERRUPT,在MAIN.C 中。 解決方法: 如果你確定兩個(gè)函數(shù)決不會(huì)在同一時(shí)間執(zhí)行(該函數(shù)被主程序調(diào)用并且中斷被禁止),并 且該函數(shù)不占用內(nèi)存(假設(shè)只使用寄存器), 則你可以完全忽略這種警告。 如果該函數(shù)占用了內(nèi)存,則應(yīng)該使用連接器(linker)OVERLAY 指令將函數(shù)從覆蓋分析 (overlay analysis)中除去,例如: OVERLAY (?PR?_WRITE_GMVLX1_REG?D_GMVLX1&#

148、160;! *) 上面的指令防止了該函數(shù)使用的內(nèi)存區(qū)被其他函數(shù)覆蓋。如果該函數(shù)中調(diào)用了其他函數(shù), 而這些被調(diào)用在程序中其他地方也被調(diào)用, 你可能會(huì)需要也將這些函數(shù)排除在覆蓋分析(overlay analysis)之外。這種OVERLAY 指令能 使編譯器除去上述警告信息。 如果函數(shù)可以在其執(zhí)行時(shí)被調(diào)用,則情況會(huì)變得更復(fù)雜一些。這時(shí)可以采用以下幾種方 法: 1.主程序調(diào)用該函數(shù)時(shí)禁止中斷,可以在該函數(shù)被調(diào)用時(shí)用#pragma disable 語(yǔ)句來(lái)實(shí)現(xiàn)禁 止中斷的目的。必須使用OVERLAY 指令將該函數(shù) 從覆蓋分析中除去。 2.復(fù)制兩

149、份該函數(shù)的代碼,一份到主程序中,另一份復(fù)制到中斷服務(wù)程序中。 3.將該函數(shù)設(shè)為重入型。例如: void myfunc(void) reentrant  . 這種設(shè)置將會(huì)產(chǎn)生一個(gè)可重入堆棧,該堆棧被被用于存儲(chǔ)函數(shù)值和局部變量,用這種 方法時(shí)重入堆棧必須在STARTUP.A51 文件中配置。 這種方法消耗更多的RAM 并會(huì)降低重入函數(shù)的執(zhí)行速度。 11. * WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY 

150、PROCESS SEGMENT: ?PR?_COMPARE?TESTLCD 說(shuō)明:程序中有些函數(shù)(或片段)以前(調(diào)試過(guò)程中)從未被調(diào)用過(guò),或者根本沒(méi)有 調(diào)用它的語(yǔ)句。 這條警告信息前應(yīng)該還有一條信息指示出是哪個(gè)函數(shù)導(dǎo)致了這一問(wèn)題。只要做點(diǎn)簡(jiǎn) 單的調(diào)整就可以。不理它也沒(méi)什么大不了的。 解決方法:去掉COMPARE()函數(shù)或利用條件編譯#if .#endif,可保留該函數(shù)并不 編譯。 - C 編譯器錯(cuò)誤信息中文翻譯 Ambiguous operators need parentheses   不明確的運(yùn)算需要

151、用括號(hào)括起 Ambiguous symbol xxx               不明確的符號(hào) Argument list syntax error             參數(shù)表語(yǔ)法錯(cuò)誤 Array bounds missing                   丟失數(shù)組界限符 Array size toolarge    

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論