[SOLVED] how to create data access breakpoint with @pc condition

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

  • [SOLVED] how to create data access breakpoint with @pc condition

    Hello,
    An alternate title for this issue is:
    is it possible to enable/disable data acces breakpoint in code

    I am trying to debug a memory corruption issue on a Nordic nRF52832 processor. I have used SES 4.22 and Ozone 3.10e.

    Using SES, I am able to define an expression like this: ((char[480])0x2000486c) && (@pc > 0x47953)
    However this did not work. The issues I see are:
    1. The cast to treat the address as an array of 480 bytes is not working. The breakpoint only triggers when the local variable p_node matches the expression. This is a 2 dimensional byte array [15][32]. The other array locations do not trigger the break.
    2. The @pc portion of the expression is ignored. Both PC and LR are less than 0x4c600


    Questions:
    1. Is it possible to make a data access breakpoint conditional on the @pc value?
    2. If you create a data access like this ((char[100])0x00046778), it there a limitation on the array length specified?
    Images
    • segger1.png

      5.27 kB, 379×344, viewed 506 times
    • segger2.png

      7.76 kB, 441×216, viewed 507 times
    • segger3.png

      8.56 kB, 219×279, viewed 504 times
    • segger4.png

      11.28 kB, 801×138, viewed 393 times
    • SES.png

      23.46 kB, 343×230, viewed 515 times
  • Hello,

    Thank you for your inquiry.
    Such advanced conditional data break points are not supported by Arm Cortex-M target devices. That is why it won't work as expected.
    We will improve Embedded Studios error handling here so you get notified if you try to set breakpoints that are out of the capability range of your target device.
    For more information what kind of breakpoints are possible for your target device we recommend consulting the Arm architecture manual.


    acurtis_nalu wrote:

    If you create a data access like this ((char[100])0x00046778), it there a limitation on the array length specified?
    There is no limitation to this.

    Best regards,
    Nino
    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.