Keil c51 common error warning prompt information

Publisher:小悟空111Latest update time:2016-10-23 Source: eefocusKeywords:keil  c51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Warning 280:'i':unreferenced local variable

This indicates that no access operation is performed on the local variable i in the function.

Solution: Eliminate the declaration of the i variable in the function.

2. Warning 206:'Music3':missing function-prototype

This means that the Music3() function has not been declared or has not been declared externally, so it cannot be called by other functions.

The solution is to write the statement void Music3(void) at the beginning of the program as a declaration. If it is a function of other files, it should be written as extern void Music3(void), that is, as an external declaration.

3. Compling: C:\8051\MANN.C

Error:318:can't open file 'beep.h'

Description: During the compilation of the C:\8051\MANN.C program, main.c used the instruction #include "beep.h", but it could not find it.

Solution Write an include file called beep.h and save it in the working directory of c:\8051.

4. Compiling: C:\8051\LED.C

Error 237:'LedOn':function already has a body

Description: The LedOn() function name is defined repeatedly, that is, there are two or more identical function names.

Solution: Fix one of the function names so that the function names are independent.

5. ***WARNING 16:UNCALLED SEGMENT,IGNORED FOR OVERLAY PROCESS

SEGMENT: ?PR?_DELAYX1MS?DELAY

This shows that the DelayX1ms() function will occupy program memory space even if it is not called by other functions.

The solution is to remove the DelayX1ms() function or use conditional compilation #if …#endif to keep the function and not compile.

6. ***WARNING 6 :XDATA SPACE MEMORY OVERLAP

FROM : 0025H

TO: 0025H

Explanation: The 0025H address of the external data ROM is repeatedly defined.

Solution: The definition of external data ROM is as follows

Pdata unsigned char XFR_ADC _at_0x25 The name of the XFR_ADC variable is 0x25. Please check if it is

Is there any other variable name defined at 0x25? Correct it.

7. WARNING 206:'DelayX1ms': missing function-prototype

C:\8051\INPUT.C

Error 267:'DelayX1ms ':requires ANSI-style prototype C:\8051\INPUT.C

This means that the DelayX1ms function is called in the program but the function is not defined, that is, the program content or function is not written.

Defined but not declared.

Solution: After writing the content of DelayX1ms, you must also declare it or make an external declaration in delay.h

The included file is declared as external for other functions to call.

8. ***WARNING 1:UNRESOLVED EXTERNAL SYMBOL

SYMBOL:MUSIC3

MODULE:C:\8051\MUSIC.OBJ(MUSIC)

***WARNING 2:REFERENCE MADE TO UNRESOLVED EXTERNAL

SYMBOL:MUSIC3

MODULE:C:\8051\MUSIC.OBJ(MUSIC)

ADDRESS:0018H

This means that the MUSIC function is called in the program but the extension C of the function is not added to the project file.

Prj compiles and links.

Solution: Set the MUSIC3 function in MUSIC C and add MUSIC C to the project file.

9 . ***ERROR 107:ADDESS SPACE OVERFLOW

SPACE: DATA

SEGMENT: _DATA_GOUP_

LENGTH: 0018H

***ERROR 118: REFERENCE MADE TO ERRONEOUS EXTERNAL

SYMBOL: VOLUME

MODULE: C:\8051\OSDM.OBJ (OSDM)

ADDRESS: 4036H

The address range of the data storage space is 0~0x7f.

If the storage mode is set to SMALL, local variables will be temporarily stored in working registers R2~R7.

If the number of temporary data in the data type space exceeds 0x7f, the address will be insufficient.

Solution: Change the public variable defined as data type to idata type.

Keywords:keil  c51 Reference address:Keil c51 common error warning prompt information

Previous article:How to convert numbers into strings in C51
Next article:When creating multiple c files in keil

Recommended ReadingLatest update time:2024-11-16 14:32

Keil function inline
       Inline function means: when the compiler finds that a certain code is calling an inline function, it does not call the function, but inserts the entire code of the function into the current position. The advantage of this is that it saves the calling process and speeds up the program, but because the inline fun
[Microcontroller]
2.C51 basic programs and statements
main structure Common phrases: 7. Preprocessing: #define LED P0 That is, define the LED to indicate P0, and in the following programs, the LED will represent P0. (Note that there is no semicolon at the end) #typedef unsigned int uint; Redefine some common keywords. Here, uint is used instead of unsigned int to r
[Microcontroller]
2.C51 basic programs and statements
A Simple Study on the Delay Program of Keil C 51 Single Chip Microcomputer
    When using a single-chip microcomputer, we often encounter situations where a short delay is required. The required delay time is very short, usually tens to hundreds of microseconds (us). Sometimes very high precision is also required, such as when using a single-chip microcomputer to drive a DS18B20, the error to
[Microcontroller]
C51 single chip microcomputer uses 74hc138 to expand the simulation circuit diagram + program of the water lamp
The C51 microcontroller uses 74hc138 to expand the water lamp program, which includes source code. The simulation circuit can be expanded to multiple LED circuits at will. The schematic diagram is as follows: The microcontroller source program is as follows: #define uint unsigned int #define uchar unsigned char vo
[Microcontroller]
C51 single chip microcomputer uses 74hc138 to expand the simulation circuit diagram + program of the water lamp
C51---4.1 Static digital tube display
Digital tube pin definition Schematic 74HC138 Through the 74HC138 decoder P2_2 P2_3 P2_4 control LED1-LED8 output 0 is selected For example P2_2=1//low position P2_3=0 P2_4=1//High 101 is 5 in decimal, so the 5th bit is valid and the low level is effective. The digital tube is connected with a common cathode
[Microcontroller]
C51---4.1 Static digital tube display
C51--DS18B20 digital thermometer--C language
#include reg52.h #include intrins.h #define uint unsigned int #define uchar unsigned char sbit DQ=P2^6; sbit lcdrs=P1^0; sbit lcdrw=P1^1; sbit lcden=P1^2; void disp(uint a); void init(void); void delay(uint i); uchar ds18b20_init(void); void write_byte(uchar byte); uchar read_byte(void);
[Microcontroller]
Use Keil to write the program and download it to the microcontroller
When programming microcontrollers, keil uvision2 is often used to write programs. Let's take the AT89C51 microcontroller as an example to learn how to use keil uvision2 to write programs. The general steps for writing programs with keil uvision2 are as follows: 1. Create a new project 2. Create a new source progra
[Microcontroller]
[C51 code] 4*4 keyboard scan
The procedure is as follows: #include reg51.h #define uint unsigned int #define uchar unsigned char sbit key3 =P2^0; //key row detection signal sbit key2 =P2^1; sbit key1 =P2^2; sbit key0 =P2^3; sbit dis0 = P2^4;      sbit dis1 = P2^5; sbit dis2 = P2^6; sbit dis3 = P2^7; sbit dis4 = P3^3; uchar keyx,key;
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号