IAR 4.11A Compilation

Introduction

The goal of this demonstration project is to describe the IAR compilation with an AT91-based target

## Cross compiling using IAR 4.11A

A default IAR project (Workspace) .eww file is delivered with this example (in compil directory).

The processor selected must be ARM7tm for compiler and assembler.

## Compilation

· Open the IAR Embedded Workbench IDE

· In the "Embedded Workbench Startup" window, select "Open existing workspace" and open the project file from the directory compil/xxx.eww

· Build the project

> In the "Workspace" window, select the Cstartup tab to generate the library used by the Basic application. This library uses only the initialisation files for the AT91. Build this library using the "Make" command.

> In the "Workspace" window, select the Basic tab project to debug the Basic application using a JTAG ICE interface (e.i. J-Link). This application includes the Cstartup libary just generated and uses the specific linker file which describes the memory mapping. Build this application using the "Make" command.

· Connect to the target board with a JTAG ICE interface

> The JTAG ICE interface can be selected from the menu "Project -> Options", category "Debugger" and select your ICE interface (e.i. J-Link) in the setup tab.

· Load and debug this application using the "Debug" command

IAR Workspace

Debug | Cstartup Library generation
RAM_Debug | RAM application for debug
Flash Debug | Flash application for debug to be loaded using the IAR utility
Flash Bin | Flash application with a binary output to be loaded using the Tools workspace (Semihosting)
Tools | Standalone application to load a binary file using the SemiHosting

Compilation files

Basic.eww | IAR main project file (Workspace)
Basic.ewp | IAR workbench project file
Cstartup_xxxx.ewp | Cstartup file
resource/ | Project resource files directory
resource/at91_lnk_Flash.xcl | Linker file for the Flash application which defines the memory mapping and sections for the target board
resource/at91_lnk_ram.xcl | Linker file for the RAM application which defines the memory mapping and sections for the target board
resource/Ebxxx.mac> | Script file for setting the processor before to download and to debug the RAM application using a JTAG ICE interface
resource/Ebxxx_Flash.mac | Script file for setting the processor before to download and to debug the Flash application using a JTAG ICE interface
SrcIAR/ | Specific source code directory
SrcIAR/Cstartup.s79 | Cstartup code which includes the reference for INTRAMSTART_REMAP define in linker file
SrcIAR/Cstartup_xxxx.c | Cstartup code Linked in ARM mode (32bits)
Tools/ | If present, it includes the flash up-loader (Semihosting)
settings/ | IAR Setting directory
Debug/ | IAR object and list directory
Flash/ | IAR object and list directory for the Flash application

##