2.3.80. LOAD

Loads the specified executable file onto the target.


LOAD [/A] [/C] [/NI] [{/NP|/SP}] [/NS] [/PD] [/PY] [/R] absolute_filename [,root] [;section [,section]...] [;arg1 ...] [&base_address]



Loads and appends another executable image without deleting any existing one. In addition, the value of the PC remains unchanged. This is the default option if /R is not used.

If the new image file overlaps the addresses of the existing object modules, the load terminates and displays an error message. If you want to replace the current image with a new one, use /R.


Converts all symbols to lowercase as they are read by the absolute file reader.


Loads only the symbol table. Overlap of addresses is checked unless /R is also used. Does not load the program image code or the data.


Prevents the command changing the value of the PC.


Prevents the command loading debug information into the symbol table. Only the program image is loaded. No check for overlapping addresses is made. The /NS option can be used to reload the current program image without affecting the symbol table.


Displays a dialog box for errors and warnings, rather than dumping them to the log.


For images that enable the Memory Management Unit (MMU) and perform a remap, loads progam sections at physical addresses rather than virtual addresses. However, all symbols still refer to virtual address.


To debug MMU initialization code, that code must have the same virtual and physical address.


Replaces the existing program with the program being loaded. In addition, when no other qualifiers are specified:

  • the value of the PC is set to the image entry address

  • any debug information is loaded into the symbol table.


Sets the PC to the start address specified in the object module. This is the default behavior when symbols are loaded, the image file specifies an entry address, and the /R flag is specified.


Specifies the name of the absolute object file to be loaded. Quotation marks are optional, but see Rules for specifying filenames in the FOPEN command for details on how to specify filenames that include a path. Also, see Rules for the LOAD command.


Specifies the root associated with the symbols in the program being loaded. The default root is the filename without an extension. See Rules for the LOAD command for details on how to specify a root.


Lists sections to load when an image is being loaded. The default is to load all sections. This option is commonly used to reload the initialized data area when starting a program.

The section names that are available for a specific image can be listed using the ARM development tools command fromelf or the GNU development tools command objdump. See Rules for the LOAD command for details on how to specify sections.


Specifies an optional, space-separated, list of arguments to the image.


You cannot use arguments with the LOAD command on ISSM, Model Library, and Model Process targets.

The case of arguments is preserved. See Rules for the LOAD command for details on how to specify arguments.


You can also specify arguments using the ARGUMENTS command. For example, you can might want to modify the arguments without unloading the image.


Specifies an address offset to be added to all sections when computing the load addresses.

For this option to work correctly with position-independent code and data, your program must have been compiled with Position-Independent Code (PIC) and Position-Independent Data (PID).

If your applications delegates security-critical functionality to TrustZone Software, be aware of the following:

  • An image is loaded into the current world by default.

  • To load an image into a specific world, then prefix the address with &N: (Normal World) or &S: (Secure World). For example:

    • the following command loads an image into the Normal World at the image entry point:

      load ‘C:\myproject\myimage.axf’ &N:0

    • the following command loads a position-independent image into the Normal World:

      load ‘C:\myproject\myimage.axf’ &N:0x1000


The LOAD command loads the specified executable file into the debug target. The file specified must be a format supported by the RealView Debugger.

To reset the initialized values of program variables after entering a RESET or a RESTART command, you must reload your program using the LOAD command. The RELOAD command checks the file date to determine whether program symbols have changed and therefore whether they must be reloaded.

If a load is performed that includes the symbol table, any breakpoints or macros referring to symbols in the previous root are invalidated.

The LOAD command runs synchronously.

Rules for the LOAD command

Follow these rules when using LOAD:

  • absolute_filename, root, section, and args must all be placed in the same set of quotation marks. For example, on Windows:

    load /pd/r 'c:\source\demofile.axf ;ER_RO,ER_ZI ;12345' &0x8A00
  • If you want to specify arguments, but not a section, you must specify an empty section. All sections are loaded in this case. For example:

    load /pd/r 'c:\source\myfile.axf;;arg1 arg2 arg3'
  • Where an argument includes spaces, additional quotation marks must be used. Use single quotation marks around arguments if the outer quotation marks are doubles. Use double quotation marks around arguments if the outer quotation marks are singles. For example:

    load /pd/r "myimage.axf ;;12345 'Argument Two'" &0x8A00
    load /pd/r 'c:\source\myimage.axf ;;12345 "Argument Two"' &0x8A00
  • base_address must be placed outside the quotation marks, and must be the last parameter specified.

Restrictions on the use of LOAD

The LOAD command is not allowed in a macro.

You cannot use arguments with the LOAD command on ISSM, Model Library, and Model Process targets.


The following examples show how to use LOAD:

load 'c:\source\myfile.axf'

Load the executable file myfile.axf to the target, without overwriting any existing image that is loaded, and without changing the value of the PC.

load /ni/sp 'c:\source\rtos.axf'

Load the symbol table for an image rtos.axf that is also in target ROM, setting the PC to the program start address so that a subsequent GO runs the program.

load /np 'c:\source\mp3.axf'

Load the executable library mp3.axf onto the target so that the preloaded executable can use it. The PC is not modified. Symbol table entries in mp3.axf are added to the existing symbol table.


Ensure that executables you load in this way occupy distinct memory regions. No relocation is performed by RealView Debugger unless you specify a base offset.

load /pd/r 'c:\source\demofile.axf ;ER_RO,ER_ZI' &0x8A00

Load the executable file demofile.axf to the default target. Specify an offset added to all sections to compute the load addresses. Load only the specified sections ER_RO and ER_ZI.

load /pd/r 'c:\source\myfile.axf;;arg1 arg2 arg3'

Load the executable file myfile.axf to the default target using an arguments list. An empty section list is given so all sections are loaded.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N