To get help about ARM GCC Toolchain, you can do the following:
For general information about GCC, please 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.
Table 19. ARM GNU Common Options
| Option | Description |
|---|---|
| Option | Description |
|
Thumb(-mthumb)/Arm(-marm) |
Switch between Arm and Thumb processor mode |
Table 20. ARM GNU C compiler options
| Option | Description |
|---|---|
| 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 are specific for 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 for 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 |
| Miscelaneous 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 |
Table 21. ARM GCC Linker options
| Option | Description |
|---|---|
| Option | Description |
|
-Wl -nostartfiles |
Do not use standard files |
|
-Wl -nodefault |
Do not use default libraries |
|
-Wl -nostdlib |
No startup 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 |
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"
Note
These device specific linker scripts will be available in the "ProjectFolder/Linkerscripts" directory. In case of changing the device after project creation, Atmel Studio will automatically add the correct linker scripts for the selected device.
ARM Assembler options
Table 22. Arm Assembler options
| Option | Description |
|---|---|
| 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 |
Supprress Warnings |
|
Debugging options | |
|
Debugging level (drop down menu) None ,(-g). |
Enable debugging symbols and debugging source insertion |
ARM Preprocessing Assembler options
Table 23. ARM Preprocessing Assembler options
| Option | Description |
|---|---|
| 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 |
Supress Warnings |
|
Debugging options | |
|
Debugging level (drop down menu) None , -Wa -g. |
Enables debugging symbols and debugging source insertion |



