This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

unable to set breakpoints

I am debugging a program running in internal flash of an XC161 using ULINK.

Here is an example function I want to debug.

void BM_CbfCmd(word wNdx, byte bSub) {
  if(wNdx) {}; if(bSub) {}; //suppress warning
  if(OBD_s_ObjectInfo.index != 0x2F50) return;
  if(OBD_s_ObjectInfo.subindex != 0x01)   return;

  if((USR_s_OV.ulCmd & 0xFFFFFF00) == USR_k_BOOT) { // 0xFF55AAxx
    BMF_iSectorsToErase((word)(USR_s_OV.ulCmd & 0x000000FFul));
  }

  if(USR_s_OV.ulCmd == USR_k_FLOD) { // "FLOD"
    BMF_iStartErase();
  }

  if(USR_s_OV.ulCmd == USR_k_STRT) { // "STRT"
    BMF_iRunnAppli();
  }

} // BM_CbfCmd()

It is impossible to set a breakpoint at any of the if-statements. I can only break at the function-calls (for example: BMF_iSectorsToErase).
I tried to decrease the optimization level but no effect.

Any ideas?

...Leo

0