SW500007 Microchip Technology, SW500007 Datasheet - Page 22

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
PICC18 Compiler Options
located in read-only directories. To compile three source files main.c, module1.c and asmcode.as
to object files you could use a command similar to:
The compiler will produce three object files main.obj, module1.obj and asmcode.obj which
could then be linked to produce an Intel HEX file using the command:
2.4.3 -Dmacro: Define Macro
The -D option is used to define a preprocessor macro on the command line, exactly as if it had
been defined using a #define directive in the source code. This option may take one of two forms,
-Dmacro which is equivalent to:
placed at the top of each module compiled using this option, or -Dmacro=text which is equivalent
to:
where text is the textual substitution required. Thus, the command:
will compile test.c with macros defined exactly as if the C source code had included the directives:
2.4.4 -Efile: Redirect Compiler Errors to a File
Some editors do not allow the standard command line redirection facilities to be used when invoking
the compiler. To work with these editors, PICC18 allows an error listing filename to be specified
as part of the -E option. Error files generated using this option will always be in -E format. For
example, to compile x.c and redirect all errors to x.err, use the command:
8
PICC18 --CHIP=18F242 -C main.c module1.c asmcode.as
PICC18 --CHIP=18F242 main.obj module1.obj asmcode.obj
#define macro 1
#define macro text
PICC18 --CHIP=18F242 -Ddebug -Dbuffers=10 test.c
#define debug
#define buffers 10
PICC18 --CHIP=18F242 -Ex.err x.c
1
PICC-18 Command-line Driver

Related parts for SW500007