Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
50
Добавлен:
14.04.2015
Размер:
1.37 Mб
Скачать

Keil Software — Cx51 Compiler User’s Guide

189

 

 

Chapter 7. Error Messages

This chapter lists Fatal Error, Syntax Error, and Warning messages that you may encounter as you develop a program. Each section includes a brief description of the message as well as corrective actions you can take to eliminate the error or warning condition.

Fatal Errors

Fatal errors cause immediate termination of the compilation. These errors normally occur as the result of invalid options specified on the command line. Fatal errors are also generated when the compiler cannot access a specified source include file.

Fatal error messages conform to one of the following formats:

C51 FATAL-ERROR -

ACTION:

LINE:

ERROR: C51 TERMINATED.

<current action>

<line in which the error is detected> <corresponding error message>

C51 FATAL-ERROR -

ACTION:

FILE:

ERROR: C51 TERMINATED.

<current action>

<file in which the error is detected> <corresponding error message>

The following are descriptions of the possible text for the Action and Error fields in the above messages.

7

190

Chapter 7. Error Messages

 

 

Actions

ALLOCATING MEMORY

The compiler could not allocate enough memory to compile the specified source file.

CREATING LIST-FILE / OBJECT-FILE / WORKFILE

The compiler could not create the list file, object file, or work file. This error may occur if the disk is full or write-protected, or if the file already exists and is read only.

GENERATING INTERMEDIATE CODE

The source file contains a function that is too large to be translated into pseudo-code by the compiler. Try breaking the function into smaller functions and re-compiling.

OPENING INPUT-FILE

The compiler failed to find or open the selected source or include file.

PARSING INVOKE-/#PRAGMA-LINE

An error was detected while evaluating arguments on the command line or while evaluating parameters in a #pragma statement.

PARSING SOURCE-FILE / ANALYZING DECLARATIONS

The source file contains too many external references. Reduce the number of external variables and functions accessed by the source file.

WRITING TO FILE

An error was encountered while writing to the list file, object file, or work file.

7

Keil Software — Cx51 Compiler User’s Guide

191

 

 

Errors

'(' AFTER CONTROL EXPECTED

Some control parameters need an argument enclosed in parentheses. This message is displayed when the left parenthesis is missing.

')' AFTER PARAMETER EXPECTED

This message indicates that the right parenthesis of the enclosed argument is missing.

BAD DIGIT IN NUMBER

The numerical argument of a control parameter contains invalid characters. Only decimal digits are acceptable.

CAN'T CREATE FILE

The filename defined on the FILE line cannot be created.

CAN'T HAVE GENERAL CONTROL IN INVOCATION LINE

General controls (for example, EJECT) cannot be included on the command line. Place these controls in the source file using the #pragma statement.

FILE DOES NOT EXIST

The filename defined on the FILE line, cannot be found.

FILE WRITE-ERROR

An error occurred while writing to the list, preprint, work, or object file because of insufficient disk space.

IDENTIFIER EXPECTED

This message is generated when the DEFINE control has no arguments. DEFINE requires an identifier as its argument. This is the same convention as in the C language.

MEMORY SPACE EXHAUSTED

The compiler could not allocate enough memory to compile the specified

 

7

source file. If you receive this message consistently, you should split the

source file into two or more smaller files and re-compile.

 

MORE THAN 100 ERRORS IN SOURCE-FILE

 

During the compilation more than 100 errors were detected. This causes the

 

termination of the compiler.

 

MORE THAN 256 SEGMENTS/EXTERNALS

 

More than 256 total references were encountered in a source file. A single

 

source file cannot contain more than 256 functions or external references.

 

This is a historical restriction mandated by the Intel Object Module Format

 

(OMF-51). Functions which contain scalar and/or bit declarations produce

 

two and sometimes three segment definitions in the object file.

 

192

Chapter 7. Error Messages

 

 

NON-NULL ARGUMENT EXPECTED

The selected control parameter needs an argument (for example, a filename or a number) enclosed in parentheses.

OUT OF RANGE NUMBER

The numerical argument of a control parameter is out of range. For instance, the OPTIMIZE control allows only the numbers 0 through 6. A value of 7 would generate this error message.

PARSE STACK OVERFLOW

The parse stack has overflowed. This can occur if the source program contains extremely complex expressions or if blocks are nested more than 31 levels deep.

PREPROCESSOR: LINE TOO LONG (32K)

An intermediate expansion exceeded 32K characters in length.

PREPROCESSOR: MACROS TOO NESTED

During macro expansion the stack consumption of the preprocessor grew too large to continue. This message usually indicates a recursive macro definition, but can also indicate a macro with too many levels of nesting.

RESPECIFIED OR CONFLICTING CONTROL

A command-line parameter was specified twice or conflicting command-line parameters were specified.

SOURCE MUST COME FROM A DISK-FILE

The source and include files must exist on either a hard disk or diskette. The console CON:, :CI:, or similar devices are not allowed as input files.

UNKNOWN CONTROL

The selected control parameter is unrecognized by the compiler.

7

Соседние файлы в папке HLP