To get help about ARM GCC Toolchain, you can do the following:
For general information about GCC, visit the official GNU GCC web site
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 that are available for the ARM GNU Toolchain in Atmel 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 | |
There one can define (-D) or undefine (-U) a number of 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 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. It will be replaced
with the appropriate (device_name)_flash.ld file during Build. 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 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 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 |