Arm Gnu Toolchain Readme PDF
Arm Gnu Toolchain Readme PDF
Introduction
The Atmel ARM GNU Toolchain (5.3.1.487) supports Atmel ARM devices.
The ARM toolchain is based on the free and open-source GCC. This toolchain
is built from sources published by ARM's "GNU Tools for ARM Embedded
Processors" project at launchpad.net (https://launchpad.net/gcc-arm-embedded).
The toolchain includes compiler, assembler, linker, binutils (GCC and binutils),
GNU Debugger (GDB with builtin simulator) and Standard C library (newlib,
newlib nano).
42368A-MCU-06/2016
Table of Contents
Introduction .................................................................................... 1
1. Supported Configuration ......................................................... 3
1.1. Supported Hosts ................................................................... 3
1.2. Supported Targets ................................................................. 3
If you want to try the Atmel ARM GNU Toolchain along with Atmel studio, you can download and install
Atmel Studio version 6.0 or later which will also install the Atmel ARM GNU toolchain. See Atmel studio
release notes for more details.
Note 64-bit version of libncurses and libc are required to run the tools.
2.4 Upgrading
If the Atmel ARM GNU Toolchain is installed by Atmel Studio installation, refer Atmel Studio documentation for
more details.
If the toolchain is installed separately using one of the (Windows, Linux, Mac) installers, upgrading is not
supported. You can install the new package side-by-side of the old package and use it.
1
http://www.atmel.com/tools/atmel-arm-toolchain.aspx
2
http://www.atmel.com/tools/atmel-arm-toolchain.aspx
3
http://www.atmel.com/tools/atmel-arm-toolchain.aspx
3.1 Layout
The layout of the installation is as follows.
INSTALLDIR
The directory where the ARM GNU Toolchain is installed in the target machine.
INSTALLDIR\bin
The ARM software development programs. This directory should be in your PATH environemnt
variable. (Note : If you are using this toolchain from within Atmel Studio, please configure Atmel studio
appropriately). This includes
GNU Binutils
GCC
GDB
INSTALLDIR\arm-none-eabi\lib
The directory which have the ARM newlib libraries, startup files and linker scripts.
INSTALLDIR\arm-none-eabi\include
ARM-newlib header files. This is where the system include files will be searched for by the toolchain.
INSTALLDIR\lib
GCC libraries, other libraries and headers.
INSTALLDIR\libexec
GCC program components.
3.2 Components
1
The components used to build this toolchain along with their version number can be found here .
1
http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/5.3.1
1. Compiler
2. Assembler
3. Linker
4. Archiver
5. File converter
7. C Library
8. Debugger
4.1 Compiler
The compiler is the GNU compiler collection, or GCC. This compiler is incredibly flexible and can be hosted on
many platforms, it can target many different processors/operating systems(backends), and can be configured
for multiple different languages (frontends).
The GCC included is targeted for the ARM processor, and is configured to compile C, and C++.
Because this GCC is targeted for the ARM, the main executable that is created is prefixed with the target
name: `arm-none-eabi-gcc`. It is also referred to as ARM GCC.
`arm-none-eabi-gcc` is just a driver program. The compiler itself is called cc1.exe for C, or cc1plus.exe for C
++. Also the preprocessor cpp.exe will usually automatically be prefixed with the target name arm-none-eabi-
cpp.exe. The actual set of component programs called is usually derived from the suffix of each soruce code
file being processed.
GCC compiles a high-level computer lanugage into assembly, and that is all. It cannot work alone. GCC is
coupled with another project, GNU Binutils, which provides the assembler, linker, librarian and more. Since
GCC is just a driver program, it can automatically call the assembler and linker directly to build the final
program.
arm-none-eabi-ar: The GNU Archiver, Create, modify, and extract from archives (libraries)
arm-none-eabi-strip:Discard symbols
See the binutils user manual for more information on what each program can do.
4.3 C Library
Newlib is the Standard C Library for ARM GCC. Newlib is the C library intended for use on embedded systems.
It is a conglomeration of sevaral library parts. The library is ported to support ARM processor.
In addition to standard C library, newlib-nano also added to the toolchain package. Newlib-nano is newlib
branch optimized for code size by ARM (https://launchpad.net/gcc-arm-embedded). To use newlib-nano, users
should provide additional gcc link option "--specs=nano.specs". For more details, refer to the readme from
1
here .
4.4 Debugging
The toolchain distribution ships the `arm-none-eabi-gdb` which can be used for debugging purposes.
Atmel Studio provides faclities to debug the executable produced by this toolchain. Note that `Atmel
Studio` is currently free to the public, but it is not Open Source.
1
http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/5.3.1
2
https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update
3
http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/5.3.1
Default debug information is set to DWARF-2, which is supported by Atmel software debugger tools.
Added object file wise memory usage details to map file. This shall be enabled using '--detailed-mem-
usage' linker option.
Multilib for armv7-a architecture with float variants Neon-vfpv4 and vfpv4-d16 FPUs.
2
Please read section "Architecture options usage" of gcc-arm-embedded project's readme (also available here)
for more information about multilib selections. Please refer below table for Atmel's modification to armv7-a
multilibs.
Table 5-1.
ARM Core Command Line Options multilib
armv7-a thumb mode and Soft/ -march=armv7-a -mthumb - armv7-a/thumb-softfp-vfpv4-d16
Softfp float-abi mfloat-abi=soft -mfpu=vfpv4-d16
armv7-a arm mode and soft/softfp -march=armv7-a -mfloat-abi=soft armv7-a/arm-softfp-vfpv4-d16
float-abi -mfpu=vfpv4-d16
armv7-a thumb mode, hard float- -march=armv7-a -mthumb - armv7-a/thumb-neon-vfpv4
abi, neon-vfpv4 mfloat-abi=hard -mfpu=neon-
vfpv4
armv7-a arm mode, hard float- -march=armv7-a -mfloat-abi=hard armv7-a/arm-neon-vfpv4
abi, neon-vfpv4 -mfpu=neon-vfpv4
armv7-a thumb mode, hard float- -march=armv7-a -mthumb - armv7-a/thumb-vfpv4-d16
abi, vfpv4-d16 mfloat-abi=hard -mfpu=vfpv4-d16
armv7-a arm mode, hard float- -march=armv7-a -mfloat-abi=hard armv7-a/arm-vfpv4-d16
abi, vfpv4-d16 -mfpu=vfpv4-d16
1
https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update
2
http://distribute.atmel.no/tools/opensource/Atmel-ARM-GNU-Toolchain/5.3.1/readme.txt
3
https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
6.1 Contact
1
For support on Atmel ARM GNU Toolchain, visit design support .
2
Users of ARM GNU Toolchain are also welcome to discuss on the AT91SAM Community website forum.
6.2 Disclaimer
Atmel ARM GNU toolchain is distributed free of charge for the purpose of developing applications for Atmel
SAM devices. Atmel ARM GNU Toolchain comes without any warranty.
1
http://www.atmel.com/design-support/
2
http://www.at91.com/
Atmel , Atmel logo and combinations thereof, Enabling Unlimited Possibilities , AVR , tinyAVR , XMEGA , megaAVR SAM , and others are registered trademarks or
trademarks of Atmel Corporation in U.S. and other countries. Windows , and others, are registered trademarks of Microsoft Corporation in U.S. and or other countries.
ARM , Cortex are registered trademark of ARM Holdings in U.K. Other terms and product names may be trademarks of others.
DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted
by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE,
ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION,
OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products
descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable
for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.
SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure
of such products would reasonably be expected to result in significant personal injury or death (Safety-Critical Applications) without an Atmel officer's specific written consent. Safety-Critical
Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed
nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military- grade. Atmel products are not designed nor intended for use in
automotive applications unless specifically designated by Atmel as automotive-grade.