Difference between revisions of "J-Trace"

From SEGGER Wiki
Jump to: navigation, search
(J-Trace Pro)
(Trouble shooting)
(17 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
* Remove all articles that are not required anymore.
 
* Remove all articles that are not required anymore.
 
--->
 
--->
'''<span style="color:#FF0000">THIS ARTICLE IS STILL IN PROGRESS</span>'''<br>
 
 
[https://www.segger.com/products/debug-probes/j-trace/ J-Trace] is a SEGGER debug and trace probe, specialized on live instruction tracing.
 
[https://www.segger.com/products/debug-probes/j-trace/ J-Trace] is a SEGGER debug and trace probe, specialized on live instruction tracing.
   
Line 24: Line 23:
 
** [[ETB]]
 
** [[ETB]]
 
** [[TMC]]
 
** [[TMC]]
* [https://www.segger.com/products/debug-probes/j-trace/technology/setting-up-trace/ Arm trace specification and timings]
 
   
 
== Available Trace features ==
 
== Available Trace features ==
Line 41: Line 39:
 
* [https://www.segger.com/products/debug-probes/j-trace/technology/real-time-code-coverage/ Live code coverage] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/code-coverage/ --->
 
* [https://www.segger.com/products/debug-probes/j-trace/technology/real-time-code-coverage/ Live code coverage] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/code-coverage/ --->
 
* [https://www.segger.com/products/debug-probes/j-trace/technology/real-time-profiling/ Live code profiling] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/code-profiling/ --->
 
* [https://www.segger.com/products/debug-probes/j-trace/technology/real-time-profiling/ Live code profiling] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/code-profiling/ --->
  +
* [[Backtrace]]
* Backtrace - Gap less instruction "time machine": When the target is halted all the recorded data will be read from the recording buffer. Currently this buffer is limited to the J-Trace memory (64 MB). Unlimited (host side buffering) is coming soon.
 
 
* [[J-Link_Command_Strings#TraceFile | Trace to file]]
 
* [[J-Link_Command_Strings#TraceFile | Trace to file]]
 
* [[Automated_Tests_with_Ozone#Trace_example | Trace automation with Ozone]]
 
* [[Automated_Tests_with_Ozone#Trace_example | Trace automation with Ozone]]
* [[J-Trace vs. J-Trace_PRO]]
 
   
 
== Tested devices ==
 
== Tested devices ==
The [https://www.segger.com/products/debug-probes/j-trace/technology/tested-devices/ tested devices page on the SEGGER homepage] contains a variety of different devices, trace support has been tested with.
+
The [https://www.segger.com/products/debug-probes/j-trace/technology/tested-devices/ tested devices page on the SEGGER homepage] contains a variety of different devices, that trace support has been tested with.
 
For these devices example projects are available, including J-Link script files containing the required (pin) init.
 
For these devices example projects are available, including J-Link script files containing the required (pin) init.
 
This is usually the best starting point if you want to trace a device, as it provides an out of the box experience.
 
This is usually the best starting point if you want to trace a device, as it provides an out of the box experience.
Line 56: Line 53:
 
== Setting up Trace with J-Trace ==
 
== Setting up Trace with J-Trace ==
 
<!--- TBD: Compare with https://www.segger.com/products/debug-probes/j-trace/technology/setting-up-trace/ --->
 
<!--- TBD: Compare with https://www.segger.com/products/debug-probes/j-trace/technology/setting-up-trace/ --->
If no example project is available for a specific device, and example project can be request via the [https://www.segger.com/support/technical-support/ official SEGGER Technical support]. Otherwise, support can also be added manually.
+
If no example project is available for a specific device, and example project can be request via the [https://www.segger.com/support/technical-support/ official SEGGER Technical support]. Otherwise, support can also be added manually which is explained below.
   
 
=== Pinout / Trace debug interface ===
 
=== Pinout / Trace debug interface ===
Line 67: Line 64:
   
 
The pins, clocks, etc. required for tracing can be initialized either via the device application, or via a [[J-Link_script_files | J-Link Script file]].
 
The pins, clocks, etc. required for tracing can be initialized either via the device application, or via a [[J-Link_script_files | J-Link Script file]].
Using a J-Link script file is generally recommended, as otherwise the init section of the code will not be traced when initializing trace from the target application.
+
Using a J-Link script file is generally recommended, as otherwise the init section of the code will not be traced when initializing trace from the target application. Another benefit is that by using a J-Link Script file you guarantee that not debug code gets overlooked and accidently stays in your final product code.
 
* [[How_to_configure_JLinkScript_files_to_enable_tracing | Guide how to initialize trace pins via J-Link Script file]].
 
* [[How_to_configure_JLinkScript_files_to_enable_tracing | Guide how to initialize trace pins via J-Link Script file]].
   
Line 80: Line 77:
 
* [[Renesas_e%C2%B2studio#Enabling_Trace| e2Studio]]
 
* [[Renesas_e%C2%B2studio#Enabling_Trace| e2Studio]]
 
* IAR - TBD.
 
* IAR - TBD.
  +
  +
=== Technical specification ===
  +
* [[Arm trace technical specification]]
  +
* [[SiFive Nexus Trace technical specification]]
  +
* [[Trace board design recommendations]]
  +
* [[Debug setup considerations when tracing]]
   
 
== Trouble shooting ==
 
== Trouble shooting ==
Line 85: Line 88:
   
 
=== Trace related ===
 
=== Trace related ===
* [https://www.segger.com/products/debug-probes/j-trace/technology/setting-up-trace/ Adjusting trace timings and general troubleshooting]
+
* [[Adjusting trace timings and general troubleshooting]]
 
* [[Ozone_Debug_and_Trace_with_RAM_Functions | Debug & Trace with RAM Functions / reading into trace cache]]
 
* [[Ozone_Debug_and_Trace_with_RAM_Functions | Debug & Trace with RAM Functions / reading into trace cache]]
 
* [[J-Trace_overflow_error | Handling J-Trace overflow errors]]
 
* [[J-Trace_overflow_error | Handling J-Trace overflow errors]]
  +
* [[Getting_unknown_addresses_in_instruction_trace | Tracing modified code]]
   
 
=== J-Trace Probe / driver related ===
 
=== J-Trace Probe / driver related ===
 
* [[J-Trace_driver_(WinUSB)_is_installed_but_the_driver_could_not_be_started | J-Trace driver issue (driver could not be started)]]
 
* [[J-Trace_driver_(WinUSB)_is_installed_but_the_driver_could_not_be_started | J-Trace driver issue (driver could not be started)]]
 
* [[J-Trace_PRO_Cortex-M | USB driver not found / J-Trace detected as HP printer BIDI]]
 
* [[J-Trace_PRO_Cortex-M | USB driver not found / J-Trace detected as HP printer BIDI]]
  +
  +
=== FAQ ===
  +
* [[J-Trace vs. J-Trace_PRO | Reasons to upgrade your older J-Trace CM model to a J-Trace Pro]]
  +
* [[Setting_up_Ethernet_interface#Setting_up_direct_connection_without_DHCP_to_the_host_PC.27s_Ethernet_interface | How to connect the J-Trace Pro directly via Ethernet to host PC without a router or switch]]

Revision as of 09:02, 7 October 2022

J-Trace is a SEGGER debug and trace probe, specialized on live instruction tracing.

For the full feature set and best performance, it is recommended to use J-Trace in combination with the Ozone debugger.

For purchasing information and technical specification, please refer to the SEGGER homepage

General information about tracing

Available Trace features

Some trace features are only available for the J-Trace Pro series. For more information see below.

J-Link

J-Trace Pro

Tested devices

The tested devices page on the SEGGER homepage contains a variety of different devices, that trace support has been tested with. For these devices example projects are available, including J-Link script files containing the required (pin) init. This is usually the best starting point if you want to trace a device, as it provides an out of the box experience.

Together with the J-Trace Pro, a trace reference board is shipped. For this board, a trace tutorial project is available on the SEGGER homepage.

Setting up Trace with J-Trace

If no example project is available for a specific device, and example project can be request via the official SEGGER Technical support. Otherwise, support can also be added manually which is explained below.

Pinout / Trace debug interface

Usually, devices provide multiple trace pin combinations to use trace with. This also means, that the pins have to be initialized before tracing can work.

The trace pinout (19-pin) used by J-Trace can be used with JTAG and SWD:

The pins, clocks, etc. required for tracing can be initialized either via the device application, or via a J-Link Script file. Using a J-Link script file is generally recommended, as otherwise the init section of the code will not be traced when initializing trace from the target application. Another benefit is that by using a J-Link Script file you guarantee that not debug code gets overlooked and accidently stays in your final product code.

Setting up Trace with Ozone

Setting up Trace with different IDEs

Technical specification

Trouble shooting

In this section multiple trouble shooting articles are referenced.

Trace related

J-Trace Probe / driver related

FAQ