Keil™, An ARM® Company

Cx51 User's Guide

Command Prompt

To invoke the C51 or CX51 Compiler, enter C51 or CX51 at the command prompt. You must include the name of the C source file to be compiled and any required control directives on the command line. The format for the command line is:

C51 sourcefile « directives... »
C51 @commandfile

or

CX51 sourcefile « directives... »
CX51 @commandfile

Where

sourcefileIs the name of the source program you want to compile.
directivesAre directives that control the operation of the compiler. Refer to Directives for a detailed list of the available directives.
commandfileIs the name of a command input file that may contain the sourcefile and directives. A commandfile is commonly used when the compiler command line is complex or exceeds the limits of the Windows command prompt.

The following command line example invokes the C51 Compiler, specifies the source file SAMPLE.C, and uses the DEBUG, CODE, and PREPRINT directives.

C51 SAMPLE.C DEBUG CODE PREPRINT

The Cx51 Compiler displays the following information upon successful compilation.

C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)