How to skip the DEBUG instruction to continue code execution? (TC23x, TC29x)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User20782
Level 1
Level 1
Hello everyone,

I found that when the MCU is suspended by a DEBUG instruction in debug mode, the Run, Step In and Step Over will not work anymore. The code execution will be always stuck at this DEBUG instruction.

Is the DEBUG instruction skippable? Or should I use something else to implement the software breakpoint similar to ARM's BKPT instruction?

Thanks.
0 Likes
3 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
I'm not sure what debugger you're using, but you can force the PC register to be somewhere else. In iSYSTEM for example, you can right-click on an instruction and "goto".
0 Likes
User20782
Level 1
Level 1
UC_wrangler wrote:
I'm not sure what debugger you're using, but you can force the PC register to be somewhere else. In iSYSTEM for example, you can right-click on an instruction and "goto".

I'm using the miniWiggler debugger on TriBoard TC233 and Application Kit TC297 board.

Modifying the PC register takes effect, but it's a bit cumbersome.
And I tried the "Run to Line" in Debug menu in AURIX Development Studio. It still cannot skip the DEBUG instruction.
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
There is no automatic skip of any instruction available. You must set the PC manually to the instruction behind the debug instruction or ask the debugger vendor to add such a feature. Please note that the debug instruction will be interpreted as nop only when the OCDS is switched off and there is no debugger connected.
0 Likes