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 />

TABLE 3-2: <strong>dsPIC</strong> ® DSC DEVICE-SPECIFIC OPTIONS (CONTINUED)<br />

Option Definition<br />

-mno-isr-warn By default the compiler will produce a warning if the __interrupt__<br />

is not attached to a recognized interrupt vector name. This option will<br />

disable that feature.<br />

-momf=omf Selects the OMF (Object Module Format) to be used by the compiler.<br />

The omf specifier can be one of the following:<br />

coff Produce COFF object files. (This is the default.)<br />

elf Produce ELF object files.<br />

The debugging <strong>for</strong>mat used <strong>for</strong> ELF object files is DWARF 2.0.<br />

-msmall-code Compile using the small code model. Called functions are assumed to<br />

be proximate (within 32 Kwords of the caller). (This is the default.)<br />

-msmall-data Compile using the small data model. All static <strong>and</strong> external variables<br />

are assumed to be located in the lower 8 KB of data memory space.<br />

(This is the default.)<br />

-msmall-scalar Like -msmall-data, except that only static <strong>and</strong> external scalars are<br />

assumed to be in the lower 8 KB of data memory space. (This is the<br />

default.)<br />

-mtext=name Specifying -mtext=name will cause text (program code) to be placed<br />

in a section named name rather than the default .text section. No<br />

white spaces should appear around the =.<br />

-msmart-io<br />

[=0|1|2]<br />

This option attempts to statically analyze <strong>for</strong>mat strings passed to<br />

printf, scanf <strong>and</strong> the ‘f’ <strong>and</strong> ‘v’ variations of these functions. Uses of<br />

nonfloating point <strong>for</strong>mat arguments will be converted to use an<br />

integer-only variation of the library functions.<br />

-msmart-io=0 disables this option, while -msmart-io=2 causes the<br />

compiler to be optimistic <strong>and</strong> convert function calls with variable or<br />

unknown <strong>for</strong>mat arguments. -msmart-io=1 is the default <strong>and</strong> will<br />

only convert the literal values it can prove.<br />

Note 1: The procedure abstractor behaves as the inverse of inlining functions. The pass is<br />

designed to extract common code sequences from multiple sites throughout a<br />

translation unit <strong>and</strong> place them into a common area of code. Although this option<br />

generally does not improve the run-time per<strong>for</strong>mance of the generated code, it can<br />

reduce the code size significantly. Programs compiled with -mpa can be harder to<br />

debug; it is not recommended that this option be used while debugging using the<br />

COFF object <strong>for</strong>mat.<br />

The procedure abstractor is invoked as a separate phase of compilation, after the<br />

production of an assembly file. This phase does not optimize across translation<br />

units. When the procedure-optimizing phase is enabled, inline assembly code must<br />

be limited to valid machine instructions. Invalid machine instructions or instruction<br />

sequences, or assembler directives (sectioning directives, macros, include files,<br />

etc.) must not be used, or the procedure abstraction phase will fail, inhibiting the<br />

creation of an output file.<br />

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

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

Saved successfully!

Ooh no, something went wrong!