Get started with Trace
In this topic:
Set up a trace session in winIDEA:
1.Set the operation mode to match your SoC trace hardware.
2.Create a new Analyzer configuration.
3.Choose how the hardware trigger gets configured.
4.Configure the Recorder (when recording starts, how much to keep).
5.(optional) Enable Profiler and Coverage.
6.Start the Analyzer session.
You end up with a running trace session that records program flow, profiling data, or coverage, depending on what you enabled.
This guide covers the practical steps for setting up a trace session in winIDEA, from picking the trace source to starting the recording.
For the concepts behind trace (program flow, data trace, qualifiers, triggers), see Overview.
•winIDEA installed and connected to your target
•Trace Port or On-Chip Trace Buffer available (if not, see No trace hardware)
•Basic familiarity with your SoC trace technology (Trace Port, On-Chip, SFT, SoC, or PCIe). If you are not sure, check Trace Technologies.
Before creating a trace configuration, define which trace source your target provides.
For more information, refer to:
•Configure Arm Cortex-specific settings
•Configure Infineon AURIX-specific settings
•If your SoC has no trace capability at all, skip to No trace hardware)
1. Go to View > Analyzer > Analyzer Configuration > Create New Configuration.
2. In the New Configuration dialog, give the configuration a name and choose what you want from the session:
•Profiler - view results in the Profiler Timeline
•Coverage - inspect which code has executed
•Trace - always on; every analysis is built on top of the recorded trace
If you switch between different setups regularly (for example, one for OS profiling and one for coverage), create a separate configuration for each. Reconfiguring the same one back and forth wastes time and risks losing settings.
The new configuration appears in the Analyzer Configuration list. The Hardware Trigger dialog opens automatically.
The New Configuration dialog asks how the Hardware Trigger should be set up. Pick one:
•Automatic (recommended) - winIDEA configures the trace hardware based on the events you want to profile or the code areas you want coverage on. Use this if you don't know the CPU's trace architecture in detail.
•Trace Wizard - walks you through the most common trigger patterns: trigger on a function call, trigger on a data access, or both.
•Manual - gives you direct access to the trace logic. Use this when Automatic and Wizard don't cover your use case. The dialog layout changes depending on your CPU's trace architecture. Steps are in {doc}Manually Configure Trace Trigger <how-to-Manual-Trace-Configuration>. With Manual Hardware Trigger, you are responsible for configuring the trace logic correctly. An incorrect configuration records nothing.
•Program flow + Instrumentation - records program flow together with instrumentation messages.
• Templates - opens a list of ready-made templates you can pick from and adjust.
The trigger is configured. The Analyzer Configuration dialog closes and your new configuration is active.
The Recorder controls how the BlueBox captures and uploads what the SoC generates. Open it from the gear icon next to your configuration.
1. Set the start mode.
Start mode decides when recording begins:
•Trigger Immediately (default, recommended) - starts recording right away and stops once the BlueBox trace buffer is full. Use this when you want everything from session start.
•On Trigger - keeps overwriting the buffer until a trigger fires, then uploads according to the Trigger position setting. Use this when the activity you care about happens rarely and you don't want the buffer to fill before it occurs.
•Continuous Mode - records continuously and ignores triggers. You stop the SoC manually when the interesting moment happens.
Start mode is not available when the on-chip trace buffer is in use. The on-chip logic replaces the Recorder in that case.
2. Set the other Recorder options
•Recording Size Limit - caps how much data lands in the trace file on the PC. This is separate from the on-chip or BlueBox buffer size. Recording stops when the limit is hit.
•Trigger position - how much history around the trigger to keep. Begin discards everything before the trigger. Center keeps up to half the BlueBox buffer. End keeps all of it.
•Time Stamp Source - BlueBox, On-Chip, or ITM, depending on your architecture.
Full field-by-field detail is in the Recorder.
If you enabled Profiler or Coverage in step 2, configure what they should track before starting the session:
•Profiler Configuration TBD - what to sample and how to display it in the Timeline
•Coverage configuration - which code ranges to measure
With the configuration, trigger, and Recorder in place, start the Analyzer session as described in Start an Analyzer session.
After completing all steps, you have:
•An Analyzer configuration - saved in the project, ready to reuse. You can switch between configurations without reconfiguring from scratch.
•A running trace session - Depending on what you enabled, you can inspect program flow in the Trace window, profiling results in the Timeline, or coverage in the Coverage view.
After starting the session:
•Output window is showing Profiler, Session finished.
•
The trace buffer fill indicator moves as data comes in. See Analyzer Status vbar
When the session ends, the Trace window populates with recorded data.
If the Trace window is empty after the session ends, go to Troubleshooting below.
Output window
•Trace Window - navigate the recorded trace
•Profiler Timeline - interpret profiling data
•Coverage results - see which code ran
This usually means the trigger never fired, or the operation mode doesn't match the hardware.
•Check the trigger: If you used On Trigger start mode, the buffer only uploads after the trigger fires. If the trigger condition never occurred during the session, the buffer stays empty. Switch to Trigger Immediately to confirm the hardware is recording at all.
•Check the operation mode: Go back to step 1 and verify the selected mode matches your board. A mismatch between the configured mode and the actual hardware produces an empty session with no error.
If that doesn't work:
•Reduce the JTAG/trace clock speed in Hardware > SoC Options > SoC
•Confirm your SoC supports the selected mode, see Trace technologies
•Check the Recorder for buffer size limits that may have cut the session short
Start mode is not available when the on-chip trace buffer is in use. The on-chip logic controls when recording starts and stops.
Switch to a BlueBox-based operation mode if you need control over start mode.
Some SoCs have no Trace Port or On-Chip Trace Buffer. In that case, these alternatives work for some use cases:
•Hardware sampling with MegaSampling - System behavior is observed by sampling the target at deterministic intervals
•Emulation adapters - available for some architectures, connecting to a larger, trace-capable SoC package via a pin-count conversion board
•Software Trace Tool (SWAT) - Trace events are generated through software instrumentation, buffered in memory, and transferred off-chip through the debug interface
•Profiler sampling - periodic sampling of variables or program execution through the debug port, useful for statistical analysis
•Software trace via LPD debug interface - available on SoCs like RH850 that support special instrumentation instructions
•Slow Run - steps through the application instead of running it in real time. Not suitable for real-time testing, but workable for small-scale statement coverage
Get started with Trace <getting-started-trace> - concepts and background before you configure anything
•Trace configuration - every field in the configuration dialog
•Recorder - every field in the Recorder
•Trace Wizard - guided trigger setup for common patterns
•Trace Window - how to navigate and interpret recorded trace data