\hypertarget{overview_overview_introduction}{}\doxysubsection{Introduction}\label{overview_overview_introduction}
Welcome to the open source software development toolset for the Atmel A\+V\+R!

There is not a single tool that provides everything needed to develop software for the A\+VR. It takes many tools working together. Collectively, the group of tools are called a toolset, or commonly a toolchain, as the tools are chained together to produce the final executable application for the A\+VR microcontroller.

The following sections provide an overview of all of these tools. You may be used to cross-\/compilers that provide everything with a G\+UI front-\/end, and not know what goes on \char`\"{}underneath the hood\char`\"{}. You may be coming from a desktop or server computer background and not used to embedded systems. Or you may be just learning about the most common software development toolchain available on Unix and Linux systems. Hopefully the following overview will be helpful in putting everything in perspective.\hypertarget{overview_overview_fsf_and_gnu}{}\doxysubsection{F\+S\+F and G\+NU}\label{overview_overview_fsf_and_gnu}
According to its website, "the Free Software Foundation (F\+SF), established in 1985, is dedicated to promoting computer users\textquotesingle{} rights to use, study, copy, modify, and redistribute computer programs. The F\+SF promotes the development and use of free software, particularly the G\+NU operating system, used widely in its G\+N\+U/\+Linux variant." The F\+SF remains the primary sponsor of the G\+NU project.

The G\+NU Project was launched in 1984 to develop a complete Unix-\/like operating system which is free software\+: the G\+NU system. G\+NU is a recursive acronym for »\+G\+NU\textquotesingle{}s Not Unix«; it is pronounced guh-\/noo, approximately like canoe.

One of the main projects of the G\+NU system is the G\+NU Compiler Collection, or G\+CC, and its sister project, G\+NU Binutils. These two open source projects provide a foundation for a software development toolchain. Note that these projects were designed to originally run on Unix-\/like systems.\hypertarget{overview_overview_gcc}{}\doxysubsection{G\+CC}\label{overview_overview_gcc}
G\+CC stands for G\+NU Compiler Collection. G\+CC is highly flexible compiler system. It has different compiler front-\/ends for different languages. It has many back-\/ends that generate assembly code for many different processors and host operating systems. All share a common \char`\"{}middle-\/end\char`\"{}, containing the generic parts of the compiler, including a lot of optimizations.

In G\+CC, a {\itshape host} system is the system (processor/\+OS) that the compiler runs on. A {\itshape target} system is the system that the compiler compiles code for. And, a {\itshape build} system is the system that the compiler is built (from source code) on. If a compiler has the same system for {\itshape host} and for {\itshape target}, it is known as a {\itshape native} compiler. If a compiler has different systems for {\itshape host} and {\itshape target}, it is known as a cross-\/compiler. (And if all three, {\itshape build}, {\itshape host}, and {\itshape target} systems are different, it is known as a Canadian cross compiler, but we won\textquotesingle{}t discuss that here.) When G\+CC is built to execute on a {\itshape host} system such as Free\+B\+SD, Linux, or Windows, and it is built to generate code for the A\+VR microcontroller {\itshape target}, then it is a cross compiler, and this version of G\+CC is commonly known as \char`\"{}\+A\+V\+R G\+C\+C\char`\"{}. In documentation, or discussion, A\+VR G\+CC is used when referring to G\+CC targeting specifically the A\+VR, or something that is A\+VR specific about G\+CC. The term \char`\"{}\+G\+C\+C\char`\"{} is usually used to refer to something generic about G\+CC, or about G\+CC as a whole.

G\+CC is different from most other compilers. G\+CC focuses on translating a high-\/level language to the target assembly only. A\+VR G\+CC has three available compilers for the A\+VR\+: C language, C++, and Ada. The compiler itself does not assemble or link the final code.

