Skip to main content
Visitor II
May 28, 2019
Question

how many breakpoints support stlink-v3set?

  • May 28, 2019
  • 5 replies
  • 3174 views

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.

    This topic has been closed for replies.

    5 replies

    Graduate II
    May 28, 2019

    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.

    EMituAuthor
    Visitor II
    May 28, 2019

    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?

    Visitor II
    May 28, 2019

    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.

    EMituAuthor
    Visitor II
    May 28, 2019

    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.

    Graduate II
    May 28, 2019

    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.

    EMituAuthor
    Visitor II
    May 28, 2019

    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.

    Graduate II
    May 28, 2019

    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.

    Graduate II
    May 28, 2019

    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

    EMituAuthor
    Visitor II
    May 28, 2019

    easier to use jlink than to dance with a tambourine.