cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Cube IDE Software Breakpoint

NM
Associate III

Hi,

How to put the software breakpoints in the STM32 Cube IDE. I can put only the hardware breakpoints. The hardware breakpoints has a limitation of maximum 5. We can use multiple software breakpoints in the STM8 Chips with ST Visual Development IDE or Renesas Chips CS+ IDE. Help me out of this problem.... 

 

 

Kind Regards,

Nishanth M

6 REPLIES 6
TDK
Guru

A software breakpoint is added by putting a bkpt assembly instruction in the code. It requires you to recompile and upload this code with the software breakpoint to the chip. You can add a software breakpoint with the following code:

__BKPT();

 

If you feel a post has answered your question, please click "Accept as Solution".
NM
Associate III

Hi,

After putting this  "__BKPT(); " Breakpoint, code is not going to next line. It is holding there. it acts as a while(1);

 

Regards,

Nishanth M

Hmm. Yes, that appears to be the case for me as well.

Unclear if this is expected behavior (unlikely), OpenGDB's fault, or some implementation issue in Eclipse or STM32CubeIDE.

 

From looking at threads online, it appears Segger's tools are better is this regard.

stm32 - How to resolve: failed to insert all hardware breakpoints; you may have requested too many hardware breakpoints/watchpoints - Stack Overflow

If you feel a post has answered your question, please click "Accept as Solution".
NM
Associate III

Hi,

Then If I use the Segger J-Link EDU Mini means, can I put unlimited breakpoints? 

 

Regards,

Nishanth M

Yes.

J-Link Unlimited Flash Breakpoints (segger.com)

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

By the way... how these unlimited breakpoints work? The real flash breakpoints are decoded by something in the MCU itself, this is why they are limited.