Software

Compiler and Toolchain Options

Figure 1. Compiler and Toolchain Options


AVR® GNU C Compiler Options

Table 1. AVR® GNU C Compiler Options
Option Description
General options

-mcall-prologues

Use subroutines for functions 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

Preprocessor options

-nostdinc

Do not search the system directories

-E

Preprocess only

Symbols options

Symbols in the source can be defined (-D) or undefined (-U). New symbol declarations can be added, modified, or reordered, using the interface buttons below:

  • Add a new symbol. This symbol and all the following icons are reused with the same meaning in other parts of the Microchip Studio interface.

  • Remove the symbol.

  • Edit the symbol.

  • Move the symbol up in the parsing order.

  • Move the symbol down in the parsing order.

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

No optimization, optimize for speed (level 1 - 3), optimize for size

Other optimization flags (manual input form)

Here you should write optimization flags specific to the platform and your requirements

-ffunction-sections

Prepare functions for garbage collection. If a function is never used, its memory will be scrapped.

-fpack-struct

Pack structure members together

-fshort-enums

Allocate only as many bytes as needed by the enumerated types

-mshort-calls

Use rjmp/rcall limited range instructions on the >8K devices

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

Other debug options (form field)

Architecture specific debug options

Warning messages output options

-Wall

All warnings

-Werror

Escalate warnings to errors

-fsyntax-only

Check syntax only

-pedantic

Check conformity to GNU, raise warnings on non-standard programming practice

-pedantic-errors

Same as above, plus escalate warnings to errors

Miscellaneous options

Other flags (form field)

Input other project-specific flags

-v

Verbose

-ansi

Support ANSI programs

-save-temps

Do not delete temporary files

Option Description