8.2 XC8 Compiler and Toolchain Options: GUI Toolchain Options
This section illustrates the GUI options available for the XC8 compiler in Microchip Studio.
XC8 Common Options
Option | Description |
---|---|
General Options | |
-mrelax | Controls the optimization of the long form of call and jump instruction |
Output File Options | |
.hex | Generate hex file |
.eep | Generate eep file |
.usersignatures | Generate usersignatures file |
.lss | Generate lss file |
Miscellaneous Options | |
Other Common Flags (Form field) | Input other project-specific flags |
XC8 C Compiler Options
Option | Description |
---|---|
General Options | |
-mcall-prologues | Use subroutines for function prologues and epilogues |
-mno-interrupts | Change stack pointer without disabling interrupts |
-funsigned-char | The default char type is unsigned |
-funsigned-bitfield | The default bit field is unsigned |
-nostdinc | Do not search system directories |
-mext=cci | Use CCI |
Symbol Options | |
One can define (-D) or undefine (-U) and several in-source symbols. New symbol declarations can be added, modified or reordered, using the interface buttons below:
| |
Include Directories | |
Contains all the included header and definition directories, can be modified using the same interface as symbols. | |
Optimization Options | |
optimization level(drop-down menu): -O0,-O1, -O2, -O3, -Os, -Og | No optimization, increasing general optimization (levels 1 & 2), optimize for speed (3), optimize for size, optimize for better debugging experience |
-ffunction-sections | Prepare functions for garbage collection. If a function is never used, its memory will be scrapped. |
-fdata-sections | Prepare data for garbage collection |
-fshort-enums | Allocate only as many bytes needed by the enumerated types |
Debug Options | |
Debug level (drop-down menu): none, g1, g2, g3 | Specifies the level of tracing and debugging code and headers left or inserted in the source code |
Warning Messages Output Options | |
-Wall | Show all warnings |
-Werror | Generation of errors instead of warnings for dubious constructs |
-pedantic | Warnings demanded by strict ANSI C. Rejects all programs that use forbidden extensions. |
-w | Inhibit all warnings |
Miscellaneous Options | |
Other flags (Form field) | Input other project-specific flags |
-v | Verbose |
XC8 Linker Options
Option | Description |
---|---|
General Options | |
-nodefaultlibs | Do not use default libraries |
-Wl,-Map | Generate MAP file |
-Wl,-u, -vfprintf | Use vfprintf library |
Libraries Options | |
Libraries -l (form field) | You can add, prioritize or edit library names here using these buttons: , , , , |
Library search path -L (form field) | You can add, prioritize or edit a path where the linker will search for dynamically linked libraries. It uses the same interface as above. |
Optimization Options | |
-Wl,--gc-sections | Garbage collect unused sections |
Miscellaneous Options | |
Other Linker Flags (Form field) | Input other project-specific flags |
XC8 Assembler Options
Option | Description |
---|---|
Miscellaneous Option | |
Other Assembler Flags (Form field) | Input other project-specific flags |
XC8 Archiver Options
Option | Description |
---|---|
General Options | |
Archiver Flags (Form field) | Input other project-specific flags |