Reply by Roberto Bonacina November 19, 20032003-11-19
I'm going to describe a debugger problem that occured on CodeWarrior

I'm writing for DSP56F807 (internal flash).

The debugger problem can be divided in two parts:

1. In "M56800 Target" I set "Breakpoint mode" as "Automatic". I run the
debugger, then I set a breakpoint (the debugger is correctly stopped on
the first "main" line). I run the application, and it correctly stops at
the breakpoint. Then, I proceed a step with "step over", reaching a
function call. If I do: "Step Into", then "Step Out", I correctly go
into and then out of the function. Then, without clearing the
breakpoint, I do "Run". This operation causes the problem: the
application hangs and the debugger stops no more at the enabled
breakpoint. The only thing I can do is to clear the breakpoint every
time I reach it, then enable the same (or antoher) breakpoint before
re-run the application. This works (but I think it's not normal to work
this way).

2. In "M56800 Target" I set "Breakpoint mode" as "Hardware". I run the
debugger. Here I can see that the debugger is not stopped on the first
"main" line, but on the second one). I set a breakpoint (at the same
place as the previous explanation). I run the application, and it
wrongly stops at a line after the breakpoint. Now, I am on a function
call. If I do: "Step Over", the debugger brings me inside the function,
as if I done a "Step Into" (but I did not). At this point, if I do a
"Step Out" a window compares asking me if I want the debugger to "Clear
the previous breakpoint and set the new one?" (which new one? I did not
set another breakpoint). If I say "No", the debugger takes me back at
the function call, and if I do a new "Step Over", it brings me again
inside the function, and so on. If I say "Yes", the debugger takes me
correctly back to the line after the function call, and I find my
breakpoint disabled. But... I cannot find the new breakpoint that the
debugger said to have set instead of mine. If I enable again my
breakpoint, again the debugger stops at the line after, and so on. In
this second case the application doesn't hangs.

Anyone had the same problem? Any suggestion? Thanks.

Best Regards,
Roberto Bonacina