Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Using flash loaders

In this section:

Setting up the flash loader(s)

To use a flash loader for downloading your application:
  1. Choose Project>Options.

  2. Choose the Debugger category and click the Download tab.

  3. Select the Use Flash loader(s) option. A default flash loader configured for the device you have specified will be used. The configuration is specified in a preconfigured board file.

  4. To override the default flash loader or to modify the behavior of the default flash loader to suit your board, select the Override default .board file option, and Edit to open the Flash Loader Configuration dialog box. A copy of the *.board file will be created in your project directory and the path to the *.board file will be updated accordingly.

  5. The Flash Loader Overview dialog box lists all currently configured flash loaders, see Flash Loader Overview dialog box. You can either select a flash loader or open the Flash Loader Configuration dialog box.

    In the Flash Loader Configuration dialog box, you can configure the download. For information about the various flash loader options, see Flash Loader Configuration dialog box.

The flash loading mechanism

When the Use flash loader(s) option is selected and one or several flash loaders have been configured, these steps are performed when the debug session starts.

Steps 1 to 4 are performed for each flash loader in the flash loader configuration.

  1. C-SPY downloads the flash loader into target RAM.

    Steps 2 to 4 are performed one or more times depending on the size of the RAM and the size of the application image.

  2. C-SPY writes code/data from the application image into target RAM (RAM buffer).

  3. C-SPY starts execution of the flash loader.

  4. The flash loader reads data from the RAM buffer and programs the flash memory.

  5. The application image now resides in flash memory and can be started. The flash loader and the RAM buffer are no longer needed, so RAM is fully available to the application in the flash memory.

Aborting a flash loader

To abort a flash loader:
  1. Press Ctrl+Shift+. (period) for a short while.

  2. A message that says that the flash loader has aborted is displayed in the Debug Log window.

    This method can be used if you suspect that something is wrong with the execution, for example because it seems not to terminate in a reasonable time.