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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.6 ENVIRONMENT VARIABLES<br />
Using the <strong>Compiler</strong> on the Comm<strong>and</strong> Line<br />
The variables in this section are optional, but, if defined, they will be used by the<br />
compiler. The compiler driver, or other subprogram, may choose to determine an<br />
appropriate value <strong>for</strong> some of the following environment variables if they are unset. The<br />
driver, or other subprogram, takes advantage of internal knowledge about the<br />
installation of the compiler. As long as the installation structure remains intact, with all<br />
subdirectories <strong>and</strong> executables remaining in the same relative position, the driver or<br />
subprogram will be able to determine a usable value.<br />
TABLE 3-16: COMPILER-RELATED ENVIRONMENTAL VARIABLES<br />
Option Definition<br />
PIC30_C_INCLUDE_<br />
PATH<br />
PIC30_COMPILER_<br />
PATH<br />
PIC30_EXEC_<br />
PREFIX<br />
PIC30_LIBRARY_<br />
PATH<br />
This variable’s value is a semicolon-separated list of directories, much<br />
like PATH. When the compiler searches <strong>for</strong> header files, it tries the<br />
directories listed in the variable, after the directories specified with -I<br />
but be<strong>for</strong>e the st<strong>and</strong>ard header file directories.<br />
If the environment variable is undefined, the preprocessor chooses an<br />
appropriate value based on the st<strong>and</strong>ard installation. By default, the<br />
following directories are searched <strong>for</strong> include files:<br />
\include <strong>and</strong><br />
\support\h<br />
The value of PIC30_COMPILER_PATH is a semicolon-separated list of<br />
directories, much like PATH. The compiler tries the directories thus<br />
specified when searching <strong>for</strong> subprograms, if it can’t find the<br />
subprograms using PIC30_EXEC_PREFIX.<br />
If PIC30_EXEC_PREFIX is set, it specifies a prefix to use in the<br />
names of subprograms executed by the compiler. No directory<br />
delimiter is added when this prefix is combined with the name of a<br />
subprogram, but you can specify a prefix that ends with a slash if you<br />
wish. If the compiler cannot find the subprogram using the specified<br />
prefix, it tries looking in your PATH environment variable.<br />
If the PIC30_EXEC_PREFIX environment variable is unset or set to<br />
an empty value, the compiler driver chooses an appropriate value<br />
based on the st<strong>and</strong>ard installation. If the installation has not been<br />
modified, this will result in the driver being able to locate the required<br />
subprograms.<br />
Other prefixes specified with the -B comm<strong>and</strong> line option take<br />
precedence over the user- or driver-defined value of<br />
PIC30_EXEC_PREFIX.<br />
Under normal circumstances it is best to leave this value undefined<br />
<strong>and</strong> let the driver locate subprograms itself.<br />
This variable’s value is a semicolon-separated list of directories, much<br />
like PATH. This variable specifies a list of directories to be passed to<br />
the linker. The driver’s default evaluation of this variable is:<br />
\lib; \support\gld.<br />
PIC30_OMF Specifies the OMF (Object Module Format) to be used by the compiler.<br />
By default, the tools create COFF object files. If the environment<br />
variable PIC30_OMF has the value elf, the tools will create ELF<br />
object files.<br />
TMPDIR If TMPDIR is set, it specifies the directory to use <strong>for</strong> temporary files.<br />
The compiler uses temporary files to hold the output of one stage of<br />
compilation that is to be used as input to the next stage: <strong>for</strong> example,<br />
the output of the preprocessor, which is the input to the compiler<br />
proper.<br />
© 2008 <strong>Microchip</strong> Technology Inc. DS51284H-page 59