G\+CC is also known as a \char`\"{}driver\char`\"{} program, in that it knows about, and drives other programs seamlessly to create the final output. The assembler, and the linker are part of another open source project called G\+NU Binutils. G\+CC knows how to drive the G\+NU assembler (gas) to assemble the output of the compiler. G\+CC knows how to drive the G\+NU linker (ld) to link all of the object modules into a final executable.

The two projects, G\+CC and Binutils, are very much interrelated and many of the same volunteers work on both open source projects.

When G\+CC is built for the A\+VR target, the actual program names are prefixed with \char`\"{}avr-\/\char`\"{}. So the actual executable name for A\+VR G\+CC is\+: avr-\/gcc. The name \char`\"{}avr-\/gcc\char`\"{} is used in documentation and discussion when referring to the program itself and not just the whole A\+VR G\+CC system.

See the G\+CC Web Site and G\+CC User Manual for more information about G\+CC.\hypertarget{overview_overview_binutils}{}\doxysubsection{G\+N\+U Binutils}\label{overview_overview_binutils}
The name G\+NU Binutils stands for \char`\"{}\+Binary Utilities\char`\"{}. It contains the G\+NU assembler (gas), and the G\+NU linker (ld), but also contains many other utilities that work with binary files that are created as part of the software development toolchain.

Again, when these tools are built for the A\+VR target, the actual program names are prefixed with \char`\"{}avr-\/\char`\"{}. For example, the assembler program name, for a native assembler is \char`\"{}as\char`\"{} (even though in documentation the G\+NU assembler is commonly referred to as \char`\"{}gas\char`\"{}). But when built for an A\+VR target, it becomes \char`\"{}avr-\/as\char`\"{}. Below is a list of the programs that are included in Binutils\+:

\begin{DoxyParagraph}{avr-\/as}
The Assembler.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/ld}
The Linker.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/ar}
Create, modify, and extract from libraries (archives).
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/ranlib}
Generate index to library (archive) contents.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/objcopy}
Copy and translate object files to different formats.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/objdump}
Display information from object files including disassembly.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/size}
List section sizes and total size.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/nm}
List symbols from object files.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/strings}
List printable strings from files.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/strip}
Discard symbols from files.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/readelf}
Display the contents of E\+LF format files.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/addr2line}
Convert addresses to file and line.
\end{DoxyParagraph}
\begin{DoxyParagraph}{avr-\/c++filt}
Filter to demangle encoded C++ symbols.
\end{DoxyParagraph}
\hypertarget{overview_overview_avr-libc}{}\doxysubsection{avr-\/libc}\label{overview_overview_avr-libc}
G\+CC and Binutils provides a lot of the tools to develop software, but there is one critical component that they do not provide\+: a Standard C Library.

There are different open source projects that provide a Standard C Library depending upon your system time, whether for a native compiler (G\+NU Libc), for some other embedded system (newlib), or for some versions of Linux (u\+C\+Libc). The open source A\+VR toolchain has its own Standard C Library project\+: avr-\/libc.

A\+V\+R-\/\+Libc provides many of the same functions found in a regular Standard C Library and many additional library functions that is specific to an A\+VR. Some of the Standard C Library functions that are commonly used on a PC environment have limitations or additional issues that a user needs to be aware of when used on an embedded system.

A\+V\+R-\/\+Libc also contains the most documentation about the whole A\+VR toolchain.\hypertarget{overview_overview_building_software}{}\doxysubsection{Building Software}\label{overview_overview_building_software}
Even though G\+CC, Binutils, and avr-\/libc are the core projects that are used to build software for the A\+VR, there is another piece of software that ties it all together\+: Make. G\+NU Make is a program that makes things, and mainly software. Make interprets and executes a Makefile that is written for a project. A Makefile contains dependency rules, showing which output files are dependent upon which input files, and instructions on how to build output files from input files.

Some distributions of the toolchains, and other A\+VR tools such as M\+File, contain a Makefile template written for the A\+VR toolchain and A\+VR applications that you can copy and modify for your application.

