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 ... ]
Configuration settings sourced in ti/uia/sysbios/LoggingSetup.xdc
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
module-wide constants & types
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 of size mainLoggerSize Bytes 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 default circular buffer size of LogSync.defaultSyncLoggerSize Bytes.
  • The Event Upload Mode is configured for UploadMode_JTAGSTOPMODE. This allows events to be uploaded when the target halts via JTAG.
  // 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 come with the UIA product, that provide predefined XDC configuration scripts and C code for use in new projects. These templates provide good examples of how to configure the various modules that are involved in setting up the UIA infrastructure, including the LoggingSetup module. They can also be generated directly by CCS, using the CCS TI Resource Explorer. The following steps show how to use CCSv5.x.x to generate a new project that configures the NDK to provide an Ethernet transport for uploading events from the target to the host. :
  • View / TI Resource Explorer : Opens the TI Resource Explorer.
  • Expand the System Analyzer (UIA Target) section
  • Expand the C6000, C64xx Multicore DSP, and EVMC6472 sections.
  • Expand the Single-core Examples and select Stairstep Ethernet.
  • Import the Stairstep Ethernet example into CCS.
  • Open the configuration file to see how LoggingSetup is configured with the NDK to use Ethernet as a transport for UIA events and commands.
 
enum LoggingSetup.UploadMode

Modes for uploading events to the host

Configuration settings
values of type LoggingSetup.UploadMode
    const LoggingSetup.UploadMode_SIMULATOR;
    // Simulator
    const LoggingSetup.UploadMode_PROBEPOINT;
    // Probepoint
    const LoggingSetup.UploadMode_JTAGSTOPMODE;
    // JTAG Stop Mode
    const LoggingSetup.UploadMode_JTAGRUNMODE;
    // JTAG Run Mode (C6x only)
    const LoggingSetup.UploadMode_NONJTAGTRANSPORT;
    // Non-JTAG transport
    const LoggingSetup.UploadMode_NONJTAG_AND_JTAGSTOPMODE;
    // Non-JTAG transport and JTAG Stop Mode
    const LoggingSetup.UploadMode_STREAMER;
    // LoggerStreamer
    const LoggingSetup.UploadMode_IDLE;
    // Upload in Idle loop
    const LoggingSetup.UploadMode_STREAMER2;
    // LoggerStreamer2
 
VALUES
UploadMode_SIMULATOR — Simulator. Events are uploaded when logged. The target is briefly halted when the event is uploaded. This is equivalent to using UploadMode_PROBEPOINT.
UploadMode_PROBEPOINT — Probepoint. Events are uploaded over JTAG when logged. The target is briefly halted when the event is uploaded. This mode can also be used with a simulator.
UploadMode_JTAGSTOPMODE — Events are uploaded over JTAG when the target halts. This mode can also be used with a simulator.
UploadMode_JTAGRUNMODE — Events are Uploaded over JTAG while the target is running. This mode is supported for C6x devices only.
UploadMode_NONJTAGTRANSPORT — Events are uploaded over the non-JTAG transport specified by the ServiceMgr.transportType parameter while the target is running.
UploadMode_NONJTAG_AND_JTAGSTOPMODE — Events are uploaded over a non-JTAG transport specified by the ServiceMgr.transportType parameter while the target is running. When the target is halted, events are uploaded over JTAG.
UploadMode_STREAMER — Events are logged to a LoggerStreamer logger. The application must manage the buffers sent to the host.
UploadMode_STREAMER2 — Events are logged to LoggerStreamer2 loggers. The application must manage the buffers sent to the host.
UploadMode_IDLE — Events are logged to the LoggerIdle buffer, and uploaded in the idle loop. The user must specify the LoggerIdle.transportType and provide the LoggerIdle.transportFxn.
DETAILS
By default, events are uploaded using the JTAG connection in stop-mode. Events are uploaded over JTAG when the target halts. This mode requires that JTAG connections are supported by the target. If you want to use Ethernet, probe points, a simulator, or some other method for uploading events, you can specify one of those upload methods by configuring the eventUploadMode parameter. For example, you could use the following if you were running a simulator:
  var LoggingSetup =
  xdc.useModule('ti.uia.sysbios.LoggingSetup');
  LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_SIMULATOR;
 
