CToolsLib
From Texas Instruments Embedded Processors Wiki
Translate this page to
Introduction
See CToolsLib Article for a comprehensive article on cToolsLibs and the hardware modules supported.
Overview
- CToolsLib is collection of embedded target APIs/library focused to enable easy programmatic access to CTools debug capabilities
- CToolsLib purpose is provided in source code for easy integration into applications
- CToolsLib consists of several libraries
AETLib
- The AETLib library provides programmatic access to the Advanced Event Triggering capability on 64x and 64x+ processor cores.
ETBLib
- This library provides the ability to program and read trace data from an Embedded Trace Buffer (ETB). The ETB can be used with other libraries to setup and capture DSP core trace data, ARM core trace data, or STM data sources.
- In some devices each core has a dedicated ETB, while others have a single ETB shared between trace sources.
- After the ETB data is read into local memory, the user must transport the binary trace data back to a host where the binary trace data can be converted to text, csv or a .tdf file that can be imported into CCS for display. The GettingStarted.htm file (available at gForge)provides instructions for generating these files from utilities provided with CCS.
- The Examples projects are also a good source of information on using ETBLib for different cases.
DSPTraceLib
- This library provides the ability to programmaticly setup 64x+ DSP trace export.
STMLib
- This library provides "C" printf and binary APIs for hardware assisted (System Trace software messages) instrumentation in your code. STM messages are captured via an ETB or with an external XDS560v2 System Trace receiver.
- For instructions on setting up CCS to capture STM data see Using System Trace(STM).
CPTLib
- The Common Platform Tracer modules provides profile information via STM messages for critical buses within the device. CPTLib provides low level CP Tracer module setup. The provided use case based helper file combined with CPTLib makes for an easy to use environment. For examples see Common platform Tracer Examples. For debug help see Debugging with Common Platform Tracer.
PMICMILib
- The PMI and CMI units provide power and clock state profiling via STM messages. The PMICMILib provides a common programming and control API for both units. For more details see OMAP4 Power and Clock management Profiling.
Linux Kernel Driver for STM printf
- Linux kernel module device driver enables applications to use MIPI STM as a standard character device driver. Users can redirect output (from printf) to a STM device, or directly write() to the STM device from their application. For details and examples see STM Linux Device Driver.
Documentation
- There is a generated Doxygen API description included with each CToolsLib.
Download
| Library | Purpose | Status |
|---|---|---|
| STMLib | Software Message Library |
Available Now (via GFORGE) |
| AETLib | Software library for programmatically using the 64x+ AET hardware breakpoint and watchpoint units. Also useful for triggering/halting trace. |
Available Now (via GFORGE) |
| ETBLib | Software Library for configuring and retrieving the ETB contents. |
Available Now (via GFORGE) |
| DSPTraceLib | Software Library to configure DSP Trace export |
Available Now (via GFORGE) |
| PMILib | Power management Instrumentation Library |
Available Now (via GFORGE) |
| CMILib | Clock management Instrumentation Library |
Available Now (via GFORGE) |
| SCILib | Statistic Collector Instrumentation Library |
Beta Cycle |
| CPTLib | CP Tracer Instrumetnation Library |
Available Now (via GFORGE) |
Latest ETBLib 1.5, DSPTraceLib 1.5, CPTLib 0.4 and STMLib 3.1 releases have been posted to CToolsLib gforge. This update contains support for new devices and several examples (Examples 3.0) demonstrating library usage. Please refer GettingStarted.htm(gforge) for more details.
Support
Frequent Asked Questions (FAQ)
Q: Can I get the source code?
- A: The source code is included with each library.
Q: How do I know if my device supports CTools?
- A: The datasheet or Technical Reference Manual (TRM) will usually contain details on the features support and avaialble on your device. If you are unsure, you may wish to ask in the support forum.
Q: Do I have to use CToolsLib with Code Composer Studio?
- A: No, other tools such as Lauterbach Trace32 can be used with the CToolsLib. Please contact your tools vendor regarding support.
Q: Do you have approximate cycle counts for each library?
- A: For AETlib there is a file called "aetlib_profiling_stats.txt" that gives this information
- A: For ETBLib, on the TI c6x compiler on a 64x+ device, it takes approximately 1000 cycles per call at the "-o2" optimization level.
Q: Do you have the code size for each library?
- A: For AETlib there is a file called "aetlib_size_stats.txt" that gives this information
- A: For ETBLib, on the TI c6x compiler on a 64x+ device, it is approximately 4KB at the "-o2" optimization level.
Q: What license is this code provided under? / Is the code GPL compatible?
- A: The header files in CToolsLib will have the relevant licenses. Generally, CToolsLib is licnesed under modified BSD license which is GPL compatible. Please see this wikipedia article.
Related
- TI.com XDS560 Product Page
- XDS560v2 System Trace
- CTools
- How OMAP software developers use System Trace to boost performance
- Using System Trace (STM)
- Etblib Example Here
Leave a Comment
