Is this possible, or do I have to comment it out in the source, recompile, and reload the .cof? Thanks.
Skipping over an instruction while using JTAGICE mkII
If all else fails you can always read the manual.
I have not, but here goes:
press F10 to execute one line of C code.
if you want to NOT execute the code i.e. miss this line and resume from the next line. You would have to edit the PC register (location counter)
I have never manipulated the PC.
I have altered a branch decision by setting the Z flag in SREG
If you want to "miss" a branch or line of code on a regular basis, then put in a debug statement that controls it. e.g. if (debug_flag) do_this_line();
Then you just alter the (debug_flag) to turn your "feature" on or off.
And of course if you write your debug macros carefully, they stay in the code, do not make the code unsightly, and are inactive in the production version.
David.
With C it's a nightmare doing things at times, however you can right click on a line and set it as the next statement, unless the "optimiser" has helped you and the feature is greyd out because there is no code produced for that line.
John,
You are a star. This works just fine. Perhaps I will even read the Studio manual one day. Or perhaps just look at the right-click menus.
Mind you, I wonder whether I will ever use this feature.
David.
The feature is VERY useful. One good example is that you've used the "step over" feature to walk through the code because you "know" that the problem you're chasing couldn't possibly be in any of the deeper subroutines, and you don't want to have to wade through them. Only after you "step over" a subroutine call, the return value is completely wrong. Whoa thar; maybe you DO need to watch that subroutine at work. So you use the "set next statement" feature to "back up" the execution flow to just prior to the call, and "step INTO" the subroutine to see why it misbehaves.
This works just fine.