Difference between revisions of "J-Trace"
(→Trace related) |
|||
(18 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. |
||
---> |
---> |
||
+ | [https://www.segger.com/products/debug-probes/j-trace/ J-Trace] is a SEGGER debug and trace probe, specialized on live instruction tracing. |
||
− | '''<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 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 | Ozone debugger]]. |
For the full feature set and best performance, it is recommended to use J-Trace in combination with the [[Ozone | Ozone debugger]]. |
||
Line 20: | Line 19: | ||
** [[SWO | SWO / SWV]] |
** [[SWO | SWO / SWV]] |
||
** [[SystemView]] |
** [[SystemView]] |
||
− | * General information about |
+ | * General information about Arm Coresight trace elements: |
** [[ETM]] |
** [[ETM]] |
||
** [[ETB]] |
** [[ETB]] |
||
Line 27: | Line 26: | ||
== Available Trace features == |
== Available Trace features == |
||
+ | Some trace features are only available for the J-Trace Pro series. For more information see below. |
||
+ | |||
=== J-Link === |
=== J-Link === |
||
− | * [[General_information_about_tracing# |
+ | * [[General_information_about_tracing#Trace_Buffer | Buffer trace]] |
− | * [[General_information_about_tracing# |
+ | * [[General_information_about_tracing#PC_sampling | PC Sampling]] |
* [[SWO]] |
* [[SWO]] |
||
+ | * [https://www.segger.com/products/development-tools/systemview/ SystemView] |
||
− | * [[SystemView]] |
||
+ | * [https://www.segger.com/products/debug-probes/j-link/tools/j-scope/ J-Scope] |
||
− | * [[J-Scope]] |
||
− | === J-Trace === |
+ | === J-Trace Pro === |
− | * J-Trace supports all of the features listed [[#J-Link | above]]. |
+ | * J-Trace Pro supports all of the features listed [[#J-Link | above]] and additionally the following. |
* [https://www.segger.com/products/debug-probes/j-trace/technology/streaming-trace/ Realtime/Streaming Trace] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/instruction-trace/ ---> |
* [https://www.segger.com/products/debug-probes/j-trace/technology/streaming-trace/ Realtime/Streaming Trace] <!--- REDUNDANT INFO WITH: https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/instruction-trace/ ---> |
||
* [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/ ---> |
||
Line 42: | Line 43: | ||
* [[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 54: | Line 54: | ||
== 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 65: | Line 65: | ||
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 86: | Line 86: | ||
* [[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]] |
Revision as of 15:26, 20 September 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
- General information about different trace types
- General information about Arm Coresight trace elements:
- Arm trace specification and timings
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
- J-Trace Pro supports all of the features listed above and additionally the following.
- Realtime/Streaming Trace
- Live code coverage
- Live code profiling
- 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.
- Trace to file
- Trace automation with Ozone
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
- Embedded Studio
- KEIL MDK
- e2Studio
- IAR - TBD.
Trouble shooting
In this section multiple trouble shooting articles are referenced.
- Adjusting trace timings and general troubleshooting
- Debug & Trace with RAM Functions / reading into trace cache
- Handling J-Trace overflow errors
- Tracing modified code
- J-Trace driver issue (driver could not be started)
- USB driver not found / J-Trace detected as HP printer BIDI