*************************************************************

Copyright (c) 2010-2012 Texas Instruments Inc. (www.ti.com)

All rights reserved.

Last updated: April 9, 2012

Description: This document navigates through all the CToolsLib contents and usage of the

ETBLib, DSPTraceLib, AETLib, STMLib, CPTLib, and PMICMILib.

*************************************************************

 

Except where noted all projects are CCSv4 and can be easily converted to CCSv5 during import.

 

ETBLib:

ETBLib provides an application interface to program and drain the Embedded Trace Buffer (ETB). There are two kinds of ETB in TI devices, CSETB and TIETB. The ETBLib contains CCSv4 projects in the ETBLib/project directory specifying the supported devices and rules to pickup specific files and flags for different devices.

 

New for C66xx and TCI66xx devices: EDMA draining to system memory for TI-ETB expansion. Note that this capability is supported for all c66xx devices except for C6657.

 

Docs

ETBLib/doc/html

 

API

ETBLib/include/ETBInterface.h

 

Sources

ETBLib/src/ti (for TI ETB)

ETBLib/src/coresight (for CS ETB)

 

 

Projects

TCI6488 - ETBLib/project/TCI6488

TCI6484 - ETBLib/project/TCI6484

C66xx - ETBLib/project/C66xx

C6678 - ETBLib/project/C6678

TCI6614 - ETBLib/project/TCI6614

C6A816x - ETBLib/project/C6A816x (Formerly TI816x)

OMAP-A9 – ETBLib/project/OMAP-A9

OMAP-A15 - ETBLib/project/OMAP-A15

 

Libraries

ETBLib/lib

 

If you do not plan to use the CCSV4/5 project to build these libraries, you need to use the following information in your non-CCSv4 makefile

 

TCI6486 - \ETBLib\src\coresight\CSETB.c, preprocessor flag TCI6486 (Do not use TIETB.c)

TCI6488 - \ETBLib\src\coresight\CSETB.c, preprocessor flag TCI6488 (Do not use TIETB.c)

CA6816x - \ETBLib\src\coresight\CSETB.c, preprocessor flag TI816X & ETM,  DSP or STM (Do not use TIETB.c)

TCI6484 - \ETBLib\src\ti\TIETB.c, preprocessor flag TCI6484 (Do not use CSETB.c)

C66xx  - \ETBLib\src\ti\TIETB.c, preprocessor flag C66x and C6670 (Do not use CSETB.c)

C6678  - \ETBLib\src\ti\TIETB.c, preprocessor flag C66x and C6678 (Do not use CSETB.c)

TCI6614  - \ETBLib\src\ti\TIETB.c, preprocessor flag TCI6614 (Do not use CSETB.c)

OMAP - \ETBLib\src\coresight\CSETB.c, preprocessor flag _OMAP & ETM, DSP or STM (Do not use TIETB.c)

 

DSPTraceLib:

DSPTraceLib provides an application interface to program the DSP trace export. The DSPTraceLib contains the CCSv4 projects in the DSPTraceLib/project directory specifying the supported devices and rules to pickup specific files and flags for different devices

 

Docs

DSPTraceLib/doc/html

 

API

DSPTraceLib/include/DSPTraceExport.h

 

Projects

TCI6488 - DSPTraceLib/project/TCI6488

TCI6484 - DSPTraceLib/project/TCI6484

C66xx - DSPTraceLib/project/C66xx 

 

Libraries

DSPTraceLib/lib

 

If you do not plan to use the CCSV4 project to build these libraries, you need to use the following information in your non-CCSv4 makefile

 

TCI6488 - DSPTraceLib/src/DSPTraceExport.c, preprocessor flag TCI6488

TCI6484 - DSPTraceLib/src/DSPTraceExport.c, preprocessor flag TCI6484

C66xx - DSPTraceLib/src/DSPTraceExport.c, preprocessor flag C66x

 

 

AETLib:

AETLib provides an application interface to program the Advanced Event Triggering (AET) module. This interface can be used to program the Trace trigger rules specifying trace start, stop, and ranges, etc.

Implementation of AET does not change from device to device. The single library can be used for different devices.

 

