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.

System Analyzer: EVM6678: Assertion Failure in ti.uia.runtime.ServiceMgr

Other Parts Discussed in Thread: SYSBIOS

Hi,

during debugging with ccs5 system analyzer I receive following assertion errors on the target:

[C66xx_6] ti.uia.runtime.ServiceMgr: line 87: assertion failure: A_invalidProcessCallbackFxn: Callback cannot be NULL
[C66xx_6] xdc.runtime.Error.raise: terminating execution
[C66xx_7] ti.uia.runtime.ServiceMgr: line 87: assertion failure: A_invalidProcessCallbackFxn: Callback cannot be NULL
[C66xx_7] xdc.runtime.Error.raise: terminating execution
[C66xx_0] ti.uia.runtime.ServiceMgr: line 87: assertion failure: A_invalidProcessCallbackFxn: Callback cannot be NULL
[C66xx_0] xdc.runtime.Error.raise: terminating execution

 

I run the MCSK image processing example on an EVM6678 Evaluation Board, with XDS560v2 STM jtag emulator.

I have selected UploadMode_JTAGRUNMODE.

The assertion failure does not happen immediately, it appear about 3 minutes or even later after starting System Analyzer.

The problem is not linked to a specific core, instead it happens in some random fashion on some of the cores, including core 0. Looks like some kind of buffer overflow.

Just another observation: It does no make a differenc if the SA Log is updating or is in pause mode.

 

Any suggestions ?

 

regards

Alois



Here is the  XDC .cfg file of the master module:

/*******************************************************************************************
*  Specify all needed RTSC Moudles and configure them.                                     *
********************************************************************************************/

var Memory    = xdc.useModule('xdc.runtime.Memory');
var Log       = xdc.useModule('xdc.runtime.Log');
var Error     = xdc.useModule('xdc.runtime.Error');
var Diags     = xdc.useModule('xdc.runtime.Diags');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var Startup   = xdc.useModule('xdc.runtime.Startup');
var System    = xdc.useModule('xdc.runtime.System');
var SysStd    = xdc.useModule('xdc.runtime.SysStd');

System.SupportProxy = SysStd;

/* Load and configure SYSBIOS packages */
var BIOS      = xdc.useModule('ti.sysbios.BIOS');
var Task      = xdc.useModule('ti.sysbios.knl.Task');
var Clock     = xdc.useModule('ti.sysbios.knl.Clock');
var Sem       = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi       = xdc.useModule('ti.sysbios.hal.Hwi');
var Ecm       = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var BiosCache = xdc.useModule('ti.sysbios.hal.Cache');
var HeapBuf   = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var HeapMem   = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Exc       = xdc.useModule('ti.sysbios.family.c64p.Exception');
var Cache     = xdc.useModule('ti.sysbios.family.c66.Cache');

BIOS.taskEnabled = true;
Task.common$.namedInstance = true;

/*
 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
 */

Ecm.eventGroupHwiNum[0] = 7;
Ecm.eventGroupHwiNum[1] = 8;
Ecm.eventGroupHwiNum[2] = 9;
Ecm.eventGroupHwiNum[3] = 10;

/* Create a Heap. */
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x8000000;
heapMemParams.sectionName = "systemHeapMaster";
Program.global.heap0 = HeapMem.create(heapMemParams);
Memory.defaultHeapInstance = Program.global.heap0;

/* Load and configure NDK */
var Global = xdc.useModule('ti.ndk.config.Global');

/*
** This allows the heart beat (poll function) to be created but does not generate the stack threads
**
** Look in the cdoc (help files) to see what CfgAddEntry items can be configured. We tell it NOT
** to create any stack threads (services) as we configure those ourselves in our Main Task
** thread.
*/ 
Global.enableCodeGeneration = false;

/* Load the PDK packages */
var Csl  = xdc.useModule('ti.csl.Settings');
var Pa   = xdc.useModule('ti.drv.pa.Settings');
var Cppi = xdc.loadPackage('ti.drv.cppi');    
var Qmss = xdc.loadPackage('ti.drv.qmss');

