Keil Logo


Information in this article applies to:

  • µVision Version 2 and Later


How do I create a debugger script file that runs when I start the µVision Debugger?


Debugger script files are plain text files that contain debugger commands. These files are not created by the tools. You must create them to suit your specific needs. Typically, they are used to configure the debugger or to setup or initialize something prior to running the program.

Following is an example or a typical debugger script file.

/* Set Watchpoints                           */

ws myvar
ws myvar2

/* Create a Signal Function                  */

signal void bob(void) {
  while (1) {
    twatch (5000);          /* Delay for 5,000 clocks */
    P1 = ~P1;               /* Toggle P1 Pins */

/* Executes upon software RESET;             */
/*  (Use the function name as is)            */
FUNC void OnResetExec (void)  {        //
   EnableTPIU();                       // call the initialization function

/* Change the program start address          */


/* Run the Program (stop at main)            */

g, main

All of the commands discussed in the µVision User's Guide may be used in a script file.

To make the ini scale, use User Functions.
To make the ini file more robust when debugging a Cortex-M device, add the OnResetExec command.
To make the ini file simple to change and reconfigure, add Configuration wizard syntax to the file.




The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, May 28, 2019

Did this article provide the answer you needed?
Not Sure
  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.