Docs

AET/doc/html

 

API

AET/include/aet.h

 

Libraries

AET/lib

 

 

STMLib:

STMLib provides an application interface for the STM instrumentation. The STMLib contains the CCSv4 projects in the STMLib/projects directory specifying the supported devices and rules to pickup specific files and flags for different devices.

 

Docs

STMLib/doc/html

 

API

STMLib/include/StmLibrary.h

 

Projects

CortexA8 - STMLib/projects/A8

CortexA9 - STMLib/projects/A9

CortextA15 – STMlib/projects/A15

CortexM3 - STMLib/projects/M3

C66xx - STMLib/projects/C66xx

 

Libraries

STMLib/lib

 

If you do not plan to use the CCSV4 project to build these libraries, you need to use the following information in your non-CCSv4 makefile

 

CortexA8 -STMLib/src/StmLibrary.c, preprocessor flag _STM

CortexA9 - STMLib/src/StmLibrary.c, preprocessor flag _STM

CortexM3 - STMLib/src/StmLibrary.c, preprocessor flag _STM

C66xx - STMLib/src/StmLibrary.c, preprocessor flag _STM

 

 

CPTLib:

CPTLib provides an application interface to program the Common Platform Tracers (CPT). CPTLib contains the CCSv4 projects in the CPTLib/projects directory specifying the supported devices and rules to pickup specific files and flags for different devices.

 

Docs

Each device supported has unique CPTLib API documentation (Doxygen) at:

CPTLib/doc/CPT_C6670_html.index.html for both TMS320C6670 and TMS320TCI6616

CPTLib/doc/CPT_C6672_html.index.html for TMS320C6672

CPTLib/doc/CPT_C6674_html.index.html for TMS320C6674

CPTLib/doc/CPT_C6678_html.index.html for TMS320C6678

CPTLib/doc/CPT_TCI6612_html.index.html for TMS320TCI6612

CPTLib/doc/CPT_TCI6614_html.index.html for TMS320TCI6614

CPTLib/doc/CPT_C6657_html.index.html for TMS320C6657

 

 

A helper API is provided that can be used as a library wrapper to setup the supported use cases. Documentation is included in the API header include file at:

CPTLib/src/CPTHelper.h

 

For a CP Tracer detailed description and instructions for running the use case examples see:

http://processors.wiki.ti.com/index.php/Common_Platform_Tracer_Examples

 

API

CPTLib/include/CPTLib.h

 

Sources

CPTLib/src/

 

Projects

C66xx - CTPLib/projects/C66xx for both TMS320C6670 and TMS320TCI6616

Note that TMS320C6672, TMS320C6674, TMS320C6678 versions can be built by modifying the CCSv4 project build properties predefined symbol from _C6670 to _C6672, _C6674, or C6678.

 

Libraries

CPTLib/lib

 

If you do not plan to use CCSV4 project to build this library, you need to use the following information in your non-CCSv4 makefile

 

_C6670 - Predefined symbol required for TMS320C6670 and TMS320TCI6616 builds

_C6672 - Predefined symbol required for TMS320C6672 build

_C6674 - Predefined symbol required for TMS320C6674 build

_C6678 - Predefined symbol required for TMS320C6678 build

_TCI6614 - Predefined symbol required for TMS320TCI6614 build

_TCI6612 - Predefined symbol required for TMS320TCI6612 build

_C6657- Predefined symbol required for TMS320C6657 build

_STM_Logging- Predefined symbol that enables the designed in CPTLib dependency with the STM Library. The STM Library is used to provide logging and metadata transport for the CPTLib. Without the metadata, all CP Tracer data is displayed in its raw format. CPTLib supports both internal logging for CP Tracer state changes and user logging. The user logging support provides a mechanism for users to annotate their CP Tracer data.

 

 

PMICMILib:

PMICMILib provides an application interface for the PMI and CMI instrumentation. It contains the CCSv4 projects in the PMICMILib/projects directory specifying the supported devices and rules to pickup specific files and flags for different devices.

 

Docs

PMICMILib/doc/html

 

API

PMICMILib/include/CMILib.h