/* Load the Platform/NDK Transport packages */
var PlatformLib  = xdc.loadPackage('ti.platform.evmc6678l');
var NdkTransport = xdc.loadPackage('ti.transport.ndk');

/* Load and configure the IPC packages */
var MessageQ     = xdc.useModule('ti.sdo.ipc.MessageQ');
var Ipc          = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP    = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var MultiProc    = xdc.useModule('ti.sdo.utils.MultiProc');

MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);

/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;

/* Shared Memory base address and length */
var SHAREDMEM           = 0x0c200000;
var SHAREDMEMSIZE       = 0x00200000;

SharedRegion.setEntryMeta(0,
    { base: SHAREDMEM,
      len:  SHAREDMEMSIZE,
      ownerProcId: 0,
      isValid: true,
      name: "MSMCSRAM_IPC",
    });

/* ================ Logger configuration ================ */
var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
var Diags         = xdc.useModule('xdc.runtime.Diags');
var Defaults      = xdc.useModule('xdc.runtime.Defaults');
var Main          = xdc.useModule('xdc.runtime.Main');
var Load          = xdc.useModule('ti.sysbios.utils.Load');

Load.windowInMs = 50;
CpuTimestamp     = xdc.useModule('ti.uia.family.c66.TimestampC66XLocal');
GlobalTimestamp = xdc.useModule('ti.uia.family.c66.TimestampC66XGlobal');
LogSync       = xdc.useModule('ti.uia.runtime.LogSync');
LogSync.GlobalTimestampProxy = GlobalTimestamp;
LogSync.CpuTimestampProxy = CpuTimestamp;

CpuTimestamp.maxTimerClockFreq = {lo:1000000000,hi:0};
CpuTimestamp.maxBusClockFreq = {lo:1000000000,hi:0};
GlobalTimestamp.maxTimerClockFreq = {lo:250000000,hi:0};
GlobalTimestamp.maxBusClockFreq = {lo:1000000000,hi:0};
GlobalTimestamp.cpuCyclesPerTick = 4;

Exc.common$.logger = Main.common$.logger;
Exc.enablePrint = true;

var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
/* Increase the sysbios logger and turn Hwi and Swi logging off */
LoggingSetup.sysbiosLoggerSize = 32768;
LoggingSetup.mainLoggerSize = 8*1024;
LoggingSetup.loadLoggerSize = 32768;
LoggingSetup.loadLogging = true;
LoggingSetup.sysbiosTaskLogging = true;
LoggingSetup.sysbiosSwiLogging = false;
LoggingSetup.sysbiosHwiLogging = false;
//LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_NONJTAGTRANSPORT;
LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE; // C66xx JTAG
 
/* ================ UIA configuration ================ */
/*
 *  This example is a multi-core example, so UIA's ServiceMgr
 *  must be configured to collect events from multiple cores.
 */
var ServiceMgr = xdc.useModule('ti.uia.runtime.ServiceMgr');
ServiceMgr.topology = ServiceMgr.Topology_MULTICORE;
ServiceMgr.masterProcId = 0;

/* The application is using the UIA benchmark events. */
var UIABenchmark  = xdc.useModule('ti.uia.events.UIABenchmark');

/*
** Create a Heap.
*/
var Memory      = xdc.useModule('xdc.runtime.Memory');
Memory.defaultHeapSize = 0x10000;
Program.heap = 0x10000;
Program.sectMap[".vecs"]             = {loadSegment: "MSMCSRAM_MASTER", loadAlign:1024};
Program.sectMap[".switch"]           = {loadSegment: "MSMCSRAM_MASTER", loadAlign:8};
Program.sectMap[".cio"]              = {loadSegment: "L2SRAM", loadAlign:8};
Program.sectMap[".args"]             = {loadSegment: "L2SRAM", loadAlign:8};
Program.sectMap[".cppi"]             = {loadSegment: "L2SRAM", loadAlign:16};
Program.sectMap[".qmss"]             = {loadSegment: "L2SRAM", loadAlign:16};
Program.sectMap[".nimu_eth_ll2"]     = {loadSegment: "L2SRAM", loadAlign:16};
Program.sectMap[".far:NDK_PACKETMEM"]= {loadSegment: "MSMCSRAM_MASTER", loadAlign: 128};
Program.sectMap[".far:NDK_OBJMEM"]   = {loadSegment: "MSMCSRAM_MASTER", loadAlign: 16};
Program.sectMap[".far:WEBDATA"]      = {loadSegment: "DDR3", loadAlign: 8};
Program.sectMap[".resmgr_memregion"] = {loadSegment: "L2SRAM", loadAlign:128};
Program.sectMap[".resmgr_handles"]   = {loadSegment: "L2SRAM", loadAlign:16};
Program.sectMap[".resmgr_pa"]        = {loadSegment: "L2SRAM", loadAlign:8};