See the G\+NU Make User Manual for more information.\hypertarget{overview_overview_avrdude}{}\doxysubsection{A\+V\+R\+D\+U\+DE}\label{overview_overview_avrdude}
After creating your software, you\textquotesingle{}ll want to program your device. You can do this by using the program A\+V\+R\+D\+U\+DE which can interface with various hardware devices to program your processor.

A\+V\+R\+D\+U\+DE is a very flexible package. All the information about A\+VR processors and various hardware programmers is stored in a text database. This database can be modified by any user to add new hardware or to add an A\+VR processor if it is not already listed.\hypertarget{overview_overview_gdb_insight_ddd}{}\doxysubsection{G\+D\+B / Insight / D\+DD}\label{overview_overview_gdb_insight_ddd}
The G\+NU Debugger (G\+DB) is a command-\/line debugger that can be used with the rest of the A\+VR toolchain. Insight is G\+DB plus a G\+UI written in Tcl/\+Tk. Both G\+DB and Insight are configured for the A\+VR and the main executables are prefixed with the target name\+: avr-\/gdb, and avr-\/insight. There is also a \char`\"{}text mode\char`\"{} G\+UI for G\+DB\+: avr-\/gdbtui. D\+DD (Data Display Debugger) is another popular G\+UI front end to G\+DB, available on Unix and Linux systems.\hypertarget{overview_overview_avarice}{}\doxysubsection{A\+Va\+R\+I\+CE}\label{overview_overview_avarice}
A\+Va\+R\+I\+CE is a back-\/end program to A\+VR G\+DB and interfaces to the Atmel J\+T\+AG In-\/\+Circuit Emulator (I\+CE), to provide emulation capabilities.\hypertarget{overview_overview_simulavr}{}\doxysubsection{Simul\+A\+VR}\label{overview_overview_simulavr}
Simul\+A\+VR is an A\+VR simulator used as a back-\/end with A\+VR G\+DB.\hypertarget{overview_overview_utilities}{}\doxysubsection{Utilities}\label{overview_overview_utilities}
There are also other optional utilities available that may be useful to add to your toolset.

{\ttfamily S\+Record} is a collection of powerful tools for manipulating E\+P\+R\+OM load files. It reads and writes numerous E\+P\+R\+OM file formats, and can perform many different manipulations.

{\ttfamily M\+File} is a simple Makefile generator is meant as an aid to quickly customize a Makefile to use for your A\+VR application.\hypertarget{overview_overview_distros}{}\doxysubsection{Toolchain Distributions (\+Distros)}\label{overview_overview_distros}
All of the various open source projects that comprise the entire toolchain are normally distributed as source code. It is left up to the user to build the tool application from its source code. This can be a very daunting task to any potential user of these tools.

Luckily there are people who help out in this area. Volunteers take the time to build the application from source code on particular host platforms and sometimes packaging the tools for convenient installation by the end user. These packages contain the binary executables of the tools, pre-\/made and ready to use. These packages are known as \char`\"{}distributions\char`\"{} of the A\+VR toolchain, or by a more shortened name, \char`\"{}distros\char`\"{}.

A\+VR toolchain distros are available on Free\+B\+SD, Windows, Mac OS X, and certain flavors of Linux.\hypertarget{overview_overview_open_source}{}\doxysubsection{Open Source}\label{overview_overview_open_source}
All of these tools, from the original source code in the multitude of projects, to the various distros, are put together by many, many volunteers. All of these projects could always use more help from other people who are willing to volunteer some of their time. There are many different ways to help, for people with varying skill levels, abilities, and available time.

You can help to answer questions in mailing lists such as the avr-\/gcc-\/list, or on forums at the A\+VR Freaks website. This helps many people new to the open source A\+VR tools.

If you think you found a bug in any of the tools, it is always a big help to submit a good bug report to the proper project. A good bug report always helps other volunteers to analyze the problem and to get it fixed for future versions of the software.

You can also help to fix bugs in various software projects, or to add desirable new features.

Volunteers are always welcome! \+:-\/) 