ARM Technical Support Knowledge Articles

EXTRA BUTTON CREATED WHEN LABEL CHANGES

Applies to: uVision Debugger

Answer


Information in this article applies to:


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:

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

Article last edited on: 2007-01-18 16:23:36

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential