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.

Configuring the properties of (default/generated) SYS/BIOS LoggerBuf Instances

Other Parts Discussed in Thread: SYSBIOS

Hello BIOS experts

Here is my setup:

  • Device: C6424
  • C6000 Code Generation Tools 7.3.2
  • bios_6_33_00_19
  • xdctools_3_23_00_32

Here is a snippet of my CFG:

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

var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');

/*
 * Create and install logger for the whole system
 */
// Log Buffer Size
var LOG_BUF_SIZE = 2048;
// multi-threaded logger
var gateHwiParams = new GateHwi.Params;
gateHwiParams.instance.name = "loggerGate";
var loggerGateHwi = GateHwi.create(gateHwiParams);
LoggerBuf.common$.gate = loggerGateHwi;

var loggerBufParams = new LoggerBuf.Params();
loggerBufParams.bufType = LoggerBuf.BufType_CIRCULAR; // most recent state
//loggerBufParams.bufType = LoggerBuf.BufType_FIXED; // capture initial state
loggerBufParams.numEntries = LOG_BUF_SIZE;
var logger0 = LoggerBuf.create(loggerBufParams);
Defaults.common$.logger = logger0;


var Load = xdc.useModule('ti.sysbios.utils.Load');
var Agent = xdc.useModule('ti.sysbios.rta.Agent');
Agent.sysbiosSwiLogging = true;
Agent.sysbiosHwiLogging = true;
Agent.sysbiosSwiLoggingRuntimeControl = true;
Agent.sysbiosHwiLoggingRuntimeControl = true;

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

  1. When I enable Load and Agent, why is my default logger discarded?
  2. How do I access and configure the size of the other loggers (RTASystemLog, etc)?

Thanks!

  • Hi Ram R,

    I think the problem is that your configuration is doing too much - it is setting a default logger and it is also configuring the RTA Agent.

    The Agent module will create and configure a logger for you, so if you are using that you don't need to create your 'logger0'.

    However, since you are using stop mode only (based on your snippet I don't see any change to the Agent.transport param), you actually shouldn't even need to worry about the Agent module.

    So, I think if you change your config to remove the Agent code but leave the loggerBuf code you should get all the RTA data.

    E.g. you can try removing the code with the strikethrough:

    /*
     * Create and install logger for the whole system
     */
    // Log Buffer Size
    var LOG_BUF_SIZE = 2048;
    // multi-threaded logger
    var gateHwiParams = new GateHwi.Params;
    gateHwiParams.instance.name = "loggerGate";
    var loggerGateHwi = GateHwi.create(gateHwiParams);
    LoggerBuf.common$.gate = loggerGateHwi;

    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.bufType = LoggerBuf.BufType_CIRCULAR; // most recent state
    //loggerBufParams.bufType = LoggerBuf.BufType_FIXED; // capture initial state
    loggerBufParams.numEntries = LOG_BUF_SIZE;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;


    var Load = xdc.useModule('ti.sysbios.utils.Load');
    var Agent = xdc.useModule('ti.sysbios.rta.Agent');
    Agent.sysbiosSwiLogging = true;
    Agent.sysbiosHwiLogging = true;
    Agent.sysbiosSwiLoggingRuntimeControl = true;
    Agent.sysbiosHwiLoggingRuntimeControl = true;

    Also, just to answer your other question, in case you do want to use the Agent:

    Ram R said:
    How do I access and configure the size of the other loggers (RTASystemLog, etc)?

    The RTASystemLog size is created and configured based on the configuration parameters you choose for the Agent module.

    For example, the RTASystemLog's number of entries is computed as follows:

        /* Calculate the number of records based on the requested logger size. */
        sysLogPrms.numEntries = Agent.sysbiosLoggerSize / LoggerBuf.Entry.$sizeof();  // 'sysLogPrms' is passed when creating RTASystemLog


    So, the configuration parameter Agent.sysbiosLoggerSize is used to configure the size of the RTASystemLog.

    Steve