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.

CCS 5.1.1.00031 "Step Over" doesn't work for MSP430 __delay_cycles intrinsic

Other Parts Discussed in Thread: MSP-EXP430FR5739

When CCS 5.1.1.00031 and MSP430 Compiler V4.0.1 is used to debug programs, found that the "Step Over" operation in the debugger doesn't step over __delay_cycles intrinsic functions. e.g. debugging the following example on a MSP-EXP430FR5739:

#include <msp430.h>

void main(void) {
   // Stop watchdog timer to prevent time out reset
   WDTCTL = WDTPW + WDTHOLD;
   while (1)
   {
     __delay_cycles (100);
     __delay_cycles (1000);
     __delay_cycles (10000);
     __delay_cycles (100000);
     __delay_cycles (1000000);
     __delay_cycles (10000000);
   }
}

(this is a contrived example, generated to test cycle counter measurement)

If "Step Over" is used to attempt to step the program one source line at a time, then "Single Step" has to be used multiple times to step over a single __delay_cycles intrinsic. Is it possible the CCS debugger could be made to step over the __delay_cycles intrinsic?

(I note that IAR Embedded Workbench Kickstart for MSP430 5.40.3 does Step Over a __delay_cycles intrinsic)

  • Hi,

    I can reproduce this in my F149 board (and 4.0.0 compiler). I will check a few other things (I suspect it may be an emulation issue) and eventually file a bug.

    Just FYI, you can workaround this issue by selecting the next line, right-click on it and select Run to Line (Ctrl-R)

    Regards,

    Rafael

  • Hi,

    Thanks for reporting this. I filed bug SDSCM00043512. You can check its status in the link SDOWP in my signature below.

    Regards,

    Rafael

  • Hi Chester,

    I wonder if there is some kind of time out going on here. 

    I can reproduce the behaviour like my colleague.  However, I find that I can step over a small delay .. eg __delay_cycles(10);

    Do you see the same?

    Best Regards,
    Lisa

  • Hi Chester,

    ok, I have dug into this and found the following.

    1 - the very low delay was handled differently by the compiler (ie different assembly was generated)

    2- it is actually correct that you should not be able to step over __delay_cycles.   Our compiler (I suppose as opposed to that done by IAR) treats this intrinsic like a #define and generates no real function call so to speak.  This means when you press step over, there is no place for the debugger to put the breakpoint it puts and do the step over.  

    I hope this helps clarify things.

    Best Regards,

    LIsa