| |||
| Home > Programming Flash with RealView Debugger > Creating the Flash-level and board-level AME files > 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=DeviceNamewidth=DataWidthreloc.start_addr=RObaseAddressreloc.pc_rel=True
needs_clock=false [BOARD=BoardName] ... [INCLUDE]flash_files_dir\flash-level.ame
The following board-level AME settings are mandatory:
BOARD=BoardNameDefines the board name.
This is the name you use with the pakflash -f name option
(see Using the pakflash utility).
proc_nameAlways
set to ARM.
from_flash=DeviceNameReferences 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.ameSpecifies 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.
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:( qualifier
to the FLASH command (see the RealView
Debugger v3.0 Command Line Reference Guide for details).frequency)
reloc.pc_relIndicates PC-relative code. This is normally set to True.
reloc.start_addr=RObaseAddressSpecifies 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).
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=DataWidthResultant data width when writing to the Flash:
8bit (default)
16bit
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).
This setting overrides the width= setting
in the Flash-level AME file.
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.