• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » Code Composer Studio » Code Composer Forum » Is there any configuration in CCS v5 for doing profiling of code (Checking timing to run the code or function) ????
Share
Code Composer Studio
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Common Questions
  • Code Composer Studio Forum Usage Guidelines

  • Resources
  • Code Composer Studio (CCStudio) Product Folder
  • Troubleshooting CCS
  • CCS Wiki
  • Download CCS
  • Order CCS
  • Tools Insider Blog
  • Bug Tracking
  • Forums

    Is there any configuration in CCS v5 for doing profiling of code (Checking timing to run the code or function) ????

    This question is answered
    studinstru sggs
    Posted by studinstru sggs
    on May 04 2012 04:38 AM
    Expert1870 points

    HI,

    I am using CCS V5.

    I just want to do the profiling of my code that is nothing but want to check the timing information for the code that is how much time the function is taking for example in below example the time taken by add() function and total time by main function ……?

    Is there any setting or inbuilt tool available in ccs v5 for profiling ….?


    just Example :

    #include<stdio.h>

    Void main (void)

    {

     Int a=10, b=5 ;

    Int sum;

    Sum= add(a,b);

    return;

    }

    int add(int a,int b)

    {

             return(a,b);

    }

    #include <ti/xdais/ialg.h> % Connect to CCS Setup
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Soumya Sardar
      Posted by Soumya Sardar
      on May 04 2012 07:46 AM
      Suggested Answer
      Intellectual510 points

      Hi,

      You can use this code to get the number of cycles used by your application. It is very accurate.

       

      UInt64 t_start;
      UInt64 t_stop;
      UInt64 t_overhead;

      TSCL=0;
      t_start = _itoll( TSCH, TSCL );
      % code you want to bench
      t_stop = _itoll( TSCH, TSCL );
      t_overhead=t_stop-t_start;
      printf("Number of cycles = %d\n",t_overhead)

      You need to include c6x.h .
      From the number of cycles you can easily find the time taken from the CPU clock speed.

      regards
      Soumya
      Pls verify the answer if it solves your problem.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ki-Soo Lee
      Posted by Ki-Soo Lee
      on May 04 2012 08:50 AM
      Suggested Answer
      Guru117055 points

      Hello,

      Other options available are:

      If using simulator, you can use the CCS  function profiler: http://processors.wiki.ti.com/index.php/Profiler

      On hardware, you can use the profile clock: https://www-a.ti.com/downloads/sds_support/CCE/Demos/Clock.htm

      Thanks

      ki

      -----------------------------------

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

      Having CCSv5 problems? Check out the CCSv5 Troubleshooting Guide

      Click here to track an issue. Enter your bug id in the "Find Record ID" box

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • studinstru sggs
      Posted by studinstru sggs
      on May 07 2012 00:35 AM
      Expert1870 points

      Thank Soumys.

      But I am using omap4430 processor .

      So because of this i can't use the c6x.h header file in this.

      Some more data I want to add :

      Working platform : CCS v5

      OS : Windows

      Processor :OMAP4430 (ARM)

      Please comment on this ...........

      -Studinstru

      #pragma .out to .bin % Connect to CCS Setup
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • studinstru sggs
      Posted by studinstru sggs
      on May 08 2012 06:55 AM
      Expert1870 points

      @Ki,

      On hardware, you can use the profile clock: https://www-a.ti.com/downloads/sds_support/CCE/Demos/Clock.htm

      By using this i come to know to use the Clock option .

      But this Clock option is disabled in CCS V5.1.0.

      What is the reason ?

      Please tell me ....

      -Studinstru


      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ki-Soo Lee
      Posted by Ki-Soo Lee
      on May 08 2012 14:45 PM
      Guru117055 points

      By default it is disabled. You need to enabled it.

      Run -> Clock -> Enable

      Thanks

      ki

      -----------------------------------

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

      Having CCSv5 problems? Check out the CCSv5 Troubleshooting Guide

      Click here to track an issue. Enter your bug id in the "Find Record ID" box

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • studinstru sggs
      Posted by studinstru sggs
      on May 09 2012 01:56 AM
      Expert1870 points

      By default it is disabled. You need to enabled it.

      Run -> Clock -> Enable

      Thanks

      ki

      -----------------------------------

      @ Ki,

      PFB the print screen of cock disabled :

      All options for this clock is disabled and not able to access this.

      I am using panda board as my target (Hardware) .

      So whether this problem is because I am using 90 days free Evaluation version or some other else ???????

      I am not getting the solution .

      -Studinstru

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ki-Soo Lee
      Posted by Ki-Soo Lee
      on May 09 2012 14:10 PM
      Verified Answer
      Verified by studinstru sggs
      Guru117055 points

      Studinstru - I see the same issue as you in CCSv5.1.0 but not in 5.1.1. Looks like it was a bug that was fixed in 5.1.1. I suggest moving to 5.1.1 or waiting for the 5.2.0 updating coming in about 2 weeks.

      Thanks

      ki

      -----------------------------------

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

      Having CCSv5 problems? Check out the CCSv5 Troubleshooting Guide

      Click here to track an issue. Enter your bug id in the "Find Record ID" box

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • studinstru sggs
      Posted by studinstru sggs
      on May 11 2012 00:28 AM
      Expert1870 points

      @ Ki,

      If this is the solution then thanks.

      I will try to find out something different to do profiling in CCSv5.

      -Studinstru

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use