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.

About CPU Load analysis - not showing anything in graph

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am trying to know about the cpu load and tried to plot a cpu load graph in ccs debug mode. But am not getting anything in graph, please can u tell me what are the steps to fallow and what i am doing wrong.

Thanks & Regards

Shankar H

  • Hi Shankar,

    It's probably a simple problem of not enabling logging correctly in your config (.cfg) file.

    The System Analyzer's Users Guide, http://www.ti.com/lit/ug/spruh43f/spruh43f.pdf , has all of the information on profiling your application. Section 5.1 covers the steps to go through to set up your config file to enable logging.

    Best,
    Alexander

  • Hi Aldabreu,
    Thanks for your quick response. As per System Analyzer's Guide, Am not finding LoggingSetup module in available product. i am using CCS version 6.1.0 . Please can u tell me where can i get that LoggingSetup module.

    Thanks & Regards
    Shankar H
  • Hi Shankar,

    The LoggingSetup module can be found under products->UIA. From there you can click "Add LoggingSetup to my configuration".

    Alternatively you may also edit the .cfg file directly and add the following:

    /* ================ Logger configuration ================ */
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    /*
     *  Use LoggingSetup which uses JTAG LoggerStopMode as the
     *  default.
     *
     *  Configuration done by the application is still honored (e.g. setting
     *  up the common$.diags mask).
     *
     *  Please refer to the ti.uia.sysbios.LoggingSetup module for more
     *  details and configuration options.
     */
    
    
    /* Enable CPU Load logging */
    LoggingSetup.loadLogging = true;
    
    /*
     *  Enable Task, Swi, and Hwi Load logging. This allows the Idle Task
     *  usage to make more sense. Otherwise Hwi and Swi load is factored into
     *  each task's usage.
     */
    LoggingSetup.loadTaskLogging = true;
    LoggingSetup.loadSwiLogging = true;
    LoggingSetup.loadHwiLogging = true;

    Best,

    Alexander

  • Hi Aldabreu,

         There is no LoggerSetup module in available products,  have a look at attachment.

     

    I also tried as u said by adding lines suggested in your previous response, directly in *.cfg file. But its giving an error as


    xdc.PACKAGE_NOT_FOUND: can't locate the package 'ti.uia.sysbios'

    Thanks & Regards

    Shankar H

  • Hi Aldabreu,

    i have also tried to install that UIA package in CCS app centre, when i click on download icon its directed to browser where in i have downloaded the latest release 2.00.05.50. and got a zip file , extracted in which i didn't found any executables(.exe) files.

    so that i have just added the UIA folder in the directory --> C:\CCS Installation Folder\bios_6_45_00_20\packages\ti
    even though, am not getting UIA module in available product files.

    Am i right or wrong?
    what i should do please tell me what i should do....

    Thanks & Regards
    Shankar H
  • Hi Shankar, 


    Could you make sure that UIA is properly installed in CCS? It should come up in the "New products" when you restart CCS.

    It should also appear in this window here: Window->Preferences->Code Composer Studio->RTSC

     If it does not, install it manually by selecting RTSC->Products and Install New. Restart CCS and it should appear.

    Also once it is installed, make sure that it's selected in the "Products and Repositories" Tab:

    Best,

    Alexander

  • Hi Aldabreu,

    I have installed UIA package as u said.

    Even though i am not getting UIA module in available product window. 

    What is happening please tell me.

    Thanks & Regards

    Shankar H

  • I have selected in the "Products and Repositories" Tab and restarted.

    Thanks & Regards
    shankar H
  • Could you click "Refresh" by right-clicking on the "Available Products" view? And if that doesn't make it appear could you right click in the same pane selecting "Check Paths" and post a screen shot?

    It should look something like this:

    Best,

    Alexander

  • Hi Aldabreu,

         Thanks for ur response, i have added that path of UIA package in package repository path,  then i got UIA module in available products window.

    Also i did SYS/BIOS load logging configuration as shown in snapshot.

    Even though i am not getting any curve in CPU load graph.

    Waiting for ur reply....

    Thanks & Regards

    Shankar H. 

  • One more thing Outline window loggingSetup is marked as red dot and others are in blue colour dots(see the attachment which has attached in previous reply), what does blue and red colour indicates.

    Thanks & Regards

    Shankar H.
  • Hi Shankar,

    You'll need to run your application for a few seconds before you can expect load results to appear. Are you seeing any data in the execution analysis or log windows?

    This can be opened through (Tools->RTOS Analyzer->Execution Analysis) in your debug perspective.

    Best,

    Alexander

  • Could you also upload your .cfg file? It could also be that you don't have BIOS.logsEnabled = true;

    Thanks

    Best,
    Alexander
  • Hi Aldabreu,

    I did as u said RTOS Analyser ->Execution Analysis,  But  am not seeing any data in the execution analysis or log windows

    What is that partial in task load row?

     

    I created a sys/bios project in that i am calling  led_toggle(); function.

    Here is the *.cfg file

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory')
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    var ti_sysbios_family_c64p_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

    /*
    * Uncomment this line to globally disable Asserts.
    * All modules inherit the default from the 'Defaults' module. You
    * can override these defaults on a per-module basis using Module.common$.
    * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
    */

    /*
    * Uncomment this line to keep module names from being loaded on the target.
    * The module name strings are placed in the .const section. Setting this
    * parameter to false will save space in the .const section. Error and
    * Assert messages will contain an "unknown module" prefix instead
    * of the actual module name.
    Defaults.common$.namedModule = false;
    */

    /*
    * Minimize exit handler array in System. The System module includes
    * an array of functions that are registered with System_atexit() to be
    * called by System_exit().
    */
    System.maxAtexitHandlers = 4;

    /*
    * Uncomment this line to disable the Error print function.
    * We lose error information when this is disabled since the errors are
    * not printed. Disabling the raiseHook will save some code space if
    * your app is not using System_printf() since the Error_print() function
    * calls System_printf().
    Error.raiseHook = null;
    */

    /*
    * Uncomment this line to keep Error, Assert, and Log strings from being
    * loaded on the target. These strings are placed in the .const section.
    * Setting this parameter to false will save space in the .const section.
    * Error, Assert and Log message will print raw ids and args instead of
    * a formatted message.
    Text.isLoaded = false;
    */

    /*
    * Uncomment this line to disable the output of characters by SysMin
    * when the program exits. SysMin writes characters to a circular buffer.
    * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
    */


    /*
    * The BIOS module will create the default heap for the system.
    * Specify the size of this default heap.
    */
    BIOS.heapSize = 0x1000;

    /*
    * Build a custom SYS/BIOS library from sources.
    */
    BIOS.libType = BIOS.LibType_Custom;

    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x2000;

    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 0x200;
    //Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;

    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwi0";
    hwi0Params.eventId = 37;
    hwi0Params.maskSetting = xdc.module("ti.sysbios.interfaces.IHwi").MaskingOption_ALL;
    hwi0Params.priority = 5;
    Program.global.hwi0 = Hwi.create(5, "&Spi_0_receive", hwi0Params);
    Hwi.dispatcherAutoNestingSupport = false;
    var task0Params = new Task.Params();
    task0Params.instance.name = "task0";
    Program.global.task0 = Task.create("&led_toggle", task0Params);
    LoggingSetup.loadTaskLogging = true;
    /* Enable CPU Load logging */
    LoggingSetup.loadLogging = true;
    LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
    LoggingSetup.sysbiosSwiLogging = true;
    LoggingSetup.sysbiosHwiLogging = true;

  • Here is an instrumentation set-up

      

    Thanks

    Shankar H

  • Hi Shankar,

    From the users guide JTAG Runmode logging isn't available for the C674X:

    Can you update this line in the .cfg file to use StopMode and see if it works?

    LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
    
    to
    
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    

    Best,

    Alexander

  • Hi Aldabreu,

       As u suggested, i added those two lines even though no graph.

    Is there any there any other way to do. if so please suggest me.

    Thanks & Regards

    Shankar H

  • Hi Aldabreu,
    I updated
    LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;

    to

    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;


    in *.cfg file and here is the .cfg file



    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory')
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    var ti_sysbios_family_c64p_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

    /*
    * Uncomment this line to globally disable Asserts.
    * All modules inherit the default from the 'Defaults' module. You
    * can override these defaults on a per-module basis using Module.common$.
    * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
    */

    /*
    * Uncomment this line to keep module names from being loaded on the target.
    * The module name strings are placed in the .const section. Setting this
    * parameter to false will save space in the .const section. Error and
    * Assert messages will contain an "unknown module" prefix instead
    * of the actual module name.
    Defaults.common$.namedModule = false;
    */

    /*
    * Minimize exit handler array in System. The System module includes
    * an array of functions that are registered with System_atexit() to be
    * called by System_exit().
    */
    System.maxAtexitHandlers = 4;

    /*
    * Uncomment this line to disable the Error print function.
    * We lose error information when this is disabled since the errors are
    * not printed. Disabling the raiseHook will save some code space if
    * your app is not using System_printf() since the Error_print() function
    * calls System_printf().
    Error.raiseHook = null;
    */

    /*
    * Uncomment this line to keep Error, Assert, and Log strings from being
    * loaded on the target. These strings are placed in the .const section.
    * Setting this parameter to false will save space in the .const section.
    * Error, Assert and Log message will print raw ids and args instead of
    * a formatted message.
    Text.isLoaded = false;
    */

    /*
    * Uncomment this line to disable the output of characters by SysMin
    * when the program exits. SysMin writes characters to a circular buffer.
    * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
    */




    /*
    * The BIOS module will create the default heap for the system.
    * Specify the size of this default heap.
    */
    BIOS.heapSize = 0x1000;

    /*
    * Build a custom SYS/BIOS library from sources.
    */
    BIOS.libType = BIOS.LibType_Custom;

    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x2000;

    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 0x200;
    //Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;

    var hwi0Params = new Hwi.Params();
    hwi0Params.instance.name = "hwi0";
    hwi0Params.eventId = 37;
    hwi0Params.maskSetting = xdc.module("ti.sysbios.interfaces.IHwi").MaskingOption_ALL;
    hwi0Params.priority = 5;
    Program.global.hwi0 = Hwi.create(5, "&Spi_0_receive", hwi0Params);
    Hwi.dispatcherAutoNestingSupport = false;
    var task0Params = new Task.Params();
    task0Params.instance.name = "task0";
    Program.global.task0 = Task.create("&led_toggle", task0Params);
    LoggingSetup.loadTaskLogging = true;
    /* Enable CPU Load logging */
    LoggingSetup.loadLogging = true;
    //LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    LoggingSetup.sysbiosSwiLogging = true;
    LoggingSetup.sysbiosHwiLogging = true;


    Even though not getting any curve in cpu load graph.
    please tell me is there any other things i have to set up.

    Thanks & Regards

    Shankar H
  • Hi Shankar,

    Could you import and run the stairstep System Analyzer example? This is a specific instrumentation example which will show an execution graph of Tasks,Swis and Hwis. I'd like to get a baseline on what we can get to work for you in order to further debug your problem.

    Best,
    Alexander
  • Hi Aldabreu,

        I imported the stairstep_JTAGRunMode example project. For that project no graph

       even in that example project,   *.cfg  file 

    LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE; is there, i tried for both

    LoggingSetup.loggerType =  LoggingSetup.LoggerType_JTAGRUNMODE;

    and

    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;

    I am tring all the possibilities u said. even though no graph. Then what is the further step to do? what can we do?

    Thanks & Regards

    Shankar H

  • Okay, that should show the graph. What version of CCS are you currently using?

    Best,
    Alexander