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
  • Hello,

    I am unable to use anything but the == operator.

    Are you certain that it is only the == operator that works for this? If so, how - what else have you tested, what other operations does not work to put a breakpoint on? It would be very helpful to see some code snippets here. Please use the "Insert->Code" option when sharing code on the forum.

    Please be advised that you will only encounter breakpoints which are set on instructions that the CPU will actually see during operation. During compilation the compiler optimizes away a lot of the code (such as declarations etc.), so the CPU will never actually encounter these. If you place a breakpoint on such an instruction, the debugger will jump right over it.

    Instructions like evaluations (==, >=, <=, etc) could also be optimized away if the two operators are constants, or if the compiler sees that they will never change, so that the evaluation always will have the same outcome.

    Best regards,
    Karl

Reply
  • Hello,

    I am unable to use anything but the == operator.

    Are you certain that it is only the == operator that works for this? If so, how - what else have you tested, what other operations does not work to put a breakpoint on? It would be very helpful to see some code snippets here. Please use the "Insert->Code" option when sharing code on the forum.

    Please be advised that you will only encounter breakpoints which are set on instructions that the CPU will actually see during operation. During compilation the compiler optimizes away a lot of the code (such as declarations etc.), so the CPU will never actually encounter these. If you place a breakpoint on such an instruction, the debugger will jump right over it.

    Instructions like evaluations (==, >=, <=, etc) could also be optimized away if the two operators are constants, or if the compiler sees that they will never change, so that the evaluation always will have the same outcome.

    Best regards,
    Karl

Children
No Data
Related