This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

breakpoint is ignored ... Code Composer 5

Other Parts Discussed in Thread: MSP430F5529, MSP430F5528

A breakpoint works twice, then never again until I reload / restart Code Composer 5.  The scope confirms that the MSP430f5529 is working properly in responding to a command (serial port).  But Code Composer 5 is ignoring the breakpoint. 

I tried using IAR ... exact same problem. 

  • I've investigated further. I set a breakpoint in the code ... it is found every time.  

    I set a second breakpoint inside an "if" statement.  After that breakpoint is hit, the first breakpoint is not longer found ... and the second breakpoint is not found either. 

  • 460822 said:

    I set a breakpoint in the code ... it is found every time.  

    I set a second breakpoint inside an "if" statement.  After that breakpoint is hit, the first breakpoint is not longer found ... and the second breakpoint is not found either. 

    Would you be able to share a simple test case that demonstrates the problem? If you could attach a project and detailed steps on which addresses/lines you are setting the breakpoint on, and the procedure you follow when you observe the behavior, we could try to reproduce it and investigate it further.

  • I tried to create a short test sample ... unsuccessfully. 

    The actual code is capturing info via the serial port.  It uses a timer that is started when bytes are received.  The timer is reset each time another byte is received.  When bytes start arriving, the timer sets a flag. 

    The main() has:

      while(1)
      {
        if(ucGetModbusBreakTimerInterruptFlag() == gSET)
        {
          ResetModbusBreakTimerInterruptFlag();
          gUpdateFram();
          RetrieveAndInterpretModbusBytes();
        }
      }

    A breakpoint on the "if" breaks every time.  A breakpoint inside the "if" breaks twice.  After two hits on the inside breakpoint, both breakpoints stop breaking.

    However, the code is still running fine ... per the computer sending the command / receiving the response ... and per a scope. 

  • 460822 said:

    The main() has:

      while(1)
      {
        if(ucGetModbusBreakTimerInterruptFlag() == gSET)
        {
          ResetModbusBreakTimerInterruptFlag();
          gUpdateFram();
          RetrieveAndInterpretModbusBytes();
        }
      }

    A breakpoint on the "if" breaks every time.  A breakpoint inside the "if" breaks twice.  After two hits on the inside breakpoint, both breakpoints stop breaking.

    There was this thread Two Variables in same register although should have enough memory where the debugging information for a test in a 'if' statement was confusing such that breakpoints at the C source level were not working as expected.

    Under CCS Project Properties -> Build -> MSP430 Compiler -> Advanced Options -> Assembly Options can you select "Keep the generated assembler language (asm) file". Then re-build the project any post the .asm generated for the main function, which will allow a check of if the debugging information .w.r.t. source file numbers inserted by the compiler is correct.

  • The main.asm is attached. 

    Main.asm
  • 460822 said:
    The main.asm is attached.

    Thanks. From looking at the assembler there is more in the while() loop than in the previous code fragment posted.

    Would you be able to post the C source for the entire while() loop to help analyzing what is happening?

    From looking at the assembler so far have seen that the order lines appear in the assembler doesn't match those in the source code which makes it confusing to trace the execution order...

  • From comparing the symbolic debug information in the assembler against the C source I can't see anything which explains why the debugger would ignore breakpoints.

    Using the "latest" CCS 5 5.5.0.00077 and MSP430 compiler v4.2.2 I created a program with the same while loop structure in main as your code, using stubs for the called functions, and couldn't repeat the breakpoint problem using a MSP430F5528 being debugged with a MSP-FET430UIF v1.4a and MSP430.dll v3.3.1.4 - the breakpoint inside the if was always hit.

    Can you clarify the version of CCS 5, and which debug interface, you are using.

  • I agree it is inexplicable.  I'm using IAR ... tried Code Composer 5 (5.3) -> duplicated the problem.  Very strange problem. 

  • What happens in the code that runs after hitting the breakpoint? I've bumped into past issues where software did "something bad" (e.g. accessing reserved memory, etc) which affected the emulation logic itself.  Once you cease to hit this breakpoint does JTAG continue to function in any capacity?  For example, can you halt the target and set other breakpoints (that work)?

  • No other breakpoints are recognized.  I can halt the target ... everything looks normal.  However, setting other breakpoints are ignored.