Keil Logo

µVISION DEBUGGER: EXTRA BUTTON CREATED WHEN LABEL CHANGES


Information in this article applies to:

  • µVision All Versions

QUESTION

I use a debug.ini file to create buttons in the Toolbox. If I change one of the button labels and restart the debugger, it creates a button with the new label, but leaves the old button also. For example, if I use a debug.ini file to define 3 buttons like this:

define button "Set 2.5 V",   "AIN0 = 2.5"
define button "Set 3.0 V",   "AIN0 = 3.0"
define button "Set 4.0 V",   "AIN0 = 4.0"

The debugger builds 3 buttons as expected. But if I change the label in the third line like this:

define button "Set 2.5 V",   "AIN0 = 2.5"
define button "Set 3.0 V",   "AIN0 = 3.0"
define button "Set 4.5 V",   "AIN0 = 4.5"

and re-start the debugger, I get 4 buttons. The 3 original button plus the new button. Why does this happen? How can I get the debugger to replace a button when I change its label?

ANSWER

Why does this happen?

In the Options for Target — Debug tab, when the Restore Debug Session Setting / Toolbox checkbox option is checked, all defined buttons are stored with the Project. When you re-start the debugger and the debug.ini file executes, the buttons from the previous debug session are restored from the Project file. Duplicate button definitions from your debug.ini file are ignored, but non-duplicate buttons (i.e. new buttons) are added.

How can I get the debugger to replace a button when I modify it's label?

There are 2 ways to do this:

  • In the Options for Target — Debug tab, uncheck the Restore Debug Session Setting / Toolbox checkbox.
  • Add a Kill Button * statement before you define the 3 buttons. For example:
kill button *

define button "Set 2.5 V",   "AIN0 = 2.5"
define button "Set 3.0 V",   "AIN0 = 3.0"
define button "Set 4.5 V",   "AIN0 = 4.5"

Either way, your buttons will be re-defined each time you start the debugger.

MORE INFORMATION

  • Refer to DEFINE in the µVision3 User's Guide.
  • Refer to KILL in the µVision3 User's Guide.

Last Reviewed: Thursday, January 18, 2007


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