Back to main page

AVR UC3 Series Software Framework: the UTILS folder

Copyright © 2006-2008 Atmel Corporation

Introduction

This directory contains files that are used by all other directories of the framework: it holds several linker script files, IAR & GCC pre-compiled libraries of some Software Framework modules, and C/C++ files with general usage defines, macros and functions.

 

UTILS folder Description

This directory consists of the following contents:

compiler.h

This file defines commonly used types and macros.

 

AVR32_HEADER_FILES folder

This module gathers a set of part-specific header files for the avr32-gcc Gnu Compiler Collection and for the IAR IDE (see the avr32-headers.zip file).

For installation of these header files, see the installation page.

 

DEBUG folder

This module gathers a set of useful functions to print data on the USART.

print_funcs.h is the interface of this module and print_funcs.c is its implementation.

 

LIBS folder

This module gathers a set of pre-compiled archive files for both GCC and IAR: one set for the DRIVERS, the other for the DSPLIB.

The /UTILS/LIBS/DRIVERS subfolder holds the libraries for some of the modules of the /DRIVERS folder.

It is compiled for all UC3™ A, A3, B, C and L Series devices, and for usual optimisations.

  1. For GCC, found under /UTILS/LIBS/DRIVERS/AT32UC3A/GCC:
  2. For IAR, found under /UTILS/LIBS/DRIVERS/AT32UC3A/IAR:
  • GCC and IAR libraries share the same API. The header files are found under /UTILS/LIBS/DRIVERS/AT32UC3A3/INCLUDE/. Note that these are copies of the original header files from the DRIVERS/ modules.
    1. For GCC, found under /UTILS/LIBS/DRIVERS/AT32UC3A3/GCC:
    2. For IAR, found under /UTILS/LIBS/DRIVERS/AT32UC3A3/IAR:
  • GCC and IAR libraries share the same API. The header files are found under /UTILS/LIBS/DRIVERS/AT32UC3B/INCLUDE/. Note that these are copies of the original header files from the DRIVERS/ modules.
    1. For GCC, found under /UTILS/LIBS/DRIVERS/AT32UC3B/GCC:
    2. For IAR, found under /UTILS/LIBS/DRIVERS/AT32UC3B/IAR:
  • GCC and IAR libraries share the same API. The header files are found under /UTILS/LIBS/DRIVERS/AT32UC3C/INCLUDE/. Note that these are copies of the original header files from the DRIVERS/ modules.
    1. For GCC, found under /UTILS/LIBS/DRIVERS/AT32UC3C/GCC:
    2. For IAR, found under /UTILS/LIBS/DRIVERS/AT32UC3C/IAR:
  • GCC and IAR libraries share the same API. The header files are found under /UTILS/LIBS/DRIVERS/AT32UC3L/INCLUDE/. Note that these are copies of the original header files from the DRIVERS/ modules.
    1. For GCC, found under /UTILS/LIBS/DRIVERS/AT32UC3L/GCC:
    2. For IAR, found under /UTILS/LIBS/DRIVERS/AT32UC3A3/IAR:
  • Libs can be rebuilt with a script: \UTILS\LIBS\DRIVERS\build.sh (no argument). The sources used for the build of the libraries are under /DRIVERS/.
  • Note that USBB and MACB drivers are not part of the libs, since they require a specific configuration file(respectively named conf_usb.h and conf_eth.h) which are application-dependent.
  •  

    The /UTILS/LIBS/DSPLIB subfolder holds the libraries for some of the modules of the /SERVICES/DSPLIB folder.

    It is compiled for all UC3 devices, and for usual optimisations.

    1. The following libraries are optimized for AVR32 UC architecture revision 1 (e.g. AT32UC3B0256):
    2. The following libraries are optimized for AVR32 UC architecture revision 2 (e.g. AT32UC3A0512):
    3. The following libraries are optimized for AVR32 UC architecture revision 2 (e.g. AT32UC3A3256):
    4. The following libraries are optimized for AVR32 UC architecture revision 3 (e.g. AT32UC3L064, AT32UC3C0512C):
  • GCC and IAR libraries share the same API, described in the dsp.h header file, found under /UTILS/LIBS/DSPLIB/INCLUDE/. Note that this header file is a copy of the original header file from the SERVICES/DSPLIB/INCLUDE folder.
  • Libs can be rebuilt with a script: \UTILS\LIBS\DSPLIB\build.sh (no argument). The sources used for the build the libraries are under /SERVICES/DSPLIB/.
  •  

    LINKER_SCRIPTS folder

    This module gathers a set of pre-written linker scripts per microcontroller and compiler.

    For example, the following linker scripts for the AT32UC3A0512 microcontroller are under the ./LINKER_SCRIPTS/AT32UC3A/0512/ folder:

  • GCC/link_uc3a0512.lds : this script allows to link code with GCC.
  • IAR/lnkuc3a0512.xcl : this script allows to link code with IAR.
  • For example, the following linker scripts for the AT32UC3A3256 microcontroller are under the ./LINKER_SCRIPTS/AT32UC3A3/256/ folder:

  • GCC/link_uc3a3256.lds : this script allows to link code with GCC.
  • IAR/lnkuc3a3256.xcl : this script allows to link code with IAR.
  • For example, the following linker scripts for the AT32UC3B0256 microcontroller are under the ./LINKER_SCRIPTS/AT32UC3B/0256/ folder:

  • GCC/link_uc3b0256.lds : this script allows to link code with GCC.
  • IAR/lnkuc3b0256.xcl : this script allows to link code with IAR.
  • For example, the following linker scripts for the AT32UC3C0512C microcontroller are under the ./LINKER_SCRIPTS/AT32UC3C/0512C/ folder:

  • GCC/link_uc3c0512c.lds : this script allows to link code with GCC.
  • IAR/lnkuc3c0512c.xcl : this script allows to link code with IAR.
  • For example, the following linker scripts for the AT32UC3L064 microcontroller are under the ./LINKER_SCRIPTS/AT32UC3L/064/ folder:

  • GCC/link_uc3l064.lds : this script allows to link code with GCC.
  • IAR/lnkuc3l064.xcl : this script allows to link code with IAR.
  •  

    PREPROCESSOR folder

    This module gathers a set of useful C preprocessor macros. It is composed of the files

  • mrepeat.h: C preprocessor repeating set of macros,
  • preprocessor.h: include of all header files of this module (so that applications only use to include this file),
  • stringz.h: C preprocessor stringenizer set of macros,
  • tpaste.h: C preprocessor token manipulation set of macros.
  •  

    STARTUP_FILES folder

    This module gathers a set of pre-written startup files per compiler.

    A startup file gets executed just after the reset vector and before the main() C function (when it's done doing its work, the startup actually jumps to the main() function).

    The main mission of a startup file is to initialize critical registers (example: the stack pointer) and memory.

    For example, the following GCC startup file is under the ./STARTUP_FILES/GCC/ folder:

  • crt0.S: example of a basic startup file, completely written in assembly language.
  •  

    NEWLIB_ADDONS folder

    The AVR32 GNU Toolchain v2.1 has removed some newlib addons files that were present in the previous versions: exceptions, interrupts and usart support. To minimize the effect on the Software Framework and on customers, these files have been added in the Software Framework as a module named NEWLIB_ADDONS.

    The NEWLIB_ADDONS module is organized as follows:
  • under UTILS/NEWLIB_ADDONS/ the src code,
  • under UTILS/NEWLIB_ADDONS/Build the scripts to build the libraries,
  • under UTILS/LIBS/NEWLIB_ADDONS/INCLUDE the nlao interface header files.
  • under UTILS/LIBS/NEWLIB_ADDONS/ the archive libs for AT32AP7, AT32UCR1, AT32UCR2, AT32UCR3:
  •  


    AVR is a registered trademark of Atmel Corporation.

    >