cancel
Showing results for 
Search instead for 
Did you mean: 

how many breakpoints support stlink-v3set?

EMitu
Associate II

Hello! Bought Stlink-v3set. Why it supports only 5 breakpoints? It's not depends from mcu. Try on stm32f103rct6 and stm32f407 - just 5 breakpoints. Try use CubeIDE and Keil uVision - only 5 breakpoints.

9 REPLIES 9
Uwe Bonnes
Principal III

The number of breakpoints in flash is limired by the cortex core. M0 has less than M3/4/7. Some debugger offer more flash breakpooints by reflashing the flash page with the breakpoint with the offending code patched with the break instruction and reflash the original code afterwards. When doing so, take care for flash wearing.

OK, but why on j-link i can make 10-15 breakpoints, but on stlink-v3set just 5? On the same mcu, on the same IDE?

EMitu
Associate II

i'll try explain more understandable. Does't matter which MCU - cortex m-3 or cortex m-4. Doesn't matter which IDE. Just 5 breakpoints on stlink-v3 or stlink-v2.1. On jlink - i can make more than 15 on any MCU, on any IDE. 5 breakpoints - it's a shame fo 35$. China's clone jlink for 15$ can do more and faster and cheaper.

Uwe Bonnes
Principal III

You don't seem to understand how these additional breakpoint are created. Read again my explanation. Additional breakpoints are not an issue with the debugger hardware, but with the debug program controlling the debugger.

I clearly uderstand your explanation. Thank you. 5 breakpoints - is limit for any stlink debugger and software? Right? Because not in Keil not in CubeIDE i can't get more than 5 breakpoints.

Uwe Bonnes
Principal III

No, if a debugger reflashes the flash page with the breakpoint, stlink debug hardware can do that. But you need a program to command the stlink to do so.

Add BKPT instructions, or go through a function, if you need dozens of breakpoints to understand your systems functionality. Better yet output checkpoint info to a SWV/USART so you can understand real-time interaction/flow

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

easier to use jlink than to dance with a tambourine.

j-link adds its code to the firmware, which switches the hardware observation points when they go out of sight. Thus, you can make 10-20-100 observation points - but you have to pay for this by reducing the speed of the main program of your microprocessor. This is not critical for state machines, but for real-time machines it is unacceptable.

Additional software watchpoints are a bonus to the software debugging being used. There are many IDEs where only hardware breakpoints are used, even with j-link.

And yet, a lot of observation points are a sign of bad code. You should build your house with high-quality bricks so that the port does not change the foundation of a hundred-floor building. Check each brick separately, many of them are used repeatedly.