- •Chapter 1. Introduction
- •Support for all 8051 Variants
- •Books About the C Language
- •Chapter 2. Compiling with the Cx51 Compiler
- •Environment Variables
- •Running Cx51 from the Command Prompt
- •ERRORLEVEL
- •Cx51 Output Files
- •Control Directives
- •Directive Categories
- •Reference
- •Chapter 3. Language Extensions
- •Keywords
- •Memory Areas
- •Program Memory
- •Internal Data Memory
- •External Data Memory
- •Far Memory
- •Special Function Register Memory
- •Memory Models
- •Small Model
- •Compact Model
- •Large Model
- •Memory Types
- •Explicitly Declared Memory Types
- •Implicit Memory Types
- •Data Types
- •Bit Types
- •Special Function Registers
- •sbit
- •Absolute Variable Location
- •Pointers
- •Generic Pointers
- •Pointer Conversions
- •Abstract Pointers
- •Function Declarations
- •Function Parameters and the Stack
- •Passing Parameters in Registers
- •Function Return Values
- •Specifying the Memory Model for a Function
- •Specifying the Register Bank for a Function
- •Register Bank Access
- •Interrupt Functions
- •Reentrant Functions
- •Chapter 4. Preprocessor
- •Directives
- •Stringize Operator
- •Predefined Macro Constants
- •Chapter 5. 8051 Derivatives
- •Analog Devices MicroConverter B2 Series
- •Atmel 89x8252 and Variants
- •Dallas 80C320, 420, 520, and 530
- •Arithmetic Accelerator
- •Data Pointers
- •Library Routines
- •Philips 8xC750, 8xC751, and 8xC752
- •Philips 80C51MX Architecture
- •Philips and Atmel WM Dual DPTR
- •Customization Files
- •STARTUP.A51
- •INIT.A51
- •XBANKING.A51
- •Basic I/O Functions
- •Memory Allocation Functions
- •Optimizer
- •General Optimizations
- •Options for Code Generation
- •Segment Naming Conventions
- •Data Objects
- •Program Objects
- •Interfacing C Programs to Assembler
- •Function Parameters
- •Parameter Passing in Registers
- •Parameter Passing in Fixed Memory Locations
- •Function Return Values
- •Using the SRC Directive
- •Register Usage
- •Overlaying Segments
- •Example Routines
- •Small Model Example
- •Compact Model Example
- •Large Model Example
- •Data Storage Formats
- •Bit Variables
- •Signed and Unsigned Long Integers
- •Generic and Far Pointers
- •Floating-point Numbers
- •Accessing Absolute Memory Locations
- •Absolute Memory Access Macros
- •Linker Location Controls
- •The _at_ Keyword
- •Debugging
- •Chapter 7. Error Messages
- •Fatal Errors
- •Actions
- •Errors
- •Syntax and Semantic Errors
- •Warnings
- •Chapter 8. Library Reference
- •Intrinsic Routines
- •Library Files
- •Standard Types
- •va_list
- •Absolute Memory Access Macros
- •CBYTE
- •CWORD
- •DBYTE
- •DWORD
- •FARRAY, FCARRAY
- •FVAR, FCVAR,
- •PBYTE
- •PWORD
- •XBYTE
- •XWORD
- •Routines by Category
- •Buffer Manipulation
- •Character Conversion and Classification
- •Data Conversion
- •Math Routines
- •Memory Allocation Routines
- •Stream Input and Output Routines
- •String Manipulation Routines
- •Miscellaneous Routines
- •Include Files
- •8051 Special Function Register Include Files
- •ABSACC.H
- •ASSERT.H
- •CTYPE.H
- •INTRINS.H
- •MATH.H
- •SETJMP.H
- •STDARG.H
- •STDDEF.H
- •STDIO.H
- •STDLIB.H
- •STRING.H
- •Reference
- •Compiler-related Differences
- •Library-related Differences
- •Appendix B. Version Differences
- •Version 6.0 Differences
- •Version 5 Differences
- •Version 4 Differences
- •Version 3.4 Differences
- •Version 3.2 Differences
- •Version 3.0 Differences
- •Version 2 Differences
- •Appendix C. Writing Optimum Code
- •Memory Model
- •Variable Location
- •Variable Size
- •Unsigned Types
- •Local Variables
- •Other Sources
- •Appendix D. Compiler Limits
- •Appendix E. Byte Ordering
- •Recursive Code Reference Error
- •Problems Using the printf Routines
- •Uncalled Functions
- •Using Monitor-51
- •Trouble with the bdata Memory Type
- •Function Pointers
- •Glossary
- •Index
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