0

I am new to the Lauterbach debugger (Trace32) and I seem to have some problem with my debugging.

In my case, every time I step into a breakpoint and I go few steps ahead in that function the control goes back to main. I know it goes back to main as I have a break point at main.

Then when I say run again it can not run unless I load the batch file again.

I have tried running it without a breakpoints and it runs fine.

Some details:

Trace 32 controller : H8/3337

I use USB for debugging

pirho
  • 11,565
  • 12
  • 43
  • 70
  • Is there a watchdog timer enabled on your device? – Holger Oct 05 '18 at 20:51
  • I have disabled WDT. But i will check again if there is any other place. Thanks – Kanagala Shradhaa Oct 05 '18 at 21:08
  • Have you tried to add some breakpoints before and after the position where it goes back to main? Or does it skip breakpoints that should be there before returnning to main? – pirho Oct 06 '18 at 21:04
  • I disabled the watch dog. Also i tried doing that , so there is function A and function B . From function A it should jump to function B. I put a breakpoint in function A well before calling of function B as i want to validate some conditions and when the break point encounters , I step or use next arrow button and after 2 /3 steps it jumps to main – Kanagala Shradhaa Oct 08 '18 at 18:49
  • Note: The next arrow button sets a temporary breakpoint on the next source line and then starts execution. Although it feels often like a Step.Over it is definitely something different and may cause a much longer running of the target then you expect. – Holger Oct 23 '18 at 09:45
  • I am pretty sure, that you reach main() because something is resetting your target or triggers an exception which causes to reboot your target. So I suggest to go to your function A, then hit the Mode button in the List window, to switch to Mixed mode (showing the assembler code) and finally use the Step button to step trough every single assembler line until you reach your function B - or an exception handler. – Holger Oct 23 '18 at 09:49

0 Answers0