Skip to main content
Graduate
November 18, 2025
Question

Stm32mp1 : constantly getting "failed to insert all hardware breakpoints; you may have requested too many hardware breakpoints/watchpoints

  • November 18, 2025
  • 3 replies
  • 214 views

hi, I'm trying to debug stm32mp157f-dk2 by using stm32cubeide by using open OCD and gdb

After connection, I'm constantly getting below error.

I can't even single step in or run. 

 

"failed to insert all hardware breakpoints; you may have requested too many hardware breakpoints/watchpoints"

    This topic has been closed for replies.

    3 replies

    Graduate
    November 18, 2025

    The Cortex-A7 inside STM32MP157F has a limited number of hardware breakpoints:

    • 6 hardware breakpoints total

    • 4 hardware watchpoints

    If GDB or OpenOCD tries to place more breakpoints than available, you get:

    "failed to insert all hardware breakpoints; you may have requested too many"

    And on STM32MP1, OpenOCD sometimes tries to set breakpoints in ROM or non-writable memory, causing the same error.

     

    You can Enable Software Breakpoints

    Go in STM32CubeIDE:

    Run → Debug Configurations → Debugger tab

    Check: “Use Software Breakpoints”

    This avoids hardware breakpoint limits.

    Graduate
    November 18, 2025

    or you can Delete all previous breakpoints

    Inside CubeIDE:

    Window → Show View → Breakpoints → Remove All

    Sometimes stale breakpoints from previous sessions cause the error.

    Graduate
    November 19, 2025

    Hi there,

     

    I can see only one breakpoint

    embeddedbro_0-1763585368306.png

     

    Thanks and Regards