Back to main page

AVR®32 AT32UC3 Series Software Framework: FAQ

Copyright © 2007 Atmel Corporation

 


Table of Contents


How to install the Software Framework

Check the installation page.

 

How do I know the changes from one release of the Software Framework to the next

For an overview, content, list of new features, bug fixes and known bugs, check the release note.

 

Why do I have hundreds of errors trying to compile some software framework examples

The main reason is probably that the UC3 header files in the GCC or IAR delivery are out of date.

Here is the update procedure (which you can also find in the installation page):

GCC header files update

  1. Go to the AT32UC3{A,B}-X.Y.Z\UTILS\AVR32_HEADER_FILES\GCC folder of the software framework on your machine.
  2. Unzip the AVR32_Header_Files_for_AVR32-GCC.zip file in the C:\Cygwin\usr\local\avr32\include\ folder (Note that the drive letter may change depending on your Cygwin install).
  3. Answer yes to all for header file replacement.

IAR header files update

  1. Go to the AT32UC3{A,B}-X.Y.Z\UTILS\AVR32_HEADER_FILES\IAR folder of the software framework on your machine.
  2. Unzip the AVR32_Header_Files_for_IAR_EWAVR32_X.Yn.zip file in the C:\Program Files\IAR Systems\Embedded Workbench 4.0\avr32\inc folder (Note that the drive letter and installation folder may change depending on the IAR install).
  3. Answer yes to all for header file replacement

 

How to use AVR32Studio and the software framework

The software framework is already included into AVR32Studio. To run any examples, click on File -> New -> Examples... and select the example that can run on your kit.

To add some modules in a project, use the "Software Framework " menu once the project is selected.

 

How to update the Control Panel firmware of the EVK1100

The Control Panel firmware on the EVK1100 is named "EVK1100 control panel".

It is part of the UC3A software framework package and can be found under AT32UC3A-X.Y.Z/APPLICATIONS/EVK1100-CONTROL-PANEL/.

A default .elf file is provided (named uc3a0512-ctrlpanel.elf) in the UC3A Software Framework package and can be found under AT32UC3A-X.Y.Z/APPLICATIONS/EVK1100-CONTROL-PANEL/AT32UC3A0512_EVK1100/GCC/.

To reprogram the default .elf file to target, follow these steps:

  1. Open a cygwin command line window and go under AT32UC3A-X.Y.Z/APPLICATIONS/EVK1100-CONTROL-PANEL/AT32UC3A0512_EVK1100/GCC/.
  2. Plug the JTAG-ICE mkII to the JTAG connector of the EVK1100 board and type the command:
  3. avr32program program uc3a0512-ctrlpanel.elf -e -v -R -r -finternal@0x80000000,512Kb

To program a new version of the .elf file to target, follow these steps:

  1. Open a cygwin command line window and go under AT32UC3A-X.Y.Z/APPLICATIONS/EVK1100-CONTROL-PANEL/AT32UC3A0512_EVK1100/GCC/.
  2. Plug the JTAG-ICE mkII to the JTAG connector of the EVK1100 board and type the command:
  3. make program run

    This will compile and link the Control Panel, program it to target, reset the target then run the new firmware.

The firmware is now updated.

Updating the web server files

You now also have to update the webserver files that are located on the external dataflash: look at the scenario "f. Restoring the default file system content of the Control Panel" described in the Control Panel documentation.

 

How do I compile .S assembly files in AVR32Studio 2

This is a known issue in AVR32Studio. AVR32Studio doesn’t consider .S files (case sensitivity issue inherited from Eclipse), only .s files.

.S files contain assembler with C preprocessor instructions while .s files are "pure" assembler files. Consequently, .S files have to be preprocessed with avr32-gcc (which produces an intermediate temporary .s file) before being assembled with avr32-as (implicitly called by avr32-gcc with the option `-c').

With the version 2 of AVR32Studio, .S files have to be renamed to .s so that AVR32Studio “sees” them; then the build properties of this .s file have to be changed to use avr32-gcc (because .s files only require avr32-as which is selected by default) and the option `-x assembler-with-cpp' has to be used to tell the compiler that it has to treat the .s file as a .S file.

 

To summarize with a step-by-step approach:
  1. AVR32Studio doesn't consider .S files (case sensitivity issue inherited from Eclipse) => thus the renaming to .s
  2. Since the new .s file is a fake .s file => we must not use avr32-as but we'd rather use avr32-gcc. In AVR32Studio 2 right-click on the .s file, and select properties; then replace avr32-as with avr32-gcc.
  3. and tell gcc that it must handle assembly mixed with C => thus the use of -x assembler-with-cpp. To do in the Properties pop-up of the .s file.
  4. (Optional, depending on the project) and eventually tell gcc that it must not proceed to the link step after the assembly step => thus the use of the -c option. To do in the Properties pop-up of the .s file.

 

What is the meaning of the warning "LD `allocated section not in segment'"

This warning is a known issue and it doesn't prevent the firmware from running on target correctly.

Explanation:

When using the default linker scripts provided with avr32-gcc, the ELF LOAD program headers are generated automatically from the output sections, including BSS and the stack which are only allocated areas.

In its current revision, avr32program programs allocated LOAD program headers that do not have to be filled with data from the ELF file, which is wasting programming time.

This behavior of avr32program will be changed in a future release, but until this is achieved, the linker scripts provided with the software framework are changed to place the allocated-only output sections in NULL ELF program headers ignored by avr32program, hence the warnings when linking.

 


AVR is a registered trademark of Atmel Corporation.