3 Replies Latest reply on Dec 29, 2019 5:02 AM by JoMe_264151

    emulator will not set a break point on a line of code, why?


      OK, really odd behavior, I have some code that we are using to set and clear bits in a data register in a buffer.  The code looks fine, but is not working, and when I go to debug it, the emulator will not allow me to place a breakpoint on the instructions, and places it at the end of the code, any idea why this is happening?  Started with a pointer to the register, thought it might be getting crush during an INTERRUPT, so I tried to make it a volatile, but you cannot have a pointer to a volatile in this environment.  When I try to set a breakpoint anywhere in the function it places it at the return brace?


      I am totally stuck.


      Here is the declarations. call and function.


      void setBit(uint8 bit, uint8 byte, uint8 on);

      volatile extern uint8 BLE_READINGS[READINGS_DATA_LEN];





      void setBit(uint8 bit, uint8 byte, uint8 on)


          if (on) {

              bit = 1 << bit;

              byte = byte | bit;

          } else {

              bit = 1 << bit;

              bit = bit ^ 0xff;

              byte = byte & bit;