This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision2: Breakpoint 'Command' not working

I want to set a breakpoint which will print a value, and then resume execution.

The documentation for the 'Command' box in the 'Breakpoints' debugger dialogue says,
"When you specify a Command for a breakpoint, uVision2 executes the command and resumes executing your target program."

Therefore I have used a printf in the 'Command' box, on the assumption that it will print the required value and then continue execution.

However, when the Break occurs, I get,

"*** error 121: AGDI: cannot access target while executing"
But, according to the help, it shouldn't be executing until after it has done the printf!?

I have tried creating a Debug Function which takes a local copy of the variable:
FUNC void fred( void )
{
unsigned char crock;
    crock = 'p->status;
    printf( "%02x\n", crock );
}
This function works correctly when issued at the debug command prompt, but if I specify it as the command for the Breakpoint, it is ignored; the Breakpoint behaves as if I had not specified any command at all (ie, it just breaks; it does not execute the function, and does not continue afterwards).

What's going on?

0