config LoggingSetup.disableMulticoreEventCorrelation  // module-wide

Set to true for single core applications

Configuration settings
LoggingSetup.disableMulticoreEventCorrelation = Bool false;
 
DETAILS
When set to true, the LoggingSetup module will not automatically include 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

Configuration settings
 
DETAILS
See LoggingSetup.UploadMode for a description of the the different event upload modes.
EXAMPLE
This script configures the system to stream events from the target to the host over JTAG while the target is running. (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

Configuration settings
LoggingSetup.loadLogger = ILogger.Handle null;
 
 
config LoggingSetup.loadLoggerSize  // module-wide

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

Configuration settings
LoggingSetup.loadLoggerSize = SizeT 512;
 
 
config LoggingSetup.loadLogging  // module-wide

Enable the Load module event logging

Configuration settings
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

Configuration settings
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 module's events to 'ALWAYS_ON'.
  LoggingSetup.loadLogging = true;
  LoggingSetup.loadLoggingRuntimeControl = false;
 
config LoggingSetup.mainLogger  // module-wide

Logger used for main and non-XDC modules Log events

Configuration settings
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

Configuration settings
LoggingSetup.mainLoggerSize = SizeT 1024;
 
 
config LoggingSetup.mainLogging  // module-wide

Enable main and non-XDC modules event logging

Configuration settings
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.
The table below shows the initial values of the xdc.runtime.Main Diags mask settings, based on mainLogging and mainLoggingRuntimeControl configuration. These settins only apply to Diags masks that have not been set in the application's configuration file. For example, this configuration code would cause xdc.runtime.Main's USER1 Diags mask to be unaffected by the settings of mainLogging and mainLoggingRuntimeControl:
  Diags.setMaskMeta('xdc.runtime.Main', Diags.USER1, Diags.RUNTIME_ON);

Diags Mask Settings for xdc.runtime.Main

mainLoggingRuntimeControl
true false
mainLogging true RUNTIME_ON ALWAYS_ON
false RUNTIME_OFF ALWAYS_OFF
 
config LoggingSetup.mainLoggingRuntimeControl  // module-wide

Specify whether main logging can be enabled / disabled at runtime

Configuration settings
LoggingSetup.mainLoggingRuntimeControl = Bool true;
 
DETAILS
This determines what diags settings are applied to the module's diags mask. If 'false' and mainLogging is true, 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 xdc.runtime.Main events to initially be 'RUNTIME_ON'.
  LoggingSetup.mainLogging = true;
  LoggingSetup.mainLoggingRuntimeControl = true;
 
config LoggingSetup.overflowLoggerSize  // module-wide

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

Configuration settings
LoggingSetup.overflowLoggerSize = SizeT 1024;
 
 
config LoggingSetup.sysbiosHwiLogging  // module-wide

Enable SYSBIOS Hwi and Clock modules' event logging

Configuration settings
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

Configuration settings
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 Hwi module's events to 'ALWAYS_ON'.
  LoggingSetup.sysbiosHwiLogging = true;
  LoggingSetup.sysbiosHwiLoggingRuntimeControl = false;
 
config LoggingSetup.sysbiosLogger  // module-wide

Logger used for SYSBIOS modules Log events

Configuration settings
LoggingSetup.sysbiosLogger = ILogger.Handle null;
 
 
config LoggingSetup.sysbiosLoggerSize  // module-wide

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

Configuration settings
LoggingSetup.sysbiosLoggerSize = SizeT 1024;
 
 
config LoggingSetup.sysbiosSwiLogging  // module-wide

Enable SYSBIOS Swi module's event logging

Configuration settings
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

Configuration settings
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 initialize the Swi module's events to 'RUNTIME_OFF'.
  LoggingSetup.sysbiosSwiLogging = false;
  LoggingSetup.sysbiosSwiLoggingRuntimeControl = true;
 
config LoggingSetup.sysbiosTaskLogging  // module-wide

Enable SYSBIOS Task module's event logging

Configuration settings
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

Configuration settings
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 initialize the Task module's events to 'ALWAYS_ON'.
  LoggingSetup.sysbiosTaskLogging = true;
  LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
generated on Thu, 31 Oct 2013 23:47:49 GMT