Atmel AVR 8-Bit Toolchain 3.5.4 - Release Note
Atmel AVR 8-Bit Toolchain 3.5.4 - Release Note
Introduction
The Atmel AVR 8-bit GNU Toolchain (3.5.4.1709) supports all AVR 8-bit devices.
The AVR 8-bit Toolchain is based on the free and open-source GCC compiler.
The toolchain includes compiler, assembler, linker and binutils (GCC and
Binutils), Standard C library (AVR-libc) and GNU Debugger (GDB).
42372A-MCU-09/2016
Table of Contents
Introduction .................................................................................... 1
1. Installation Instructions ............................................................ 3
1.1. System requirements ............................................................. 3
1.1.1. Hardware requirements .............................................. 3
1.1.2. Software Requirements .............................................. 3
1.2. Downloading, Installing and Upgrading ...................................... 3
1.2.1. Downloading/Installing on Windows .............................. 3
1.2.2. Downloading/Installing on Linux ................................... 3
1.2.3. Upgrading from previous versions ................................ 3
1.3. Layout ................................................................................ 3
AVR 8-bit GNU Toolchain has not been tested on computers with less resources, but may run satisfactorily
depending on the number and size of the projects and the user's patience.
● Windows 2000, Windows XP, Windows Vista, Windows 7 (x86 or x86-64) or Windows 8 (x86 or x86-64)
● The toolchain should work on the Linux distributions Fedora, RedHat Enterprise, Arch Linux and Ubuntu for
both 32-bits and 64-bits architecture. AVR 8-bit GNU Toolchain may very well work on other distributions.
However those are untested and unsupported.
● If you want to try the Atmel AVR8 GNU Toolchain along with Atmel Studio, you can download and install
Atmel Studio 7 or (newer) which will also install the Atmel AVR8 GNU toolchain. See Atmel Studio release
notes for more details.
1.3 Layout
Listed below are some directories you might want to know about.
`<install_dir>` = The directory where you installed AVR 8-bit GNU Toolchain.
● <install_dir>\bin
The AVR software development programs. This directory should be in your `PATH` environment variable.
This includes:
● GNU Binutils
● GCC
1
http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx
2
http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx
● <install_dir>\avr\lib
avr-libc libraries, startup files, linker scripts,and stuff.
● <install_dir>\avr\include
avr-libc header files for AVR 8-bit.
● <install_dir>\avr\include\avr
header files specific to the AVR 8-bit MCU. This is where, for example, #include <avr/io.h> comes from.
● <install_dir>\lib
GCC libraries, other libraries, headers and stuff.
● <install_dir>\libexec
GCC program components
● <install_dir>\doc
Various documentation.
2.2 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 (back-ends), and can be configured
for multiple different languages (front-ends).
The GCC included in AVR 8-bit GNU Toolchain is targeted for the AVR 8-bit microcontroller and is configured
to compile C or C++.
CAUTION: There are caveats on using C++. See the avr-libc FAQ. C++ language is not fully supported and
has some limitations. libstdc++ is unsupported.
Because this GCC is targeted for the AVR 8-bit MCUs, the main executable that is created is prefixed with the
target name: `avr-gcc` (with '.exe' extension on MS Windows). It is also referred to as AVR GCC.
`avr-gcc` is just a "driver" program only. The compiler itself is called `cc1.exe` for C, or `cc1plus.exe` for C+
+. Also, the preprocessor `cpp.exe` will usually automatically be prepended with the target name: `avr-cpp`.
The actual set of component programs called is usually derived from the suffix of each source code file being
processed.
GCC compiles a high-level computer language 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.
● avr-gdb: GDB, the GNU debugger, allows you to see what is going on `inside' another program targeted to
AVR, while it executes.
See the binutils user manual for more information on what each program can do.
2.4 C Library
avr-libc is the Standard C Library for AVR 8-bit GCC. It contains many of the standard C routines, and many
non-standard routines that are specific and useful for the AVR 8-bit MCUs.
In addition to avr-libc libraries, Host IO library (libhostio.a) is integrated to this toolchain. This Host IO library
allows allows the target to use the host's file system and console I/O to perform various avr I/O operations.
NOTE: The actual library is currently split into two main parts, libc.a and libm.a, where the latter contains
mathematical functions (everything mentioned in <math.h>, and a bit more). Also, there are additional libraries
which allow a customization of the printf and scanf function families. avr-libc contains documentation on how to
use (and build) the entire toolset, including code examples. The avr-libc user manual also contains the FAQ on
using the toolset.
2.5 Debugging
Atmel Studio provides a debugger and also provides simulators for the parts that can be used for debugging
as well. Note that `Atmel Studio` is currently free to the public, but it is not Open Source. The GNU debugger is
now shipped along with the toolchain.
1
http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.4
Issue #AVRTC-819:
Fix section type conflict error with -fmerge-all-constants and progmem attribute.
Issue #AVRTC-822:
Fix issue in identifying specs file for mcu
Issue #AVRTC-825:
Fix internal compiler error in push_reload with varargs functions (PR target/71873).
Issue #AVRTC-837:
Fix incorrect code/AVR-7_PCREL error in linker (PR ld/20545)
Issue #AVRTC-732:
Program memory images beyond 128KBytes are supported by the toolchain, subject to the limitations
mentioned in "3.17.4.1 EIND and Devices with more than 128 Ki Bytes of Flash" at http://gcc.gnu.org/
onlinedocs/gcc/AVR-Options.html
Issue #AVRTC-733:
Named address spaces are supported by the toolchain, subject to the limitations mentioned in "6.16.1 AVR
Named Address Spaces" at http://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html#AVR%20Named
%20Address%20Spaces
5.1 Disclaimer
AVR 8-bit GNU Toolchain is distributed free of charge for the purpose of developing applications for Atmel AVR
processors. AVR 8-bit GNU Toolchain comes without any warranty.
1
http://www.atmel.com/design-support/
® ® ® ® ® ®
Atmel , Atmel logo and combinations thereof, Enabling Unlimited Possibilities , AVR , tinyAVR , XMEGA , megaAVR , 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.
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.