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 anlayzer on C6678 with single image

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am using UIA on C6678 with single image loaded to all 8 cores. My application runs on evm6678l.

My configuration is like this:

SYS/BIOS 6_34_02_18

ipc_1_25_00_04

pdk_C6678_1_1_2_5

 uia_1_01_01_14

When I debug my application I can see that 3 Log_info statements are called, but when I try to see messages through "System Analyzer Live Session" there are 2 messages shown (instead it should be 3) and the 2 messages shown are exactly the same. I am wondering if I am overwriting messages of different cores. I have added the following configuration to my cfg file as the user guide says. I am allocating data on DDR.

// UIA start //////////////////////////////////////////////////////////////////

// Added from SA Tutorial #4B

/* ================ Logger configuration ================ */

/*

* The target's Log records are read while the target is running. Note: this mode

* is only supported for CPUs that support real-time JTAG accesses such as

* those in the C6X family (e.g. C64X+ and C66 CPUs).

*

* 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.

*/

Timestamp = xdc.useModule('xdc.runtime.Timestamp');

var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');

var loggerCircBufParams = newLoggerCircBuf.Params();

loggerCircBufParams.transferBufSize = 2048;

loggerCircBufParams.numCores = 8;

/* must also place memory section via Program.sectMap */

loggerCircBufParams.bufSection = ".loggerCircBuffer";

var logger = LoggerCircBuf.create(loggerCircBufParams);

logger.instance.name = "Load Logger";

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

LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;

LoggingSetup.loadLoggerSize = 1024;

LoggingSetup.mainLoggerSize = 32768;

LoggingSetup.sysbiosLoggerSize = 32768;

LoggingSetup.loadLogger = logger;

// SA Tutorial 4 changes

LoggingSetup.sysbiosTaskLogging = false;

LoggingSetup.loadLogging = false;

var Load = xdc.useModule('ti.sysbios.utils.Load');

Load.windowInMs = 50;

 

/* Bring in the LogSync module, and configure it so that

* event correlation is enabled even though we are using

* JTAG as a transport. */

var LogSync = xdc.useModule('ti.uia.runtime.LogSync');

LogSync.enableEventCorrelationForJTAG = true;

Program.sectMap[".loggerCircBuffer"] = "DDR3";

/* Register the idle function hook */

var Idle = xdc.useModule('ti.sysbios.knl.Idle');

Idle.addFunc('&myIdleFunc');

// UIA end//////////////////////////////////////////////////////////////////

  • If you are using a single image on all cores and the logger's buffer is in DDR, than yes, the cores are overwriting each other logs. However you are setting the numCores parameter, so each core will be using a different portion of the buffer.

    Where is the Logger's object at? You can look in ROV to determine its location. If the object is in DDR and at the same location for all cores, you have a problem. The object must be moved into non-shared memory.

    Todd

  • Thank you for your reply Todd.

    I have checked that logger instances are located on local memory. So no problem. But do all other logger instances need to be created with the same configuration? I mean numCores set to 8?

    I observed that ROV shows instances of "Load Logger", "Main Loger" and "Sync Logger". According to the manual there must also be "Sysbios Logger". When I set

    LoggingSetup.sysbiosTaskLogging = true;

    ıt creates "SYSBIOS System Logger" automatically. But when I create one myself and set it (see below), application aborts.

    // create sysbios logger

    var loggerCircBufParams4 = newLoggerCircBuf.Params();

    loggerCircBufParams4.transferBufSize = 2048;

    loggerCircBufParams4.numCores = 8;

    // must also place memory section via Program.sectMap

    loggerCircBufParams4.bufSection =".loggerCircBuffer";

    // set sysbios logger

    var sysbiosLogger = LoggerCircBuf.create(loggerCircBufParams4);

    sysbiosLogger.instance.name = "SYSBIOS System Logger";

     

    LoggingSetup.sysbiosLogger = sysbiosLogger;

     

    // and I create other loggers like this sysbios logger.

  • Hi Murat,

    Yes, all the cores must have numCores set to 8.

    Where does the app abort at when you create and supply the logger? Note: the 8 cores will all get 1/8 of the 2048 buffer that will be defined in ".loggerCircBuffer"

    Todd

  • Hi Todd,

    Sorry I'm sorry for late response. I tried two things:

    First I placed log buffers in L2. After application starts some of the cores abort giving "assertion failure: A_regionInvalid: Region is invalid". And one core gives exception dumping core's register values. I don't know how to use it to find out where exception occurs. But I can see instances of LogerCircBuffers and messages at ROV.

    Second I tried placing log buffers in DDR. I'm specifying numCores=8 when creating loggers. Application does not crash but it does not work functionally either.

    If I remove everything related to UIA from my code, (no loggers, no log statements) application works correctly. I think some kind of corruption happens when I add UIA. So the situation is hard to explain. But if you have any comments or advise while developing single-image muticore application I would like to know.

    Thanks,

    Murat.