4.6.6 Options for Controlling Optimization
The options shown in the table below control compiler optimizations and are described in the sections that follow. See Optimizations for a description of the sorts of optimizations possible.
Many of these controls specify a set of optimizations and some optimization sets disable certain optimizations, thus a ‘select all options’ approach will not produce the most compact output.
| Option (links to explanatory section) | Builds with |
|---|---|
-O0 | Minimal optimizations (default). |
-O
| Optimization level 1. |
-O2 | Optimization level 2. |
-O3 | Optimization level 3. |
-Og | Less optimizations for better debugging. |
-Os | Size-orientated optimizations. |
-fasmfile | Optimizations applied to assembly source files. |
-fcacheconst | Objects qualified const potentially in
RAM. |
-f[no-]interrupt-context-loops | Loops being considered when preserving working registers in interrupt context switch code |
-flocal | Local optimization set only. |
--nofallback | No longer has any effect and is ignored by the compiler. |
-fzeroallram=off|on|auto | All RAM zeroed at startup |
