metaonly module ti.uia.sysbios.LoggingSetup

Module to aid in configuring SYSBIOS logging using UIA and System Analyzer

The LoggingSetup module automates the process of configuring an application to use UIA events, and configures SYS/BIOS modules to capture user-specified information such as CPU Load, Task Load and Task Execution so that it can be displayed by System Analyzer. It also automates the creation of infrastructure modules such as loggers, the ServiceManager and RTA modules to enable the capture and upload of the events over a user-specified transport. Both JTAG and Non-JTAG transports are supported. [ more ... ]
XDCscript usage meta-domain sourced in ti/uia/sysbios/LoggingSetup.xdc
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
module-wide constants & types
    values of type LoggingSetup.UploadMode// 
        const LoggingSetup.UploadMode_SIMULATOR;
        const LoggingSetup.UploadMode_PROBEPOINT;
        const LoggingSetup.UploadMode_JTAGSTOPMODE;
        const LoggingSetup.UploadMode_JTAGRUNMODE;
        const LoggingSetup.UploadMode_STREAMER;
        const LoggingSetup.UploadMode_IDLE;
        const LoggingSetup.UploadMode_STREAMER2;
module-wide config parameters
 
DETAILS
The LoggingSetup module automates the process of configuring an application to use UIA events, and configures SYS/BIOS modules to capture user-specified information such as CPU Load, Task Load and Task Execution so that it can be displayed by System Analyzer. It also automates the creation of infrastructure modules such as loggers, the ServiceManager and RTA modules to enable the capture and upload of the events over a user-specified transport. Both JTAG and Non-JTAG transports are supported.
The following configuration script demonstrates the use of the LoggingSetup module in the XDC configuration file for the application:
EXAMPLE
Example 1: Configuring an application to use the default settings provided by LoggingSetup. The following default settings are automatically applied:
  • Logging UIA events from user-provided C code. User provided C code is treated as part of the xdc.runtime.Main module. A circular buffer with a buffer size of 32 KBytes is enabled by default to support this.
  • Event logging is enabled for the SYS/BIOS Load and Task modules in order to allow System Analyzer to display CPU Load, Task Load, and Task Execution information. Logging of SWI and HWI events is disabled by default. In order to optimize event capture and minimize event loss, two loggers are created: one to store events from the SYS/BIOS Load module and the other to store events from other SYS/BIOS modules.
  • Multicore event correlation is enabled by default. This enables the LogSync module and creation of a dedicated logger for sync point events with a circular buffer size of 8 KBytes.
  • The Event Upload Mode is configured for NONJTAG_AND_JTAGSTOPMODE. This allows events to be uploaded in real-time via the Non-JTAG transport specified by the ti.uia.runtime.ServiceManager module, and also be uploaded when the target halts via JTAG. If the ServiceManager module is not used in the application, the transport falls back to JTAGSTOPMODE.
  • An Overflow logger will be automatically created to capture events that occurred while the transport was waiting to upload older events to the host. The logger's circular buffer size is set to 2K Bytes.
  // the Log module provides logging APIs for use by the user's software
  var Log = xdc.useModule('xdc.runtime.Log');
  // the LoggingSetup module's default settings configure much of the UIA infrastructure.
  var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

Example 2: A number of 'template' applications are available that provide predefined XDC configuration scripts and C code for use in new projects. These templates provide good examples of how to configure all of the various modules that are involved in setting up the UIA infrastructure, including the LoggingSetup module. The templates can be downloaded from the System Analyzer Wiki site at
They can also be generated directly by CCS, using the CCS New Project Wizard. The following steps show how to use CCSv5.0.x to generate a new project that configure the NDK to provide an Ethernet transport for uploading events from the target to the host, please perform the following steps in CCS. :
  • File / New / CCS Project : opens the 'New CCS Project' dialog
  • <enter a name for the project>
  • <select the type of project>
  • <accept defaults for Additional Project Settings>
  • <configure the project settings for compiler options, etc.>
  • For Project Templates, expand the UIA and System Analyzer Examples section
  • select evm6472: Stairstep for a single core with UIA to see how to configure the NDK to use Ethernet as a transport for UIA events and commands.
  • select evm6472: MessageQ (single image for all cores) with UIA to see how to create a multicore application that uses the same application software for all cores, and uses IPC to move event data from CPU cores 1-5 to CPU core 0, with CPU core 0 using the NDK for Ethernet communications with the host.

 
