Keil Logo

Keil Cx51 Compiler

Preprocessor Symbols

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 statements:
   #define Check
   #define NoExtRam
   #define X1 1+5
Undefine clears previous Define assignments entered in this dialog for a parent item (target or group).

Code Optimization

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 Coloring
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 accesses
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.

Other Controls

Suppresses compiler warnings based on the level defined.
Bits to round for float compare
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 executed.
Interrupt vectors at address
Instructs the C Compiler to generate interrupt vectors for interrupt functions and specifies the base address for the interrupt vector table.
Keep Variables in Order
Orders all variables in memory according to their sequence of definition in the C source file.
Enable ANSI integer promotion rules
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 - Manage - Project Items 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 line.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.