Is is possible to set a breakpoint in IAR embedded workbench for ARM IDE, in a way that after it hits once it gets deleted/disbled automatically?
I know already a way to do that using C-SPY macros and __setCodeBreak() and then __clearBreak() functions. The problem though is I have to set my desired breakpoint using another breakpoint and a C-SPY macro in which __setCodeBreak() sets my desired breakpoint after that I can use a C-SPY macro for it, at the end of which __clearBreak() removes the breakpoint.
However, what I want is to be able to set a breakpoint directly in the IAR IDE and link it to a C-SPY macro and then the breakpoint gets deleted/disbled when is hit (I cannot make __clearBreak() work in this second way, standalone)
Here is an example of what I explained above:
__var bp2;
// This macro sets a new breakpoint (bp2), and is linked to another breakpoint (let's say bp1 which is set in the IDE)
Set_bp2()
{
bp2 = __setCodeBreak("{C:\\file.c}.80.1", 0, "ActionMacro()", "TRUE", "");
}
//This macro gets executed when the new breakpoint (bp2) is hit and then removes this breakpoint (bp2)
ActionMacro()
{
__message "bp2 is hit ...";
__clearBreak(bp2);
}
So, the __clearBreak() manages to clear the breakpoint using the return code of the __setCodeBreak(), however, I would like to have a macro which independently of another macro is able to clear the breakpoint which is linked to, something like below:
ActionAndClear() // This macro is linked to a breakpoint which is set in the IDE
{
__message "breakpointX is hit ...";
__clearBreak(<UNKNOWN>);
}
Is there any value for the UNKNOWN, which does the trick?