enum LoggingSetup.UploadMode
XDCscript usage meta-domain
values of type LoggingSetup.UploadMode
    const LoggingSetup.UploadMode_SIMULATOR;
    const LoggingSetup.UploadMode_PROBEPOINT;
    const LoggingSetup.UploadMode_JTAGSTOPMODE;
    const LoggingSetup.UploadMode_JTAGRUNMODE;
    const LoggingSetup.UploadMode_NONJTAGTRANSPORT;
    const LoggingSetup.UploadMode_NONJTAG_AND_JTAGSTOPMODE;
    const LoggingSetup.UploadMode_STREAMER;
    const LoggingSetup.UploadMode_IDLE;
    const LoggingSetup.UploadMode_STREAMER2;
 
 
config LoggingSetup.disableMulticoreEventCorrelation  // module-wide

Set to true for single core applications

XDCscript usage meta-domain
LoggingSetup.disableMulticoreEventCorrelation = Bool false;
 
DETAILS
When true the LoggingSetup module will not automatically include the the LogSync module. The LogSync module is required in order to enable events from multiple CPU cores to be correlated with each other.
SEE
 
config LoggingSetup.eventUploadMode  // module-wide

Event upload mode

XDCscript usage meta-domain
 
DETAILS
Upload_SIMULATOR: events are uploaded from the simulator at the time the event is logged.
  • Upload_PROBEPOINT: events are uploaded at the time the event is logged. The target is briefly halted while the event is uploaded.
  • Upload_JTAGSTOPMODE: events are uploaded over JTAG when the target halts
  • Upload_JTAGRUNMODE: events are uploaded via JTAG while the target is running.
  • Upload_NONJTAGTRANSPORT: events are uploaded over a non-JTAG transport such as Ethernet. @see RTA for info on how to use the NDK as a transport.
  • Upload_NONJTAG_AND_JTAGSTOPMODE: events are uploaded over a non-JTAG transport. When the target halts (e.g. due to a breakpoint), any events that have not been uploaded yet are uploaded via JTAG.
EXAMPLE
The following is an example of the configuration script used to configure the system to use LoggerCircBuf loggers in order to stream events from the target to the host while the target is running over JTAG. (Note that 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)
  var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
  LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;

     
 
config LoggingSetup.loadLogger  // module-wide

Logger used for the Load module Log events

XDCscript usage meta-domain
LoggingSetup.loadLogger = ILogger.Handle null;
 
 
config LoggingSetup.loadLoggerSize  // module-wide

Size (in MAUs) of logger used for the Load module Log events

XDCscript usage meta-domain
LoggingSetup.loadLoggerSize = SizeT 512;
 
 
config LoggingSetup.loadLogging  // module-wide

Enable the Load module event logging

XDCscript usage meta-domain
LoggingSetup.loadLogging = Bool true;
 
DETAILS
If this is false, the events will be disabled. Otherwise the events will be enabled. Use the loadLoggingRuntimeControl parameter to determine whether the state can be modified during runtime.
 
config LoggingSetup.loadLoggingRuntimeControl  // module-wide

Specify whether load logging can be enabled / disabled at runtime

XDCscript usage meta-domain
LoggingSetup.loadLoggingRuntimeControl = Bool true;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false', the diags bits will be configured as ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the loadLogging parameter to determine whether the event is ON or OFF. For example, the following two lines set the Load modules events to initially be 'ALWAYS_ON'.
  LoggingSetup.loadLogging = true;
  LoggingSetup.loadLoggingRuntimeControl = false;
 
config LoggingSetup.mainLogger  // module-wide

Logger used for main and non-XDC modules Log events

XDCscript usage meta-domain
LoggingSetup.mainLogger = ILogger.Handle null;
 
 
config LoggingSetup.mainLoggerSize  // module-wide

Size (in MAUs) of logger used for the main and non-XDC modules Log events

XDCscript usage meta-domain
LoggingSetup.mainLoggerSize = SizeT 1024;
 
 
config LoggingSetup.mainLogging  // module-wide

Enable main and non-XDC modules event logging

XDCscript usage meta-domain
LoggingSetup.mainLogging = Bool true;
 
DETAILS
If this is false, the events will be disabled. Otherwise the events will be enabled. Use the mainLoggingRuntimeControl parameter to determine whether the state can be modified during runtime.
 
