2019-05-28 01:22 AM
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.
2019-05-28 01:59 AM
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.
2019-05-28 02:02 AM
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?
2019-05-28 02:30 AM
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.
2019-05-28 03:02 AM
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.
2019-05-28 03:11 AM
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.
2019-05-28 04:14 AM
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.
2019-05-28 06:13 AM
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
2019-05-28 06:17 AM
easier to use jlink than to dance with a tambourine.
2019-05-28 11:46 AM
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.