4.4.3 xc32-gcc (32-bit C Compiler)
A subset of command-line options may be specified in MPLAB X IDE. Select a category and set up compiler options.
See also 4.4.7 Options Page Features.
Option | Description | Command Line |
---|---|---|
Have symbols in production build | Build for debugging in a production build image. | -g |
Enable App IO | Support the APPIN/APPOUT debugging feature with REAL ICE. | -mappio-debug |
Isolate each function in a section | This option is often used with the linker's --gc-sections option to remove unreferenced functions.Check to place each function into its own section in the output file. The name of the function determines the section’s name in the output file. Note: When you specify this option, the assembler and linker may create larger object and executable files and will also be slower. Uncheck to place multiple functions in a section. | -ffunction-sections |
Place data into its own section | This option is often used with the linker's --gc-sections option to remove unreferenced statically-allocated variables.Place each data item into its own section in the output file. The name of the data item determines the name of the section. When you specify this option, the assembler and linker may create larger object and executable files and will also be slower. | -fdata-sections |
Enable toplevel reordering | Allows the compiler to reorder top-level functions, variables, and asm
statements, in which case, they might not be output in the same order
that they appear in the input file. | -ftoplevel-reorder |
Use indirect calls | Enable full-range calls. | -mlong-calls |
Generate 16-bit code | Generate code for the MIPS16 instruction set, reducing code size. | -[mno-]mips16 |
Generate microMIPS compressed code | Generate code using the microMIPS™ instructions. This feature is available only in the PRO edition. | -m[no-]micromips |
Exclude floating-point library | Exclude support for floating-point operations reducing code size for applications that do not require floating-point support. | -mno-float |
Note that some of the compiler options specified by fields in Project Property Categories other than Optimization can affect the size and execution speed of your project. Consider using the Compiler Advisor, accessible via the MPLAB X IDE
menu item, to compare the size of your project when built with different combination of compiler options.Option | Description | Command Line |
---|---|---|
Optimization Level | Select an optimization level. Your compiler edition may support only some optimizations.
Equivalent to -On option, where n is
an option below:0 - Do not optimize. The compiler’s goal is to reduce the cost of compilation and to make debugging produce the expected results. 1 - Optimize. Optimizing compilation takes somewhat longer and a lot more host memory for a large function. The compiler tries to reduce code size and execution time. 2 - Optimize even more. The compiler performs nearly all supported optimizations that do not involve a space-speed trade-off. 3 - Optimize yet more favoring speed (superset of O2). s - Optimize yet more favoring size (superset of O2). | -O0 -O1 -O2 -O3 -Os |
Unroll loops | This option often increases execution speed at the expense of larger code size. Check to perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or run time. Uncheck to not unroll loops. | -funroll-loops |
Omit frame pointer | Check to not keep the Frame Pointer in a register for functions that don’t need one. Uncheck to keep the Frame Pointer. | -fomit-frame-pointer |
Pre-optimization instruction scheduling | Default for optimization level: - Disable - Enable | -f[no-]schedule-insns |
Post-optimization instruction scheduling | Default for optimization level: - Disable - Enable | -f[no-]schedule-insns2 |
Use common tentative definitions | Controls the placement of global variables defined without an initializer. | -f[no-]common |
Option | Description | Command Line |
---|---|---|
Preprocessor macros | Project-specific preprocessor macro defines passed via the compiler's –D option. | |
Include directories | Search these directories for project-specific include files. | |
Make warnings into errors | Check to halt compilation based on warnings as well as errors. Uncheck to halt compilation based on errors only. | -Werror |
Additional warnings | Check to enable all warnings. Uncheck to disable warnings. | -Wall |
Enable address-attribute warning | -Waddress-attribute-use | |
support-ansi | Check to issue all warnings demanded by strict ANSI C. Uncheck to issue all warnings. | -ansi |
strict-ansi | Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. | -pedantic |
Use CCI syntax | Enable support for the CCI syntax (see 25 Common C Interface). | -mcci |
Use IAR syntax | Enable support for syntax used by other toolchain vendors. | -mext=IAR |