Up: AVRLIB on Wiring and Arduino


AVR-GCC is a compiler that takes C language high level code and creates a binary source which can be uploaded into an AVR micro controller. Thus AVR-GCC might be regarded as a 'C' cross compiler for producing AVR code. AVR-libc are 'C' run-time libraries, header files, and documentation primarily for the AVR target and are used in conjunction with AVR-GCC . Please note that AVR-libc and AVRLIB are different sets of libraries but both work with the AVR-GCC compiler.

Once code in 'C' is written for a particular project AVR-GCC will turn C code into assembly language files. AVR-libc includes all the header files that contain the addresses of port and register names, the floating point library, AVR-specific macros, and AVR start-up code. It also provides a lot of documentation, both on the library items itself as well as on a number of general items on the entire tool chain, including a FAQ.

Individual assembler files are then converted into object files. Object files are files of code that AVR chips could run. The linker AVR-ld will take all these assembler files, and cross-reference functions names to create one single object file. The linker will also take modules from the 'C' library and make them into a single object. Normally this linked object is in ELF format and furthermore AVR-objcopy is used to generate a HEX format file.

To install AVR-GCC as well as all AVR-Tools like avr-libc, avr-gcc-c++, avr-binutils, avr-gdb, avr-libc-docs on Fedora 7 and above, as root, just issue the 'yum' command with something like:

 		 [host] yum install avr-*        

Other Linux distributions use the 'apt-get' command in a similar way. For OS-X, CCRMA's PID Wiki has instructions for Setting up your Computer for AVR Development. Fink on OS-X might include AVR-GCC as well AVR-Tools. Windz users have several options like AVR-Studio, elsewhere in this article (see §4.1), and also WinAVR or PonyProg.

More documentation about AVR-GCC can be found at AVR FREAKS Wiki: What is AVR-GCC ?. . Documentation about AVR libc can be found at the AVR Libc Home Page. Further references for understanding AVR-GCC programming are found at:

next up previous
Next: Wiring Up: AVRLIB on Wiring and Arduino Previous: Other important configuration files

© Copyright 2001-2008 CCRMA, Stanford University. All rights reserved.
Created and Mantained by Juan Reyes