NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
ETMLib Examples
Introduction
[edit]
This article provides the instructions for running the ETM example application on a Cortex A8 processor and the options available to excercise the different capabilities of the ETM library. The Cortex A8 does not provide the ability to trace data values, only instruction and data addresses. There are 6 different tracing options available for selection in the example. These options are enabled or disabled using definitions in the Examples\common\ETMExample.c file that are defined directly before the main function. Some examples are dependent on the configuration of previous examples to operate correctly, make sure to read the comments in the source code for dependencies. The provided executable in the Examples\bin directory has all options enabled.
- Trace All - trace all instruction and data addresses
- Start/End Trace - trace instruction and data addresses from the provided instruction starting address to the beginning of the instruction ending address
- Instruction Range - trace instruction and data addresses from the provided low and high instruction addresses
- Instruction Range without Data - trace only instruction addresses from the previous instruction range configuration
- Instruction Range with Specific Data Address
- Data Range - trace data addresses from the provided low and high address values, this is dependent on instruction trace enabled during the specified range
Requirements
[edit]
- The project files for the libraries and examples are provided in the CCSv4 format. The library and example was imported and tested with CCSv5.1.0.09.
- XDS560v2 System Trace connected to an EVMTCI6614 target
- Latest Examples_X.X.zip, provided from Gforge site. Extract the zip file to \cToolsLib directory.
- c:\temp directory must be created if it doesn't already exist.
Instructions
[edit]
- Start CCS and launch the target configuration for the EVMTCI6614.
- From the debug window, highlight the C66xx_1 core, right click and select "Connect Target"
- From the menu, select Tools->GEL Files
- From the GEL Files window, highlight the GEL Files option, then load the evmc6614lxe_v0.5 gel file. The option is also available to load the GEL file automatically from the Target Configuration file.
- From the menu, select Scripts->EVMTCI6614LXE MENU->Set_Pll1_983_MHz
- From the menu, select Scripts->EVMTCI6614LXE MENU->InitDDR3_64b_1333
- From the debug window, highlight the CortxA8 core, right click and select "Connect Target".
- From the menu, select Run->Load->Load Program...
- Browse to location cToolsLib\Examples\bin and select the file etm_csetb_d_A8.tci6614.out to load.
- Run/Resume(F8) the example. Note: While the example runs, trace data is stored to the ETB. The data will get transferred using CIO to c:\temp\ETM_etbdata.bin.
- Status will be provided in the console window.
Results
[edit]
To see the ETM results in a CCS Trace Display window:
- Open a command window at <CCS install dir>\ccs_base\emulation\analysis\bin and execute the following: >bin2tdf -bin c:\temp\ETM_etbdata.bin -app CToolsLib\Examples\bin\etm_csetb_d_A8.tci6614.out -sirev 3 -rcvr ETB -dcmfile c:\temp\ETM_etbdata.dcm -procid cortexa8 -sourcepaths CToolsLib\Examples\TCI6614\ETM_CSETB_Ex_A8 -output c:\temp\etmTraceEx.tdf
- In CCS select Tools->Trace Analyzer->Open Trace File in New View...
- Select file etmTraceEx.tdf from c:\temp
- The Trace Display window will show the results, right click on one of the column headings to select the desired additional Column Settings such as Function, Source, Disassembly, Read Address, and Write Address (Hex Number display format selected).
-