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 to count execution of loc



I am using C2802x wth CCS 6.1.00104. Sometime ago I was somehow able to set a break point on a line of code that would count the number of times execution of that LoC occurred. Now I need to use the same functionality again but am unable to figure out how to do this.

Am I imagining this functionality, or is there some method of doing it?

Thanks, T.

P.S. I've tried adding "Count Event" points and "Data Access Count" points without achieving the intended result. The Count Event only seems to count clock cycles between CPU halts and setting a Data Access Count to count reads from the address (in flash) of the function call on the LoC doesn't seem to do anything at all.

  • Hi Toby,
    I played around with this a bit and surprisingly, there was no simple way to count the number of times a line was executed. Not to say that this isn't possible, but the alternatives require a bit more setup.

    Some alternatives:
    1) Using GEL: You can set your breakpoint properties to evaluate a GEL expression when triggered. You can have it simply increment a global GEL counter
    2) Skip Counts: You can set a skip count for the breakpoint. Set the count value high. The debugger will keep track of the number of times the breakpoint is skipped (essentially counting the number of times the line was reached).

    Thanks
    ki