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 1: Configuring an application to use the default settings provided
by LoggingSetup. The following default settings are automatically applied:
// 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. :
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 |
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 |
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 |
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;