Keil Logo


The Debug section provides controls for connecting and reseting the device, and caching and downloading the code. The settings are applied each time a debugging session is started.

Target Driver Setup - Connect and Reset Options

Connect & Reset Options

Connect & Reset Options control the instructions executed while connecting to target.

Connect and Reset Options

Connect - controls the operations that are executed when the µVision debugger connects to the target device. The drop-down has the following options:

  • Normal just stops the CPU at the currently executed instruction after connecting.
  • with Pre-reset applies a hardware reset(HW RESET) before connecting to the device.
  • under Reset holds the hardware reset(HW RESET) signal active while connecting to the device. Use this option when the user program disables the JTAG/SW interface by mistake.
  • without Stop connects to and disconnects from the target device without explicitly stopping the CPU. Use this option, for example, to inspect memory or peripheral SFRs.

    To use this Connect type properly, set all the following options:

    • Disable Reset after Connect
    • Disable Options for Target - Debug - Load Application at Startup. Use the following command in an initialization script (refer to Creating Functions) or in the Command window to manually load debug information:
      LOAD %L INCREMENTAL. Refer to LOAD command.
    Refer to Known Limitations - without Stop for further details.

Reset after Connect (if enabled) performs a reset operation as defined in the Reset drop-down list (see below) after connecting to the target. When disabled, the debugger just stops the CPU at the currently executed instruction after connecting the target. Refer also to Start Sequence for details.

Reset controls the reset operations performed by the target device. The available options vary with the selected device and supported debug description that can be enabled in Pack Options.

  • Custom selects a reset method provided by the debug description that is different from the standard reset methods.
  • Autodetect selects the best suitable reset method for the target device. This can be a specialized reset or standard method. If Autodetect finds an unknown device, it uses the SYSRESETREQ method.
  • HW RESET performs a hardware reset by asserting the hardware reset (HW RESET) signal.
  • SYSRESETREQ performs a software reset by setting the SYSRESETREQ bit. The Cortex-M core and on-chip peripherals are reset.
  • VECTRESET performs a software reset by setting the VECTRESET bit. Only the Cortex-M core is reset. On-chip peripherals are not reset. For some Cortex-M devices, VECTRESET is the only way they may be reset. However, VECTRESET is not supported on Cortex-M0, Cortex-M0+, Cortex-M1, and ARMv8-M cores.

Stop after Reset permanently enables the Cortex-M Reset Vector Catch. This stops the CPU when running through the reset vector (e.g. because of pressing the reset button on the board, issuing a reset from uVision while the target is running; reset caused by a watchdog timer).

Stop after Bootloader stops the CPU after executing the bootloader instructions and is available only for some devices.

Log Debug Accesses writes target debug accesses and information about debug components detected in the device ROM table into a text file. The following accesses are logged:

  • MEM: Target Memory Access
  • AP: Access Port Register Access
  • DP: Debug Port Register Access


  • Logging of memory block accesses are indicated as such, all read or written items of such a block access are logged.
  • Not all debug accesses are logged in detail to keep the output readable. For example, DP and AP register accesses that form a target memory access are not logged, but abstracted as a memory access.

The text file ULINK2_DebugLog_xxxx.log is created in the current project folder, where xxxx is a sequential number. The file limit is 100MB. If this limit is reached during a single debug session, then a new file is created.

Cache Options

Cache Options improve the µVision debugger performance during target debugging by caching target memory areas into the PC memory. By default, caching options are enabled to get maximum performance.

Cache Options

Cache Code informs the debugger that the downloaded program code will not change. When this option is set, µVision never reads the program code from the target system. Disable this option when the application includes self-modifying code or the program code might get overwritten.

Cache Memory determines whether memory displays are updated during a program stop. When this option is set, the debugger does not update memory displays until the execution of the next single step, procedure step, or go command. Disable this option to display the actual memory content (for example, the content of memory mapped peripherals) when the debugger is halted.

Download Options

Download Options control the downloading of code to the target system when starting a debugging session.

Download Options

Verify Code Download compares the content of the target memory with the application program loaded in the debugger for each new debug session. Enable this option to ensure program correlation between the image loaded in target system and the image loaded in the µVision debugger. This prevents debugging the wrong code when working with various targets or more instances of µVision.

Download to Flash downloads code to all memory regions. When disabled, the debugger does not download code to the memory Address Range defined in the dialog Target Driver Settings - Programming Algorithm. Enable the option if the application is loaded into RAM and the Flash algorithm is defined for the same address range. By default, this option is disabled. Refer to the knowledgebase article µVision Debugger: Error 57: Illegal Address in Debugger Output Window.

  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.