Keil Logo


The LOAD command instructs the µVision debugger to load an object file. You can load the object file of the current project when starting the µVision debugger by enabling Options for Target – Debug - Load Application at Startup.

Syntax Description
LOAD path\filename [options] [offset] Loads object files or Intel HEX file.

µVision analyzes the contents of the file to determine the file type (if the file type cannot be determined, then an error message is displayed). The following file types are supported:

  • Absolute Object File or ELF/DWARF File: is produced by the linker/locator, and contains complete symbolic debug information, type information, and line numbers when translated with debug information. When no further options are specified, the debugger performs a target reset and provides memory map settings.
  • Intel HEX File: is produced by Object-to-Hex-Converter programs, and contains no symbolic debug information, no type information, and no line number information. Program testing is supported only at CPU instruction level. Source-level and symbolic debugging are not supported. No target reset is performed when HEX files are loaded. Therefore, it might be required to issue an explicit RESET command.

The LOAD command has several options that depend on the target in use:

  • INCREMENTAL - adds the debugging information to the existing symbol table. This allows multi-application debugging.
  • NOCODE - loads only the symbolic information and ignores code records. NOCODE prevents the existing program code from being overwritten.
  • NORESET (only available on some targets) prevents the generation of a RESET signal after loading the program. For targets where this option does not exist, use the INCREMENTAL option instead, which effectively performs the same operation.
  • CLEAR - erases previously loaded debugging information and symbol tables. When combined with INCREMENTAL this allows to remove the stored information and replace it with the new application without the need to reset the target. (Cortex-M targets only)

The LOAD command supports the specification of an address offset for Cortex-M targets. This allows to adjust the effective addresses of the loaded debugging information and symbols of position independent code. The offset specifies the base address where the bootloader or overlay manager is copying the code at during runtime.

LOAD %L CLEAR INCREMENTAL 0x2000  // Clear previously loaded program information, and load linker output file with an address adjustment of 0x2000
LOAD MyAxf.axf 0x4000             // Clear previously loaded program information, reset target, and load application MyAxf.axf with an address offset of 0x4000

This command loads myprog.hex.


  • When a file name contains spaces, it must be enclosed in quotes ("). In this case, the parser applies the rules for C string literals. Then, it is required to use a double backslash (\\) instead of a single backslash (\) character.


    LOAD "C:\\path with blanks\\filename.hex"

Support for Key Sequences

A limited number of key sequences can be used in the LOAD command. This enhancement allows using a generic Debugger initialization file across multiple projects. Key sequences supported by the load command are:

  • $L - path of linker output file
  • %L1 - path to and name of linker output file (including extension)
  • @L - linker output file without path and without extension

The following examples assume that the µVision project file is available in the directory C:\Projects\Blinky and that the output directory is .\Output.

LOAD $L@L.axf            // C:\Projects\Blinky\Output\Blinky.axf, loads linker output file
LOAD $L@L.hex            // C:\Projects\Blinky\Output\Blinky.hex, loads Intel hex file
LOAD $L%L                // C:\Projects\Blinky\Output\Blinky.axf
LOAD %L                  // C:\Projects\Blinky\Output\Blinky.axf1
LOAD .\Output\Blinky.axf // C:\Projects\Blinky\Output\Blinky.axf


  • 1 $L is prepended to %L due to compatibility reasons.
  • All these commands work also with INCREMENTAL and other options.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.