PMICMILib/include/PMILib.h

 

Projects

CMI CortexA9 - PMICMILib/projects/CMI_A9

PMI CortexA9 - PMICMILib/projects/PMI_A9

PMICMI CortexA9 - PMICMILib/projects/PMICMI_A9

PMICMI CortexA9 Linux - PMICMILib/projects/PMICMI_A9_Linux

 

Libraries

PMICMILib/lib

 

If you do not plan to use the CCSV4 project to build these libraries, you need to use the following information in your non-CCSv4 makefile

 

_OMAP4430

_CMI – For CMILib and PMICMILib builds

_PMI – For PMILib and PMICMILib builds

_STMLogging – When using STM library

 

Note: The STMLib directory structure must exist to build the PMICMILib.

 

 

Examples:

Examples of using all these libraries together are also posted as part of Examples.zip file (CCSv4 projects)

 

TCI6488

TCI6484

C667x

Note – The DSPTrace, STM Trace and STM Trace with ETB Examples will run on TCI6616, TCI6618 and C6670 devices. There are TCI6614 and C6657 specific CP Tracer libraries and examples because of additional CP Tracer modules in these devices.  There are TCI6614 specific STM-ETB examples in the TCI6614 folder. The TCI6614 examples will also run on TCI6612.

Note: Some projects include ETB and non-ETB Debug and Release versions (non-ETB version requires XDS560v2 System Trace)

 

C6678

Note – The DSPTrace and STM Trace with ETB-EDMA extention Examples will run on C6671, C6672, C6674 and C6678 devices.

Note: Some projects include ETB and non-ETB Debug and Release versions (non-ETB version requires XDS560v2 System Trace)

 

TCI6614

 

C6657

     Note that all C667x DSP Trace and STM Trace examples will work on the C6657 with the exception of the “DSP Trace with ETB and EDMA expansion” examples.

C6A816x

OMAP44xx

 

Prebuilt Example Apps

Examples\bin

 

Instructions to convert and import binary trace data for CC Trace Display:

The BIN2TDF utility converts a binary trace file as exported from the embedded app to the CCS Trace Display readable format (TDF). A TDF file can be imported/loaded in the CCS Trace Display for decode and analysis.

 

BIN2TDF.exe can be found in the CCS_INSTALL/ccsv4/emulation/analysis/bin directory.

 

Examples command line parameters:

 

DSP Trace  

bin2tdf -bin C:/temp/etbdata.bin -app C:/Examples/bin/dsptrace_csetb_d_core0.tci6488.out -procid 64x+ -sirev 3 -rcvr ETB -output C:/Examples/bin/mytrace.tdf -dcmfile C:/temp/dcm.txt'

 

Note that dcm.txt is an empty file unless you are using event trace.

 

 

STM Trace C667x, TCI6616, TCI6614, TCI6612

bin2tdf -bin C:/temp/etbdata.bin -app C66X_0=C:/Examples/bin/stm_d_corepacN.c6670.out -procid stm -sirev 1 -cpuname CSSTM_0 -rcvr ETB -devicekey 0x0009D02F -dcmfile C:/temp/dcm.txt -output C:/Examples/bin/mytrace.tdf

 

Note that C66x_0 is the name of the CPU running the app. 0x0009D02F is the device ID for C667x and TCI6616. 0x0B96202F is the device ID for TCI6614 and TCI6612. 0xB97A02F is the device id for C6657. ETB examples export  etbdata bin and dcm  file  (using CIO for demonstration). Please see examples for specific bin and dcm filenames.

 

 

STM Trace C6A816x A8

bin2tdf -bin C:/temp/etbdata.bin -app CortexA8_0=C:/Examples/bin/ stm_csetb_d_A8.c6a816x.out -procid stm -sirev 1 -cpuname CSSTM_0 -rcvr ETB -devicekey 0x0B81E02F -dcmfile C:/temp/dcm.txt -output C:/Examples/bin/mytrace.tdf'

 

Note that CortexA8_0 is the name of the CPU running the app. 0x0B81E02F is the device ID for C6A816x. etbdata.bin and dcm.txt files are exported by the example application (uses CIO for demonstration)