Introduction
The goal of this project is to download a project build
under the IAR tools using Flash methods to IAR Flash Tools
Use the IAR 4.31A
Flash feature
The IAR Embedded Workbench IDE features a Tools Flash
utility.
This method can write in flash a IAR file format (*.sim)
(output format generated using option simple-code)
The IAR Flash download option to use a flash loader to download
your application to flash memory. If a flash loader is available for the
selected chip, it will be used as default. A flash loader can be described
as being an agent that is downloaded to the target. It fetches the actual
application from the C-SPY debugger and programs it into flash memory.
The flash loader uses the file I/O mechanism to read the
application program from the host. When the Flash download option is
enabled, the following steps will be performed when the debug session
starts:
1 C-SPY downloads the flash loader into target RAM.
2 C-SPY starts execution of the flash loader.
3 The flash loader opens the file holding the application
code.
4 The flash loader reads the application code and programs
it into flash memory.
5 The flash loader terminates.
6 C-SPY switches context to the user application.
A set of flash loaders for various micro controllers is
provided with the ARM IAR Embedded Workbench. In addition to these, other
flash loaders are provided by chip manufacturers and third-party vendors.
Two output files must be generated. The first is the usual
UBROF file (d79) that provides the debugger with debug and symbol
information. The second file is an IAR file (*.sim) that will be opened and
read by the flash loader when downloading the application to flash memory.
To create the extra output file, choose Project->Options
and select the linker category. Select the Allow C-SPY-specific extra
output file option. In the Extra Output dialog, select the Generate extra
output file option. Choose intel-extended output format and format variant
None. Do not override the default output file.
Any errors during the download will be logged to a log
file. The log file will have the same path and name as the output files but
with the tail and filename extension _flash.log.
Process
- Compile
the Flash Debug workspace application to generate the IAR file named
basicIAR.sim and the debug file named basic.d79
1) Download
this application using a JTAG ICE interface with the "Debug"
command
2)
Open the “Debug Log” window
|