config LoggingSetup.mainLoggingRuntimeControl  // module-wide

Specify whether main logging can be enabled / disabled at runtime

XDCscript usage meta-domain
LoggingSetup.mainLoggingRuntimeControl = Bool true;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false', the diags bits will be configured as ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the mainLogging parameter to determine whether the event is ON or OFF. For example, the following two lines set the Load modules events to initially be 'ALWAYS_ON'.
  LoggingSetup.mainLogging = true;
  LoggingSetup.mainLoggingRuntimeControl = false;
 
config LoggingSetup.overflowLoggerSize  // module-wide

Size of logger used for overflow events when uploadMode is either JTAGRUNMODE or NONJTAG_AND_JTAGSTOPMODE

XDCscript usage meta-domain
LoggingSetup.overflowLoggerSize = SizeT 1024;
 
 
config LoggingSetup.sysbiosHwiLogging  // module-wide

Enable SYSBIOS Hwi and Clock modules' event logging

XDCscript usage meta-domain
LoggingSetup.sysbiosHwiLogging = Bool false;
 
DETAILS
If this is false, the events will be disabled. Otherwise the events will be enabled. Use the sysbiosHwiLoggingRuntimeControl parameter to determine whether the state can be modified during runtime.
 
config LoggingSetup.sysbiosHwiLoggingRuntimeControl  // module-wide

Specify whether Hwi and Clock logging can be enabled / disabled at runtime

XDCscript usage meta-domain
LoggingSetup.sysbiosHwiLoggingRuntimeControl = Bool false;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false', the diags bits will be configured as ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the sysbiosHwiLogging parameter to determine whether the event is ON or OFF. For example, the following two lines set the Load modules events to initially be 'ALWAYS_ON'.
  LoggingSetup.sysbiosHwiLogging = true;
  LoggingSetup.sysbiosHwiLoggingRuntimeControl = false;
 
config LoggingSetup.sysbiosLogger  // module-wide

Logger used for SYSBIOS modules Log events

XDCscript usage meta-domain
LoggingSetup.sysbiosLogger = ILogger.Handle null;
 
 
config LoggingSetup.sysbiosLoggerSize  // module-wide

Size (in MAUs) of the logger used for the SYS/BIOS modules' Log events

XDCscript usage meta-domain
LoggingSetup.sysbiosLoggerSize = SizeT 1024;
 
 
config LoggingSetup.sysbiosSwiLogging  // module-wide

Enable SYSBIOS Swi module's event logging

XDCscript usage meta-domain
LoggingSetup.sysbiosSwiLogging = Bool false;
 
DETAILS
If this is false, the events will be disabled. Otherwise the events will be enabled. Use the sysbiosSwiLoggingRuntimeControl parameter to determine whether the state can be modified during runtime.
 
config LoggingSetup.sysbiosSwiLoggingRuntimeControl  // module-wide

Specify whether Swi logging can be enabled / disabled at runtime

XDCscript usage meta-domain
LoggingSetup.sysbiosSwiLoggingRuntimeControl = Bool false;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false', the diags bits will be configured as ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the sysbiosSwiLogging parameter to determine whether the event is ON or OFF. For example, the following two lines set the Load modules events to initially be 'ALWAYS_ON'.
  LoggingSetup.sysbiosSwiLogging = true;
  LoggingSetup.sysbiosSwiLoggingRuntimeControl = false;
 
config LoggingSetup.sysbiosTaskLogging  // module-wide

Enable SYSBIOS Task module's event logging

XDCscript usage meta-domain
LoggingSetup.sysbiosTaskLogging = Bool true;
 
DETAILS
If this is false, the events will be disabled. Otherwise the events will be enabled. Use the sysbiosTaskLoggingRuntimeControl parameter to determine whether the state can be modified during runtime.
 
config LoggingSetup.sysbiosTaskLoggingRuntimeControl  // module-wide

Specify whether Task logging can be enabled / disabled at runtime

XDCscript usage meta-domain
LoggingSetup.sysbiosTaskLoggingRuntimeControl = Bool true;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false', the diags bits will be configured as ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the sysbiosTaskLogging parameter to determine whether the event is ON or OFF. For example, the following two lines set the Load modules events to initially be 'ALWAYS_ON'.
  LoggingSetup.sysbiosTaskLogging = true;
  LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
generated on Mon, 28 Jan 2013 17:45:50 GMT