1

I'm new to the atollic truestudio. I have running a C code for STM32 MCU, but unfortunately the code stops its execution at the same point everytime when I debug the code even though there is no breakpoint applied. I have attached an image below for reference. Could anyone tell me how to resolve this breakpoint trap issue.

Thank you

enter image description here

  • There is a breakpoint shown in the upper-right corner of your picture. It is cut-off, but pretty sure it is the one you are hitting. – Eugene Sh. Dec 01 '20 at 22:26
  • No that is the other one. on upper-right corner it showing the breakpoint of main.c file not on lora.c file. You can see the image which I have attached. – chaya kumar Dec 01 '20 at 22:33
  • Check the assembly view and see what instructions are there and/or if there is any breakpoint there. – Eugene Sh. Dec 01 '20 at 22:36
  • There is no breakpoint even in assembly view. I have replaced the old image with new one. You can see in the updated image with disassembly included. – chaya kumar Dec 01 '20 at 22:50
  • This might be of help: https://stackoverflow.com/questions/9837594/sigtrap-despite-no-set-breakpoints-hidden-hardware-breakpoint – Eugene Sh. Dec 01 '20 at 22:53
  • Ahh it resolved my issue. Thank you so much for sharing this one. All I did was I added 3 breakpoints before the execution of this particular line. Then I debug the entire project the code use to stop wherever I added the breakpoint then I clicked on "remove all breakpoint" option. It erased all of the breakpoints. So this got resolved. Thank you so much. – chaya kumar Dec 01 '20 at 23:23

1 Answers1

0

This question is a bit old now, but if someone finds it like I did trying to solve this problem:-

The trigger seems to be trying to add too many breakpoints.

The fix was:

  • Disconnect the ST-LINK debugger,
  • Remove power from the board
  • Then restart everything.

I suspect there is a breakpoint register somewhere in the core that the debugger "forgets" about, and it needs a power cycle to clear that register.

harry courtice
  • 209
  • 1
  • 9