µVision4 User's Guide
Keil Cx51 Compiler
- Sets preprocessor symbols, which can be checked with
#if, #ifdef and #ifndef. The defined names are
copied exactly as they are entered (case-sensitive). Optionally,
each name can be assigned a value. The following entry Check,
NoExtRam, X1=1+5 is identical to the C preprocessor #define
#define X1 1+5
- Undefine clears previous Define
assignments entered in this dialog for a parent item (target or
- Sets the optimization level the Compiler uses when
generating object code.
- Specifies whether the Compiler should optimize for
code size or execution speed.
- Global Register
- Enables application register optimization. When set,
the C51 Compiler knows the registers used by external functions,
and µVision performs automatically an iterative re-translation of C
source files to improve register allocation.
- Linker Code Packing
(max. AJMP / ACALL)
- Instructs the Compiler to include information in the
object file for the linker-level program optimizations. When
enabled, the LX51 linker/locater performs this optimizations.
- Don't use absolute register
- Disables absolute register addressing for registers
R0 through R7 and allows function calls across
register banks. The code will be slightly longer, because the C
compiler cannot use ARx symbols, for example in
PUSH or POP instructions, and has to insert
replacement code. However, the code will be independent of the
selected register bank.
- Suppresses compiler warnings based on the level
- Bits to round for float
- Determines the number of bits to be rounded before a
floating-point compare is executed. The default value
3 specifies that the three least significant bits of a float
value are rounded before the floating-point compare is
- Interrupt vectors at
- Instructs the C Compiler to generate interrupt
vectors for interrupt functions and specifies the base address for
the interrupt vector table.
Variables in Order
- Orders all variables in memory according to their
sequence of definition in the C source file.
- Enable ANSI integer
- Promotes expressions of smaller types to integer
expressions before the operation is performed. By default, integer
promotion is enabled to provide the greatest compatibility between
Cx51 and other ANSI compilers.
- Include Paths
- Allows supplying paths (separated by semi-colon) to
search for header files. For #include "filename.h", the
Compiler searches the current folder first and afterwards the
folder of the source file. When these searches fail or when
#include <filename.h> is used, the paths specified in
this field are searched. When this search fails again, the paths
specified in the field INC of the dialog Project - Components, Environment, Books
... are used.
- Misc Controls
- Allows specifying any directive for which there is
no individual dialog control.
- Compiler control string
- Displays the directives at the compiler command