This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Conditional / expression breakpoints not working on NRF52840DK or working poorly

Using SES, nrf52840DK, the onboard debugger.

I am able to set a breakpoint and use condition like x == 5.

I am unable to use anything but the == operator. In SES I get the red breakpoint with a white question mark over it.

Tried read/write/default, hardware vs software break, all manner of syntax, local and global variables. Nothing seems to work except ==.

Thoughts?

EDIT: I followed the advice for SES here studio.segger.com/index.htm and here studio.segger.com/index.htm

Parents
  • Karl,

    I tested every other operator. Only == works. Everything else will make the breakpoint hover say "UNSUPPORTED BREAKPOINT OPERATION".

    Yes, this was tested on lines that will execute.

    These are not conditionals IN CODE. These are conditionals as breakpoint expressions. Nothing to optimize away.

    Can't post code, but found another project that I can post snippets from. Exact same errors.

    Doesn't work regardless of settings:

    Continues to work with all settings:

Reply
  • Karl,

    I tested every other operator. Only == works. Everything else will make the breakpoint hover say "UNSUPPORTED BREAKPOINT OPERATION".

    Yes, this was tested on lines that will execute.

    These are not conditionals IN CODE. These are conditionals as breakpoint expressions. Nothing to optimize away.

    Can't post code, but found another project that I can post snippets from. Exact same errors.

    Doesn't work regardless of settings:

    Continues to work with all settings:

Children
  • Hello again,

    Thank you for your patience with this.

    SRA said:

    I tested every other operator. Only == works. Everything else will make the breakpoint hover say "UNSUPPORTED BREAKPOINT OPERATION".

    Yes, this was tested on lines that will execute.

    Thank you for clarifying. This seems very strange.

    What optimization level is your project using? You can find this in Project Options->Code Generation->Optimization level.

    SRA said:
    Can't post code, but found another project that I can post snippets from. Exact same errors.

    Could you possible share this whole project with me? Right now I am unable to replicate this error, but if you send me this other project then I can take a look at the debugger/project settings, and see if I can spot something wrong.

    SRA said:
    These are not conditionals IN CODE. These are conditionals as breakpoint expressions.

    Please elaborate what you mean by this.

    Looking forward to resolving this issue together!

    Best regards,
    Karl

  • Optimization level: NONE

    No, I can't share the whole project. But a very close one would be on github.com

    https://github.com/aws/amazon-freertos  tag: 20201200 but it probably doesn't matter

    What I wrote was the conditionals I'm talking about are the breakpoint conditionals as per picture. Not code breakpoints like if I were to write if (x>10) and put a breakpoint there, because like you eluded to, that line might be removed because x can never be more than 10 and the compiler knew that. A data breakpoint of x > 10 is what I'm having problems with, a line or code breakpoint on a statement like if (x > 10) is not.

  • SRA said:
    No, I can't share the whole project. But a very close one would be on github.com

    I understand. Is this the same project you referred to when you said:

    SRA said:
    Can't post code, but found another project that I can post snippets from. Exact same errors.

    ?
    I also want to let you know that I can change the ticket to Private at any time, if you want to share code that can not be shared publicly. Private tickets are only viewable by yourself and the support staff here at Nordic. Please just let me know if I should make it private.

    SRA said:
    Optimization level: NONE
    SRA said:
    Not code breakpoints like if I were to write if (x>10) and put a breakpoint there, because like you eluded to, that line might be removed because x can never be more than 10 and the compiler knew that. A data breakpoint of x > 10 is what I'm having problems with, a line or code breakpoint on a statement like if (x > 10) is not.

    Thank you for clarifying - I only asked in order to avoid making any wrongful assumption about your issue.
    Looking into it, it seems this issue has been raised in Segger's forum earlier.
    Could you try the workaround proposed in this ticket?
    Since this is an issue in SES I would also recommend that you open a ticket with them, if the configurations / workaround they mention in my referenced post does not resolve the issue.

    Best regards,
    Karl

  • Karl,

    That workaround is not a solution, no change, no effect. In the first post I wrote that this happened regardless of options set in the breakpoint settings. I've done every possible combination of trial and error here.

    I don't know this is a problem with SES. How can I know it is not a problem with the nrf52's debugger, or the nrf52 itself? I'll try opening a ticket with Segger.

  • SRA said:
    That workaround is not a solution, no change, no effect.

    Thank you for confirming this.

    SRA said:
    I don't know this is a problem with SES. How can I know it is not a problem with the nrf52's debugger, or the nrf52 itself? I'll try opening a ticket with Segger.

    Yes, I would think this is the best course of action. I am sorry that I could not be of more help in this case. I do not see any way how this could be the fault of the nRF52 SoC, since it is completely at the mercy of the JLink debugger when the debugger is attached. The debugger has full access. 

    Please do not hesitate to resume this ticket and let me know if your inquiry with Segger does not pan out.

    Best regards,
    Karl

Related