Software breakpoints on ARM / AT91SAM7X

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

  • Software breakpoints on ARM / AT91SAM7X

    Hello,

    Is there any way to get the Segger GDB server to place software breakpoints on code residing on the SRAM/SDRAM?
    I could go with the 'monitor setbp/clearbp' approach but does not work with frontends such as Eclipse.

    Thanks
  • Hello eranrund,

    the J-Link ARM DLL decides by itself if a hardware or software breakpoint is set.
    Usually it should work without any problems.

    Did you test it with a frontend such as eclipse? What was the result?


    - 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.
  • Hey Alex,

    I have indeed tested it. For example, I place to breakpoints on code residing on the internal flash memory, occupying the processor's two hardware breakpoints.
    Afterward I try to set a breakpoint on code residing on the internal SRAM memory and it fails due to lack of hardware breakpoints.
    The Segger log also shows an attempt to place the breakpoint as a hardware breakpoint.
    If the log is of any use to you, let me know and I will reproduce this scenario and paste the log here.

    Many thanks,
    Eran
  • Hello eranrund,

    in general using software breakpoints in RAM in combination with J-Link ARM GDB Server works.

    To understand the problem in this case a short ecplanation is possible:
    When setting the 2 hardware breakpoints everthing works as expected. As soon as you are trying to set a
    third breakpoint (in this case BP in RAM) J-Link checks if it can set a software breakpoint in RAM.
    This is not possible because 1 breakpoint/watchpoint unit is necessary for software breakpoint
    handling (only on ARM 7 targets) and both BP units are used by the 2 BPs which were previously set in the flash memory.
    Usually in such a case, the DLL tries to convert this 2 hardware breakpoints into software breakpoints
    but if you do not have a license for software breakpoints in flash (FlashBP) this can not be done and both BP units keep occupied.

    In your case the only way to use software breakpoints in RAM is:
    Setting only one BP in the flash, so the other unit is free for software BP (RAM) handling.
    The first breakpoint you set in RAM is implemented in hardware and as soon as a second one is set in RAM,
    the first one will be converted in a software BP.

    - 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.