JLink-gdb breakpoints in RAM on STM32F411

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • JLink-gdb breakpoints in RAM on STM32F411

    I am using Jlink 5.00b and J-link gdb server to debug a STM32F411.

    When I set a breakpoint (with the break gdb command) at a function in RAM (i.e. breakpoint address is in RAM), gdb server shows that the breakpoint is set but the cpu does not break back to the debugger when the breakpoint address is reached.

    Jlink gdb is showing the breakpoint properties are "soft" and "RAM". I am only setting a single breakpoint so there should be hard breakpoints available.

    I am guessing that if I can get gdb to use a hardware breakpoint it would work?

    Is there a way to force jlink-gdb to use hard breakpoints?

    Thanks
  • Hi,

    Can you please provide us a J-Link log file of this session?
    It can be enabled in the J-Link Control Panel (small green icon in the windows task bar) -> Settings -> Log file.


    - Erik
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    Short explanation regarding breakpoints on Cortex-M:
    Due to technical limitations in the core, hardware breakpoints can only be used for a certain address range.
    This range is: 0x00000000 - 0x1FFFFFFF
    For other addresses, only software breakpoints may be used.
    This limitation exists for all Cortex-M cores before the Cortex-M7

    Could you please explain the log a bit?
    In the log I see that
    0x35F8 bytes are downloaded to 0x08000000
    and
    0x198 bytes are downloaded to 0x20000000

    but your breakpoint is set to 0x20000E5E.
    Does your application copy itself to RAM during execution?


    - Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.