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/DRA750: cpu load graph is empty

Part Number: DRA750
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

if i config .cfg like the attachment ,  the cpu load graph is empty when checking using ccs and XDS560v2STM debugger .

rtos and uia installed

xdctools_3_32_01_22_core

uia_2_00_06_52

bios_6_46_05_55


  • /* ========================================================================== */
    /* CFG script for the UART sample */
    /* ========================================================================== */

    /* root of the configuration object model */
    var Program = xdc.useModule('xdc.cfg.Program');
    var cfgArgs = Program.build.cfgArgs;
    var RB = (cfgArgs.profile == "release" ? true : false);

    /* Move BIOS to release build. This is to reduce link time */
    xdc.loadPackage ("ti.sysbios").profile="release";

    /* use modules */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Startup = xdc.useModule('xdc.runtime.Startup');
    var SysStd = xdc.useModule('ti.sysbios.smp.SysStd');
    var Assert = xdc.useModule('xdc.runtime.Assert');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
    var GIO = xdc.useModule('ti.sysbios.io.GIO');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
    var Core = xdc.useModule('ti.sysbios.family.arm.ducati.Core');
    var HalCore = xdc.useModule('ti.sysbios.hal.Core');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var SyncSem = xdc.useModule('ti.sysbios.syncs.SyncSem');
    var Cache = xdc.useModule('ti.sysbios.hal.unicache.Cache');
    var HalCache = xdc.useModule('ti.sysbios.hal.Cache');
    var GateDualCore = xdc.useModule('ti.sysbios.family.arm.ducati.GateSmp');
    var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
    var EDMA3LLDDRV = xdc.loadPackage('ti.sdo.edma3.drv');
    var Edma = xdc.loadPackage("ti.sdo.edma3.drv.sample");
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    var Timer = xdc.useModule('ti.sysbios.hal.Timer');
    var DmTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    var Defaults = xdc.useModule('xdc.runtime.Defaults');

    Semaphore.supportsEvents = true;

    var HEAP_SIZE = @IPU1_HEAP@;

    /* Match this to the SYS_CLK frequency sourcing the dmTimers. */
    DmTimer.checkFrequency = false; // The check doesn't work properly on SMP, so it must be disabled
    DmTimer.intFreq.hi = 0;
    DmTimer.intFreq.lo = 19200000;

    var COUNT_CPU_LOAD = java.lang.System.getenv("COUNT_CPU_LOAD");
    if (COUNT_CPU_LOAD == 1)
    {
    xdc.print("# !!! Current build includes COUNTING CPU LOAD !!!" );
    Idle.addFunc('&idle_func1');
    }

    if(!RB)
    Defaults.common$.namedInstance = true;

    /* Calculate load for the time spent on hwi processing */
    Load.hwiEnabled = true;

    /* Enable cache */
    Cache.enableCache = true;


    /* no rts heap */
    Program.heap = 0;
    Program.argSize = 100; /* minimum size */
    Program.stack = 0x4000;

    /* use proper Gate to protect Heap instances */
    var gateParams = new GateDualCore.Params;
    var gateInstance = GateDualCore.create(gateParams);
    HeapMem.common$.gate = gateInstance;

    /* create a default heap */
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = HEAP_SIZE;
    Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
    Memory.defaultHeapSize = HEAP_SIZE;

    /* configure System module */
    var SysMin = xdc.useModule('ti.sysbios.smp.SysMin');
    SysMin.bufSize = 0x1000;
    SysMin.flushAtExit = false;

    /* Get generated linker command filtered through linkcmd.xdt so custom sections can be added */
    Program.linkTemplate = java.lang.System.getenv("OS_PATH") + "/ipu1/linkcmd_ipu1.xdt";

    /* Disable SMP BIOS */
    BIOS.smpEnabled = true;

    /* Bios lib instrumentation */
    BIOS.libType = BIOS.LibType_Custom;

    /* Fix for right clock of M4 */
    BIOS.cpuFreq.hi = 0;
    BIOS.cpuFreq.lo = 212500000; /* Actual CPU Clock Rate */
    BIOS..logsEnabled = true
    /* Remove asserts if the program is built with release profile */
    if(RB)
    BIOS.assertsEnabled = false;

    /* Declaring reference to assert as abort wrapper function*/
    var System = xdc.useModule('xdc.runtime.System');
    System.SupportProxy = SysMin;
    System.abortFxn = "&assertAsAbortMacroWrapper";

    Core.ipuId = 1;
    Core.id = 0;
    /* CBE Original: this doesn't do anything but set CurrentCore which we don't use, getting rid of the NULLs */
    if(0)
    {
    if (CurrentCore == "m4video")
    {
    Core.id = 1;
    GateDualCore.initGates = true;
    }
    }

    /* Clock tick in microseconds */
    Clock.tickPeriod = 1000;

    /* Stack size when NULL is passed as stack during TSK create */
    Task.defaultStackSize = 0x4000;
    Task.defaultAffinity = 0;

    /* section mapping over-ride with respect to default */

    Program.sectMap[".plt"] = "IPU1_PROG";

    /* Remove asserts if the program is built with release profile */
    Defaults.common$.diags_INTERNAL = (RB ? Diags.ALWAYS_OFF : Diags.ALWAYS_ON);
    Defaults.common$.diags_ASSERT = (RB ? Diags.ALWAYS_OFF : Diags.ALWAYS_ON);


    /* To suppress the file name in BIOS compilation*/
    var SourceDir = xdc.useModule('xdc.cfg.SourceDir');
    SourceDir.verbose = 1;

    /* Set the proxy for System module. This enables print statements at runtime in
    * the application */
    System.SupportProxy = SysStd;

    /* MMU configurations */
    xdc.loadCapsule("bspCommon_AMMU_Spartan_M4.cfg");

    var GIO = xdc.useModule('ti.sysbios.io.GIO');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');

    /* UIA logging module */
    /* If UIA is used then all other logger instances have to be disabled */
    if (cfgArgs.profilingEnabled)
    {
    print("---------------------------------------------------------");
    print("UIA Profiling enabled");
    print("---------------------------------------------------------");

    var LoggerStreamer2 = xdc.useModule('ti.uia.sysbios.LoggerStreamer2');
    LoggerStreamer2.isTimestampEnabled = true;

    var loadLogger = LoggerStreamer2.create();

    loadLogger.instance.name = 'OsalLoadLogger';
    loadLogger.bufSize = cfgArgs.profilingLogBufSize;
    loadLogger.primeFxn = '&profilingLoggerPrime';
    loadLogger.exchangeFxn = '&profilingLoggerExchange';
    loadLogger.context = 0;

    Program.global.loadLogger = loadLogger;
    Program.global.LOAD_LOGGER_BUF_SIZE = cfgArgs.profilingLogBufSize;

    var UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

    LoggingSetup.loadLogger = loadLogger;

    LoggingSetup.benchmarkLogging = false;
    LoggingSetup.countingAndGraphingLogging = true;
    LoggingSetup.enableContextAwareFunctionProfiler = true;
    LoggingSetup.enableTaskProfiler = true;
    LoggingSetup.loadHwiLogging = false;
    LoggingSetup.loadLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.loadLogging = true;
    LoggingSetup.loadLoggingRuntimeControl = true;
    LoggingSetup.loadSwiLogging = false;
    LoggingSetup.loadTaskLogging = true;
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    LoggingSetup.mainLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.mainLogging = true;
    LoggingSetup.mainLoggingRuntimeControl = true;
    LoggingSetup.maxEventSize = 128;
    LoggingSetup.multicoreEventCorrelation = false;
    LoggingSetup.profileLogging = true;
    LoggingSetup.snapshotLogging = false;
    LoggingSetup.sysbiosHwiLogging = false;
    LoggingSetup.sysbiosHwiLoggingRuntimeControl = false;
    LoggingSetup.sysbiosLoggerSize = cfgArgs.profilingLogBufSize;
    LoggingSetup.sysbiosSemaphoreLogging = false;
    LoggingSetup.sysbiosSemaphoreLoggingRuntimeControl = false;
    LoggingSetup.sysbiosSwiLogging = false;
    LoggingSetup.sysbiosSwiLoggingRuntimeControl = false;
    LoggingSetup.sysbiosTaskLogging = true;
    LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
    }

  • Hi,

    Can you take a look at this FAQ: https://e2e.ti.com/support/processors/f/791/t/850830. It might be helpful.

    Also, you are not explicitly setting the sysbios logger (just LoggingSetup.loadLogger = loadLogger). Which logger do you want sysbios to use? 

    Additionally, I see "BIOS..logsEnabled = true" in the .cfg. This is not valid syntax. It should be "BIOS.logsEnabled = true;"

    Todd

  •  I can get the log records ,but cpu load still empty.

    also , Execution Graph works fine now.

  • You've setup the load logger to LoggerStreamer2 instance. If you don't explicitly set it up, LoggingSetup will create a LoggerStopMode instance for you.

  • thanks for your help . it works now at LoggerStopMode ,

    but could you show me how to update cpu load when target is running .

  • Hello,

    I don't think we have a complete example of a runtime logger streamer. Can you look into the xdc.runtime.Log module perhaps? 

    thanks,

    Alex