07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16-Bit C <strong>Compiler</strong> User’s Guide<br />

3.5.10 Options <strong>for</strong> Directory Search<br />

The following options specify to the compiler where to find directories <strong>and</strong> files to<br />

search.<br />

TABLE 3-14: DIRECTORY SEARCH OPTIONS<br />

Option Definition<br />

-Bprefix This option specifies where to find the executables, libraries,<br />

include files <strong>and</strong> data files of the compiler itself.<br />

The compiler driver program runs one or more of the<br />

sub-programs pic30-cpp, pic30-cc1, pic30-as <strong>and</strong><br />

pic30-ld. It tries prefix as a prefix <strong>for</strong> each program it tries to<br />

run.<br />

For each sub-program to be run, the compiler driver first tries the<br />

-B prefix, if any. If the sub-program is not found, or if -B was not<br />

specified, the driver uses the value held in the<br />

PIC30_EXEC_PREFIX environment variable, if set. See<br />

Section 3.6 “Environment Variables”, <strong>for</strong> more in<strong>for</strong>mation.<br />

Lastly, the driver will search the current PATH environment<br />

variable <strong>for</strong> the subprogram.<br />

-B prefixes that effectively specify directory names also apply to<br />

libraries in the linker, because the compiler translates these<br />

options into -L options <strong>for</strong> the linker. They also apply to include<br />

files in the preprocessor, because the compiler translates these<br />

options into -isystem options <strong>for</strong> the preprocessor. In this case,<br />

the compiler appends include to the prefix. Another way to<br />

specify a prefix much like the -B prefix is to use the environment<br />

variable PIC30_EXEC_PREFIX.<br />

-specs=file Process file after the compiler reads in the st<strong>and</strong>ard specs file, in<br />

order to override the defaults that the pic30-gcc driver program<br />

uses when determining what switches to pass to pic30-cc1,<br />

pic30-as, pic30-ld, etc. More than one -specs=file can be<br />

specified on the comm<strong>and</strong> line, <strong>and</strong> they are processed in order,<br />

from left to right.<br />

3.5.11 Options <strong>for</strong> Code Generation Conventions<br />

Options of the <strong>for</strong>m -fflag specify machine-independent flags. Most flags have both<br />

positive <strong>and</strong> negative <strong>for</strong>ms; the negative <strong>for</strong>m of -ffoo would be -fno-foo. In the<br />

table below, only one of the <strong>for</strong>ms is listed (the one that is not the default.)<br />

TABLE 3-15: CODE GENERATION CONVENTION OPTIONS<br />

Option Definition<br />

-fargument-alias<br />

-fargument-noalias<br />

-fargumentnoalias-global<br />

Specify the possible relationships among parameters <strong>and</strong> between<br />

parameters <strong>and</strong> global data.<br />

-fargument-alias specifies that arguments (parameters) may<br />

alias each other <strong>and</strong> may alias global storage.<br />

-fargument-noalias specifies that arguments do not alias<br />

each other, but may alias global storage.<br />

-fargument-noalias-global specifies that arguments do not<br />

alias each other <strong>and</strong> do not alias global storage.<br />

Each language will automatically use whatever option is required<br />

by the language st<strong>and</strong>ard. You should not need to use these<br />

options yourself.<br />

DS51284H-page 56 © 2008 <strong>Microchip</strong> Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!