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.

time taken for execution of program

Other Parts Discussed in Thread: CCSTUDIO, SYSBIOS

Dear sir / madam,

 

I have written a c program for my project. I am working using ccstudio. I need to calculate the time for execution  of my program. How can I do it?

 

Thanking you,

DHARSHAK.B.S

  • Are you using DSP/BIOS, or SYSBIOS, to run on the processor?  If so, there is a module available that provides a tick count based on an on-chip timer.

    If not using DSP/BIOS or a similar type RTOS, then setup a timer on the device and take snapshots of the counter register just before and after the areas of interest in your program.  You will need to handle situations where the timer rolls over, etc.

  • Is it possible to calculate the time of execution without setting up a timer,( i.e to check on ccstudio directly). OR What if I set up   break points  in the program and use a stopwatch to calculate the time of execution.

     

    Thanking you,

    DHARSHAK.B.S

  • Which device are you targeting?  CCS may have an enabled feature for that device which is a profiler that it will count CPU clocks.

    You could set a breakpoint to where you want to stop counting.  Enable the profiler for CPU clocks.  Clear the count and hit run.  When the processor reaches the breakpoint, CCS will display the number of CPU clocks that have transpired.

    Again, this is enabled on some devices provided they have the functionality to support it.

  • hi

    dharshak,

    which ccstudio version and which device you are using.

    or simple thing, use one gpio pin, toggle it at start and stop time,

    and measure it on oscilloscope.

    regards

    nikhil

  • I am using ccs v5.3, with stellaris launchpad LM4F120H5QR and I want to calculate the time which my code is taking for execution using ccstudio.

    Is it possible? Please suggest me any feature which ccs may have.

    Thanks to all.