Program.sectMap["systemHeapMaster"]     = "DDR3";
Program.sectMap[".cinit"]               = "MSMCSRAM_MASTER";
Program.sectMap[".const"]               = "MSMCSRAM_MASTER";
Program.sectMap[".text"]                = "MSMCSRAM_MASTER";
Program.sectMap[".far"]                 = "L2SRAM";
Program.sectMap[".bss"]                 = "L2SRAM";
Program.sectMap[".rodata"]              = "L2SRAM";
Program.sectMap[".neardata"]            = "L2SRAM";
Program.sectMap[".code"]                = "L2SRAM";
Program.sectMap[".data"]                = "L2SRAM";
Program.sectMap[".sysmem"]              = "L2SRAM";
Program.sectMap[".defaultStackSection"] = "L2SRAM";
Program.sectMap[".stack"]               = "L2SRAM";
Program.sectMap[".plt"]                 = "L2SRAM";
Program.sectMap["platform_lib"]         = "L2SRAM";

/* Add init function */
Startup.firstFxns.$add('&EVM_init');

/* Create the stack Thread Task for our application.  */
var tskMainThread        =  Task.create("&master_main");
tskMainThread.stackSize  = 0x2000;
tskMainThread.priority   = 0x5;
tskMainThread.instance.name = "master_main";

/* Create the stack Thread Task for our application. */
var tskSlaveThread       = Task.create("&slave_main");
tskSlaveThread.stackSize = 0x2000;
tskSlaveThread.priority  = 0x5;
tskSlaveThread.instance.name = "slave_main";

Load.hwiEnabled = false;
Load.swiEnabled = false;
Defaults.common$.diags_ENTRY = Diags.ALWAYS_ON;
Defaults.common$.diags_EXIT = Diags.ALWAYS_ON;
Defaults.common$.namedInstance = true;


  • Alois,

    Sorry, your thread has slipped. I will move it to the BIOS forum so you can get better advice from the experts there.

    Regards,

    Rafael

  • Hi Alois,

        Please delete the following lines from your .cfg script:

    /* ================ UIA configuration ================ */
    /*
     *  This example is a multi-core example, so UIA's ServiceMgr
     *  must be configured to collect events from multiple cores.
     */
    var ServiceMgr = xdc.useModule('ti.uia.runtime.ServiceMgr');
    ServiceMgr.topology = ServiceMgr.Topology_MULTICORE;
    ServiceMgr.masterProcId = 0;

    Note that in order to upload events from the other cores, you'll need to make the same changes the Slave .cfg files so that they upload events over JTAG as well: i.e. delete all of the lines associated with ServiceMgr and change the LoggingSetup.eventUploadMode to UploadMode_JTAGRUNMODE; 

    What's going on: The ServiceMgr module expects to communicate with System Analyzer on the host through a transport such as Ethernet (via the NDK).   When you made the following change:

    //LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_NONJTAGTRANSPORT;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE; // C66xx JTAG

    it configured the LoggingSetup module to set things up to upload events directly over JTAG (via the CCS Debug Server) instead of via the ServiceMgr and the associated non-JTAG transport.  The side effect of this is that the LoggingSetup module will no longer automatically configure the ServiceMgr's callbacks, leaving them unplugged. 

    I'll file a bug on this - this condition needs to be checked for and flagged at build time, and the System Analyzer / UIA documentation needs to be clearer on how to switch from Ethernet transport to JTAG transport!

    Regards,

      Brian