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.

Trace ETB Use Cases Quick Reference

From Texas Instruments Wiki
Jump to: navigation, search

Using Trace with an Embedded Trace Buffer (ETB) Quick Reference[edit]

  • Use the Breakpoint manager to create two trace jobs:
  1. Setup a Trace On job that traces PC and Timing (Not enabling Timing will increase the sample depth)
  2. Setup an End All Trace job that triggers after your bug, in the case of the video example the End All Trace job was set at the end of a "for" loop and set to trigger after the instruction executed 20 times. You can also end trace by hitting a breakpoint or halting execution with CCS.
  • Run your code
  • Trace recording will automatically stop when the End All Trace job is triggered
  • Examine the trace data backwards to find the problem (in CCSv4 Trace Display use the "Load last block of samples" button)
Note: When the End All Trace job triggers it has no effect on the processor's execution state, it will continue to run.

For step-by-step instructions see the Using Trace to Capture Processor Exceptions Quick Reference example.

Using Trace to Capture Processor Exceptions Quick Reference[edit]

  • If you are using an XDS560T use Trace Control to initialize the trace system with a circular buffer (ETBs typically only support Circular buffer mode)
  • Use the Breakpoint manager to create two trace jobs
  1. Setup a Trace On job that traces PC and Timing (Not enabling Timing will increase the sample depth)
  2. Setup an End All Trace job that triggers on execution of the exception vector
  • Run your code
  • Trace recording will automatically stop when the End All Trace job is triggered
  • Examine the trace data backwards to find the code that caused the exception (in CCSv4 Trace Display use the "Load last block of samples" button)
Note: When the End All Trace job triggers it has no effect on the processor's execution state, it will continue to run.

Step-by-step

  1. Launch target configuration
  2. Connect to your target device
  3. Load the application code (or just your symbols)
  4. Through Trace Control (Tools->Trace Control), if using an XDS560T set "Synchronize Trace with target execution", select a 256K buffer, select "Circular buffer", and click the OK button to calibrate and configure the trace system. If using ETB set "Synchronize Trace with target execution" and click the OK button to configure the trace system.
  5. From the Breakpoint window (View->Breakpoints) add a Trace job (from New Breakpoint pull down). Select the Trace Job and right click to bring up the job menu from which you select "Properties...".
  6. From the Properties window select Standard for the "Trace Type", from the "Actions" list select the "Trace On" trigger, and from "What to Trace" check Program Address and Timing.
  7. From the Breakpoint window (View->Breakpoints) add a second Trace job and go to it's "Properties..." window
  8. From the Properties window select Standard for the "Trace Type. From the "Actions" list select the "End All Trace" trigger, for the "Trigger Type" select PC, for the "Location Type" select Point, and set "location" to the symbol of your NMI interrupt vector (this is the exception vector).
  9. Enable the Trace jobs by clicking on the check boxes in the Breakpoints window.
  10. Run the code
  11. DVT will automatically stop recording and display the data once the End All Trace job triggers
  12. You can then work backwards through the data to find how the actual exception occurred

Using Trace to Capture Buffer Corruption Quick Reference[edit]

  • If you are using an XDS560T use Trace Control to initialize the trace system with a circular buffer (ETBs typically only support Circular buffer mode)
  • Use the Breakpoint manager to create two trace jobs
  1. Setup a Trace On job that traces PC and Timing (Not enabling Timing will increase the sample depth)
  2. Setup an End All Trace job utilizing a Data memory trigger on the address of the corrupted memory location, and data value
  • Run your code
  • Trace recording will automatically stop when the End All Trace job is triggered
  • Examine the trace data backwards to find the store instruction that caused the corruption (in CCSv4 Trace Display use the "Load last block of samples" button)
Note: When the End All Trace job triggers it has no effect on the processor's execution state, it will continue to run.

Step-by-step

  1. Launch target configuration
  2. Connect to your target device
  3. Load the application code (or just your symbols)
  4. Through Trace Control (Tools->Trace Control), if using an XDS560T set "Synchronize Trace with target execution", select a 256K buffer, select "Circular buffer", and click the OK button to calibrate and configure the trace system. If using ETB set "Synchronize Trace with target execution" and click the OK button to configure the trace system.
  5. From the Breakpoint window (View->Breakpoints) add a Trace job (from New Breakpoint pull down). Select the Trace Job and right click to bring up the job menu from which you select "Properties...".
  6. From the Properties window, select Standard for the "Trace Type", from the "Actions" list select the "Trace On" trigger, and from "What to Trace" check Program Address and Timing. The click on OK.
  7. From the Breakpoint window (View->Breakpoints) add a second Trace job and go to it's "Properties..." window
  8. From the Properties window select Standard for the "Trace Type. From the "Actions" list select the "End All Trace" trigger, for the "Trigger Type" select "Data Memory", for the "Location Type" select Point, set "location" to the address of the corrupted memory location, leave all Access Widths selected, set "With Data" to yes, set Data Value to the corrupting value, leave the data mask set to all ones and the "Data Size" to 32 bits. Then click on OK.
  9. Enable the Trace jobs by clicking on the check boxes in the Breakpoints window.
  10. Run the code
  11. DVT will automatically stop recording and display the data once the End All Trace job triggers
  12. The last instruction in the trace buffer should be the store instruction that cause the write of the corrupted value to the memory location.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Trace ETB Use Cases Quick Reference here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Trace ETB Use Cases Quick Reference here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Trace ETB Use Cases Quick Reference here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Trace ETB Use Cases Quick Reference here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity