5.9.2. Board-level AME file format

Example 5.7 shows the format of a board-level AME file. The settings are described in:

You can specify multiple BOARD entries in the same AME file, but each entry must have a unique device name. For an example, see:

install_directory\RVD\Flash\...\platform\at91eb01\board_atmel_arm.ame

Example 5.7. Board-level AME file format

[BOARD=BoardName]
proc_name=ARM
from_flash=DeviceName
width=DataWidth
reloc.start_addr=RObaseAddress
reloc.pc_rel=True
needs_clock=false

[BOARD=BoardName]
...

[INCLUDE] flash_files_dir\flash-level.ame

Mandatory Settings

The following board-level AME settings are mandatory:

BOARD=BoardName

Defines the board name.

This is the name you use with the pakflash -f name option (see Using the pakflash utility).

proc_name

Always set to ARM.

from_flash=DeviceName

References the relevant Flash device in the Flash-level AME file, and is the same name that you assign to the FLASH= setting (see Example 5.5). The name can have a maximum of 31 characters.

[INCLUDE] flash_files_dir\flash-level.ame

Specifies the location and name of the Flash-level AME file. The path is not required if your board-level AME file is in the same location as the Flash-level AME file you are using.

Optional Settings

The following board-level AME settings are optional:

needs_clock={true|false}

Usually, the FME file can program your Flash device directly, without having to know the clock speed of your device. However, if your device must be informed of the clock speed to program Flash correctly, then you must specify needs_clock=true. The default is false if this setting is not specified.

When needs_clock is set to true:

  • the Clock Frequency field on the Flash Memory Control dialog box is enabled (see Programming an image into Flash on the Integrator/AP)

  • you can specify the clk:(frequency) qualifier to the FLASH command (see the RealView Debugger v3.0 Command Line Reference Guide for details).

reloc.pc_rel

Indicates PC-relative code. This is normally set to True.

reloc.start_addr=RObaseAddress

Specifies the address from which the Flash programming code runs.

This setting overrides the --ro_base linker option (see Specifying the linker options).

The pakflash -s addr option overrides this setting (see Using the pakflash utility).

Note

This does not have to be free scratch memory. By default RealView Debugger saves the contents of affected RAM and restores it after the Flash operation has completed.

width=DataWidth

Resultant data width when writing to the Flash:

1

8bit (default)

2

16bit

4

32bit

If you are programming one of the supported Flash types, this entry must match the WIDTH value you defined in the board-level assembly code (see Creating algorithms for a Flash type supported by RealView Debugger).

Note

This setting overrides the width= setting in the Flash-level AME file.

Evaluator-7T example

Example 5.8 shows a sample board-level AME file for the Evaluator-7T. This is the file board_sst_eval7T.ame in the directory you created (see Preparing to follow the procedure for a supported Flash type or Preparing to follow the procedure for a custom Flash type).

In your copy of board_sst_eval7T.ame, change the BOARD= value to that shown in Example 5.8.

In this example there are two 16bit Flash devices in parallel across the data bus. Therefore, the width = 4 so we write to the bottom 16bits of each Flash simultaneously.

Example 5.8. Evaluator-7T board-level AME file

[BOARD=ARM_Eval7T]
proc_name=ARM
# uses AMD AM29LV400
# or uses SST 39VF400A
from_flash=SST39VF400A
reloc.pc_rel=True
reloc.start_addr=0x40000
[INCLUDE] flash_sst.ame
Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0182H
Non-Confidential