9.11. Generating linker command files for non-ARM targets

The memory map, shown in the Memory Map tab of the Process Control view, can be used to generate or modify a MEMORY section of a linker command file used when you build your program. This MEMORY directive information can then be used to position various sections of an application correctly.

Note

Although you can save the memory map for an ARM target, the linker command file cannot be used when building images for ARM architecture-based processors.

To generate or modify a linker command file:

  1. Right-click on the start address at the top of the entries and select Save Map to Linker Command File... from the context menu.

  2. Specify the location of the file in the Select Linker Command File to Create or Modify dialog box. Remember that:

    • If the file already exists, RealView Debugger looks for a MEMORY directive block created previously and, if found, replaces that block.

    • If the file already exists, but no MEMORY directive block exists, RealView Debugger locates the first MEMORY section and inserts the MEMORY directive block before it.

    • If the file already exists, RealView Debugger makes a backup copy before updating the contents.

    • If there is no existing file, RealView Debugger creates the specified file ready to accept the MEMORY directive block.

The RealView Debugger linker command file generation process uses the built-in automatic memory mapping to generate data based on the connected target settings, for example the registers that control mapping.

The data recorded in the generated MEMORY block includes each internal RAM, ROM, and Flash section as appropriate. Each section is allocated a predefined name. All external memory added using the Memory Map tab, or defined automatically from a loaded image, is allocated a name based on the characteristics of the memory.

Note

If a file already exists and contains a RealView Debugger generated data block then this section is replaced when RealView Debugger updates the command file.

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111