7.2 Arm® Compiler and Toolchain Options: GUI
To get help with Arm GCC Toolchain, you can do the following:
- For general information about GCC, visit the official GNU GCC website
- Alternatively, you can write arm-none-eabi-gcc --help and see the explanation of some of the parameters in the command output
This section illustrates the GUI options available for the Arm GNU Toolchain in Microchip Studio.
Option | Description |
---|---|
Thumb(-mthumb)/Arm(-marm) | Switch between Arm and Thumb processor mode |
Option | Description |
---|---|
Preprocessor Options | |
-nostdinc | Do not search system include directories |
-E | Preprocess only; Do not compile, Assemble, or link |
Symbols Options | |
One can define (-D) or undefine (-U) several in-source symbols. New symbol declarations can be added, modified, or reordered, using the interface buttons below:
| |
Include Directories | |
Default Include Path | Enabling this option will add the include path that is specific to the selected SAM device |
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 | Place each function into its own section |
-funsafe-math-optimizations | Enable unsafe match optimizations |
-ffast-math | Enable fast math |
-fpic | Generate position-independent code |
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 |
-pg | Generate gprof information |
-p | Generate prof information |
Warning Messages Output Options | |
-Wall | All warnings |
-Werror | Treat all warnings as 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 |
-w | Inhibits all warnings |
Miscellaneous Options | |
Other flags (form field) | Input other project-specific flags |
-v | Verbose (Display the programs invoked by the compiler) |
-ansi | Support ANSI programs |
-save-temps | Do not delete intermediate files |
Option | Description |
Option | Description |
---|---|
-Wl -nostartfiles | Do not use standard files |
-Wl -nodefault | Do not use default libraries |
-Wl -nostdlib | No start-up or default libraries |
-Wl -s | Omit all symbol information |
-Wl -static | Link statically |
-Map | Generates Map file |
Libraries Options | |
Libraries -Wl, -l (form field) | You can add, prioritize, or edit library names here, using those buttons: , , , , |
Library search path -Wl, -L (form field) | You can add, prioritize, or edit the path where the linker will search for dynamically linked libraries. Same interface as above. |
Optimization Options | |
-Wl, -gc-sections | Garbage collect unused sections |
-funsafe-math-optimizations | Enable unsafe math optimizations |
-ffast-math | Enable fast math |
-fpic | Generate position independent code |
Miscellaneous Options | |
Other linker flags (form field) | Input other project-specific flags |
Option | Description |
Linker Scripts
- In
'linker->miscellaneous->linker flags'
($LinkerScript_FLASH)
is added by default. During Build, it will be replaced by the appropriate (device_name)_flashld file. Similarly,($LinkerScript_SRAM)
will be replaced with the appropriate (device_name)_sram.ld file. - You can always override the default
Flash linker scripts by replacing
($LinkerScript_FLASH)
or($LinkerScript_SRAM)
with your custom linker script option-T'custom_linker_script.ld'
Arm® Assembler Options
Option | Description |
---|---|
Optimization Options | |
Assembler flags (form field) | Miscellaneous assembler flags |
Include path (form field) | You can add, prioritize, or edit the path to the architecture and platform-specific included files here |
-v | Announce version in the assembler output |
-W | Suppress Warnings |
Debugging Options | |
Debugging level (drop-down menu) None, (-g). | Enable debugging symbols and debugging source insertion |
Option | Description |
Arm® Preprocessing Assembler Options
Option | Description |
---|---|
Optimization Options | |
Assembler flags (form field) | Miscellaneous assembler flags |
Include path (form field) | You can add, prioritize, or edit the path to the architecture and platform-specific included files here |
-v | Announce version in the assembler output |
-W | Suppress Warnings |
Debugging Options | |
Debugging level (drop-down menu) None, -Wa -g. | Enables debugging symbols and debugging source insertion |
Option | Description |