Hide thumbs Also See for QTRACE:
Table of Contents

Advertisement

Quick Links

QT
- U
M
RACE
SER
ANUAL
Revision 1.29
February 2025

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the QTRACE and is the answer not in the manual?

Questions and answers

Summary of Contents for PDQLogic QTRACE

  • Page 1 RACE ANUAL Revision 1.29 February 2025...
  • Page 2: Table Of Contents

    RIGGER 4.1.1 Trace Snapshot ............................. 32 4.1.2 Trace Point ............................32 4.1.3 Find Calling Function ..........................33 4.1.4 User Configurable triggers ........................33 4.1.4.1 Conditional trigger ............................34 Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 2...
  • Page 3 RACE CONFIGURATION DIALOG 8.1.1 Manufacturer ............................71 8.1.2 Part/Family ............................71 8.1.3 ROM start address ..........................71 8.1.4 ROM size ............................... 72 8.1.5 Trace clock divider ..........................72 Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 3...
  • Page 4 Target Reset ........................... 110 APPENDIX A MANUAL DRIVER INSTALLATION ....................111 APPENDIX B NOSLEEP UTILITY .......................... 113 APPENDIX C EMC COMPLIANCE ........................114 C1 FEDERAL COMMUNICATIONS COMMISSION (FCC) ..................114 Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 4...
  • Page 5 13/01/24 V1.8.0 Function tree highlighting added to function tree view (Section 3.1) 1.28 23/01/24 V1.8.1 Note added to using QTrace with STM32CubeIDE (see Section 14.11) 1.29 13/02/25 V1.8.3 Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 5...
  • Page 6: Overview

    “ With QTrace you don’t need to be a high‐end user with a big budget or wait until you encounter a really nasty bug before deciding to purchase a trace system.”...
  • Page 7 RACE ANUAL A USB 3.0 connection from on the development PC is used to power the QTrace probe and to stream trace data from it. A standalone Windows application, QTrace Analyser, configures the probe then decodes and displays its streamed trace data.
  • Page 8: Supported Target Devices

    (not supplied) Figure 3 Example QTrace hardware connection 1.3 Supported target devices The QTrace probe will support any Cortex M3/M4/M7 based device with ETM that complies with the ARM timing specifications. Currently QTrace Analyser currently supports the following devices: Manufacturer...
  • Page 9: Supported Ides

    Section 1 - Overview RACE ANUAL 1.4 Supported IDEs A number of debugger scripts are supplied with QTrace Analyser to support most common IDEs: Version Tested See Section Atmel Studio V7.0 14.3 Cypress ModusToolbox V1.1 14.5 IAR Embedded Workbench V8.20 14.6...
  • Page 10: Target Connection

    0402 series resistors and ESD diodes are highlighted in yellow. Figure 5 Example trace schematic and PCB signal routing Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 10...
  • Page 11: Front Panel Status Led

    3) Do not force the USB lead connector into the QTrace probe. If it does not mate easily then the USB lead connector may be damaged and the lead should be replaced.
  • Page 12: Fcc

    (2) this device must accept any interference received, including interference that may cause undesired operation. Any changes or modifications to this equipment not expressly approved by PDQLogic Limited may cause harmful interference and void the user's authority to operate this equipment.
  • Page 13: Qtrace Analyser

    ANUAL 2. QTrace Analyser QTrace Analyser is a standalone application that runs on 64-bit Microsoft Windows 7, 8.1, 10 and 11. It interfaces to the QTrace probe via a USB3 connection and configures it for the chosen target device. The analyser then decodes and displays streamed trace data, independently of the IDE.
  • Page 14: Drop-Down Menu And Toolbar

    Reload the ELF specified in the trace configuration Reset Trace Probe Reset the QTrace probe Power Cycle Trace Probe Emulate reconnecting QTrace probe USB lead Import Interrupt Handlers... 5.1.2.1 Define ISRs when vector table is defined in RAM Delete Interrupt Handlers...
  • Page 15: Status Bar

    It is recommended to review sections 3 to 7 to gain an understanding of the available features. To jump straight into using QTrace then go to section 8 and 9 on page 70 and 78 respectively. Copyright © 2018-2025 PDQLogic Ltd.
  • Page 16: Live Coverage

    RACE ANUAL 3. Live Coverage This is the default view for QTrace Analyser and is shown in Figure 9. It is split into 3 resizable windows: 1. Function tree-view 2. Source window showing live code coverage 3. Multi-tabbed Setup/status window Figure 9 Live coverage view 3.1 Function tree-view...
  • Page 17: Live Coverage Source Window

    There is, however, a similar feature in QTrace Analyser which is limited to 64 million consecutive instructions, see Code Capture in section 4.
  • Page 18 Figure 12 Code coverage #2 – Multiple conditionals on separate lines xQueueCreateMutex() called only once (unusual for a typical multi-threaded application) Figure 13 Code coverage #3 - Only 1 mutex created Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 18...
  • Page 19: Code Coverage Pause And Clear

    Because QTrace Analyser does not have access to the JTAG port it cannot flush the buffer and thus there will be latency in execution count updates. This does not result in any trace data being lost however.
  • Page 20: Execution Heat Map

    After clicking on a function implementation, a popup window will show all calls to the function and the number of times for each as shown below: Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 20...
  • Page 21: Smart Function Search

    Figure 17 Smart function search 3.2.6.3 Find function from clipboard When switching between the IDE and QTrace Analyser there is an option to find a function implementation from a name saved on the Clipboard. In the IDE copy the function name of interest to ...
  • Page 22: Find In Files

    20. This view will also show the locations of any WFE/WFI sleep instructions that have been detected by QTrace Analyser. These instructions will cause erratic tracing behaviour because they suspend the trace signals and should be disabled in builds to be traced.
  • Page 23: Code Coverage Reporting

    A report will only be generated when the target CPU is halted. NOTE: If QTrace and associated tools are used as part of a software verification process, PDQLogic Limited cannot be held liable for any direct, indirect or consequential loss resulting from inaccuracies in any generated data.
  • Page 24 The function to execute to automatically generate a report when the target CPU is next halted. Globally clear code coverage values after a report has been automatically generated. Table 7 Code coverage reporting options Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 24...
  • Page 25: Hot Spots

    The trace interface allows a very convenient, low overhead, way of passing debug data from the target application to QTrace Analyser for viewing in a console window. This is achieved in firmware by simply writing to a reserved memory location at 0xe0000000, Port 0 Stimulus Register in the ARM Cortex-M Instrumentation Trace Module (ITM) .
  • Page 26 ITMDebug_Setup() to the end of the trace configuration procedure in the selected debugger script. Note: Any ITM debug support built into the IDE should be disabled when using QTrace.  The ITM console window is shown via the menu option View ITM Console…...
  • Page 27: Itm Console Settings

    Number of lines that the debug window can display Wrap lines when they exceed 256 bytes or discard bytes Select the character which will terminate a line Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 27...
  • Page 28: Debugger Connection

    Table 9 ITM debug settings summary 3.5.2 Debugger Connection A Localhost TCP connection to the debugger is optionally used by QTrace Analyser to allow the setting of real-time breakpoints when a GDB based debugger is used (see section 3.5.2.1) and to extract information about RTOS objects that are only known at run time (see RTOS viewer in section 6).
  • Page 29 IDE. Also, when a breakpoint set in this way is hit, execution cannot be resumed until it is cleared. To avoid this, QTrace Analyser constantly monitors target execution via the debugger TCP connection and if the CPU stops on one of its breakpoints it will automatically remove the breakpoint in the debugger.
  • Page 30: Symbol Viewer

    Symbol View… menu option and is a convenient way of viewing the memory section, address, length and type of an item without needing to locate and search through a map file. Figure 31 Symbol viewer window Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 30...
  • Page 31: General Settings

    RACE ANUAL 3.5.4 General Settings There are a number of QTrace Analyser settings that are accessible from the Settings tab at the bottom of the source window: Figure 32 General settings These settings are persistent and are summarised in the table below:...
  • Page 32: Code Capture

    ANUAL 4. Code Capture QTrace Analyser will continually decode trace data streamed data from the QTrace probe. It maintains a buffer of up to the last 64 million instructions traced and can freeze the buffer at any time. This is referred to as code capture.
  • Page 33: Find Calling Function

    Only one trace point can be defined and, unlike the other four triggers, the trace point: 1. is deleted when it triggers 2. will not be reinstated when QTrace Analyser is restarted 3. does not cause code capture to be disabled when it triggers 4.
  • Page 34: Conditional Trigger

    (either individually or globally). In the example, if the current execution count is 45 and the trigger is enabled, or code capture is globally re-enabled, then the trigger count will be 48 i.e. a difference of 3. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 34...
  • Page 35: Post Trigger

    When a trace configuration is created (see section 8, page 70), a series of code capture triggers is also created for the exception handlers. QTrace Analyser determines the locations of the handlers from the vector table (specified in the trace configuration) and configures triggers to cover all instructions in the handlers.
  • Page 36: Code Capture Views

    4 resizable areas and a collection of controls, see Figure 41 below. The resizable areas are: 1. CPU instruction list view 2. Simple source view 3. Function Timeline 4. Call stack summary Figure 41 Code capture Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 36...
  • Page 37: Cpu Instruction List View

    X-axis are instruction number rather than time but hovering the mouse cursor over any horizontal bar will show a pop-up window detailing the function name and time spent in the function. Figure 42 Code capture timeline Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 37...
  • Page 38 The code highlighted in blue attempted an invalid read and the other two views show the corresponding offending function. Note that the entry below the blue highlighted instruction in the trace record list is the first instruction of the HardFault handler. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 38...
  • Page 39: Timeline Controls

    When tracing a C++ project, fully qualified function names can be very long and require significant space in the timeline function list to display. This can be avoided by selecting the shortened function name option from the drop down list in [6]. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 39...
  • Page 40: Function Filtering

    Figure 49 below. Alternatively, a function can be selected for filtering by clicking on its label in the function list, see Figure 50 below. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 40...
  • Page 41 An example of filtering operating system calls from the timeline can be seen in the 'before' and 'after' views in Figure 52 below. More functions can be added to the list as required. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 41...
  • Page 42: Function Pinning

    Pin Function from the pop-up menu. The function will be moved to the top of the list and will be highlighted in red to indicate it is pinned. It can be unpinned by left clicking and then selecting the Unpin Function menu option. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 42...
  • Page 43: Timeline Function Search

    An overview of the captured trace data can be displayed in the timeline window to get a quick view of which functions in the captured trace have been executed. An example is shown below in the timeline window: Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 43...
  • Page 44: Find Trace Record

    The search criteria are entered in the Find Trace Record dialog which is displayed by clicking the ‘Setup’ button in the Search controls group shown in Figure 57 below: Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 44...
  • Page 45: Go To Source

    To find the trace record that corresponds to previous or next executed source line click the ‘Previous’ or ‘Next’ buttons in the Go to Source control group. This will highlight a new trace record and update the other views accordingly. Figure 59 Source navigation controls Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 45...
  • Page 46: Trace Record Bookmarks

    4.2. Additionally, the context menu has options to copy details of the currently selected trace record, see the highlighted menu items below: Additional copy options Figure 62 Code capture instruction list context menu Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 46...
  • Page 47: Source Navigation

    ‘All of timeline’ can remedy this. Alternatively loading all captured instructions (see item [4] in Figure 46 on page 39) will usually fix this. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 47...
  • Page 48: Profiling

    These views are shown in Figure 66 and Figure 67 respectively. The IRQ handler option shows all interrupt service handlers and is very useful to see at a glance which interrupts are occurring most Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 48...
  • Page 49 (address, length and instruction count). Figure 66 Profiling functions in a source file Figure 67 Profiling Interrupt handlers Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 49...
  • Page 50: Interrupt Handlers

    Once configured, the blocks will generate exception entry/exit events, timestamps and synchronisation frames which are then multiplexed with the main ETM trace data and streamed to the QTrace probe. The frames are decoded by QTrace Analyser and presented as minimum and maximum execution times for all interrupt handlers.
  • Page 51: Manually Specified Vectors

    The manually specified vectors are also used by QTrace Analyser to automatically set the fault exception handlers which it monitors for execution and triggers a code capture if detected, see section 4.1.5.
  • Page 52: Importing Interrupt Handlers

    To avoid manually locating all interrupt handlers when the vector table is defined in RAM, a CSV file can be imported into QTrace Analyser to define handlers in bulk. The first vector is the reset handler which starts at 1. The number of entries can be a subset or all of the interrupt sources as defined in the relevant datasheet.
  • Page 53: Cpu Timing

    This will output a list of vectors and their addresses to the ITM console window which can then be copied and pasted into a CSV file for importing into QTrace Analyser (menu option is shown in Figure 70). The function is triggered in the application e.g. a button press, when it is known that all vectors have been configured.
  • Page 54: Rtos Viewer

     Threads should not be deleted (support will be added in a future release) QTrace has no direct access to the target JTAG interface and so the RTOS viewer requires a TCP connection to the debugger to extract information that is only known at run time. Currently OpenOCD and J-Link debuggers are supported.
  • Page 55: Thread Execution

    The CPU load is defined as the ratio of time spent in all application threads vs. time spent in the Idle thread. It is expressed as a percentage and is calculated every 250ms. Figure 74 Overall CPU loading Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 55...
  • Page 56: Thread Execution History

    The bars show the percentage of time non-idle threads have executed during those intervals. The timeline underneath the load graph shows the threads which have been Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 56...
  • Page 57: Interval Measurements

    When the timeline is zoomed out it can become busy, making it difficult to see what is happening. By turning off the vertical transition lines (check box in Figure 79 above), each execution segment is drawn Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 57...
  • Page 58: Dynamic Thread Statistics

    80%). This is used to compare the high watermark of all stacks (thread and system) and, if breached, will result in a pop-up warning message. The stack usage of the offending thread will also be highlighted in red as shown above. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 58...
  • Page 59 Clicking on the Run Period buttons will select the appropriate entry in the event list and will show the period measurement in the execution timeline: Figure 83 Thread run period measurement Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 59...
  • Page 60: User Data

    All events are time stamped to the resolution of the target processor clock and the event type plus description is shown for every entry. Events that are associated with a thread or FreeRTOS object such C:\Users\Public\PDQLogic\QTraceAnalyser\Firmware\QTrace_Library\RTOSViewer\RTOSViewer.c Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 60...
  • Page 61: Event List Search

    Note that filtering doesn’t prevent event(s) being transmitted by the firmware. To minimise transmitted event data, refer to Table 14, step 5 on page 63. Figure 88 Event filter Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 61...
  • Page 62: General Rtos Viewer Settings

    There are a few minor changes required to a firmware project to support the RTOS viewer. The changes are essentially: 1. Copy five files supplied with QTrace Analyser to the project folder 2. Optionally update the project include path 3. Add two of the copied source files to the project build 4.
  • Page 63 /* start FreeRTOS tracing */ traceSTART(); /* Initialise QTrace RTOS viewer */ osKernelInitialize(); If using VisualGDB refer to the note in ‘Debugger’, Table 13 Enable the RTOS viewer via a checkbox at the bottom left corner of the trace configuration dialog, see Figure 101 on page 70.
  • Page 64: Itm Graphing

    The Cortex-M architecture provides 32 separate ‘ports’ for transferring application specific data to the host debugger or, in this case, QTrace Analyser. The ports are also referred to as stimulus registers and are accessed via reserved memory locations in the range 0xE0000000 – 0xE0000007F. Port 0 is accessed at 0xE0000000, port 1 at 0xE0000004 and so on.
  • Page 65: Zoom And Measure

    1ms intervals. With 10,000 points per cycle and using the default QTrace Analyser circular buffer size of 60,000 points per port, this results in 6 cycles per waveform being displayed, the equivalent of a 1 minute history. The CPU temperature data is read, filtered and transmitted as <time>,<data>...
  • Page 66: Itm Graphing Controls

    The ITM graphs, and the ports they display, are configured in the ‘ITM Display Settings’ dialog, see Figure 96. This is accessed by clicking the ‘Settings…’ button in the main ITM Graphing view. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 66...
  • Page 67: Itm Port Mask

    The default layout is the maximum of 8 graphs, configured as 2 columns of 4 rows. Different formats can be selected from a drop-down list to allow fewer graphs to be shown but with more plot area for each. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 67...
  • Page 68: Points / Line

    The maximum is 100,000 points. 7.4.4 ITM Port Configuration Each user port to be graphed should first be configured in QTrace Analyser. Double clicking the selected ‘ITM stimulus port’ in the ‘ITM Display Settings’ dialog (Figure 96) will display the ‘Port-x Settings’ dialog: Figure 99 ITM user port configuration These settings are used to configure both the graphed waveform and its associated numeric display.
  • Page 69: Configuring Firmware For Itm Graphing

    Section 7 - ITM Graphing RACE ANUAL 7.5 Configuring firmware for ITM graphing QTrace Analyser provides examples of how to configure and write to the ITM user ports in the following source files: C:\Users\Public\PDQLogic\QTraceAnalyser\Firmware\QTrace_Library\ITM\ITMDebug.c/.h C:\Users\Public\PDQLogic\QTraceAnalyser\Firmware\QTrace_Library\ITM\ITMGraphDemo.c/.h The function ITMGraphDemo_Thread() in ITMGraphDemo.c shows examples of writing data to user ports.
  • Page 70: Trace Configuration

    16 Path of the script file used by the debugger to configure target trace 17 Voltage range of the target trace pins 18 Enable FreeRTOS viewer Figure 101 Trace configuration dialog Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 70...
  • Page 71: Manufacturer

    This is a drop-down list of the supported devices for the selected manufacturer. Refer to section 1.3 for the devices currently supported by QTrace Analyser. Each entry in the drop-down list may be a specific device or a range of devices. This is dictated by the device feature set and the interrupt vector sources.
  • Page 72: Rom Size

    Each manufacturer offers different ROM sizes and because the device definition files do not detail every single device, ROM size has to be entered manually. The ROM start address and size are used by QTrace Analyser to determine if an address decoded from trace data is valid.
  • Page 73: Source Paths

    Each entry can be selected as a path relative to the configuration file or an absolute path which is useful for library files. QTrace Analyser will try to locate all source files but occasionally these can’t be found either because they’re not on the file system e.g. library source files, or because there was not enough information in the ELF file.
  • Page 74 Open File dialog file name to the search text box to initiate a Windows search for the file. If the file was found, simply double click on its file path in the Open File dialog and QTrace Analyser will then remove the entry from the missing files list.
  • Page 75: Additional Code Ranges (Elf File Defined)

    Figure 107 Additional code range dialog If an image file is selected then QTrace Analyser will attempt to disassemble it to create a database of instructions to allow QTrace Analyser to decode trace data for the additional code range e.g. instruction size, branch address, etc.
  • Page 76: Trace Configuration Source

    GPIO configuration registers or to the trace hardware registers as this will likely cause tracing to fail. 8.1.17 Trace port voltage The QTrace probe supports two nominal voltage ranges, 1.8V and 3.3V. Refer to Table 3 on page 9 for minimum and maximum voltage levels.
  • Page 77 11.1, item 2 for more details. 3. CPU exceptions can’t be set. Click ‘View’ for an explanation and see section 4.1.5 for more details. Figure 109 Multiple trace configuration issues Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 77...
  • Page 78: Trace Start Sequence

    Before target execution is started, the IDE will run the specified debugger script (section 8.1.16, page 76) to configure the target trace interface. Once this is done, and QTrace Analyser has detected a valid trace data stream, the display will change to that shown in Figure 111. If QTrace Analyser is unable to synchronise with the trace data stream then an error message will be displayed.
  • Page 79 Figure 111 QTrace Analyser configured and ready to trace When the target is commanded to run by the IDE, it will start streaming trace data which QTrace Analyser will decode and display. The CPU speed and coverage in the status bar will be updated to reflect their new values.
  • Page 80: Self Test Mode

    Section 10 - Self Test Mode RACE ANUAL 10. Self Test Mode QTrace Analyser has a self-test mode which allows the QTrace probe to be exercised without a target  processor being connected. It is selected from the Help Self Test menu option.
  • Page 81: Recommendations

    Disable instruction simulation when using a Segger J-Link, see section 14.2. Connect a second screen to display QTrace Analyser so that it can be viewed side by side with the IDE/debugger. Do not place breakpoints on exception handlers. The buffered trace data is several instructions behind the current instruction and a breakpoint will prevent the exception being decoded.
  • Page 82: Pc Specification

    12.1 ETM Decode Rate The key indicator of how QTrace Analyser is performing is the average decode rate. It is displayed as a multiplier next to the ETM data rate in the status bar (see Figure 7 on page 15). This multiplier shows how much faster the trace data is being processed compared with the incoming data rate.
  • Page 83: Troubleshooting

    Try a different USB3 port and USB3 hub, check 'PDQLogic found issue QTrace' is found in device manager No visible trace USB3 communication Power cycle USB3 hub or reboot PC if QTrace probe is activity but trace issue connected directly hardware buffer overflows...
  • Page 84 ‘Firmware’ then start-up code can’t traced. Execution counts Wrong or out-of-date Verify that the specified ELF file is correct and/or turn off in random places ELF file / compiler compiler optimisation optimisations Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 84...
  • Page 85: Re-Sync

    PC peripherals/drivers added. Next, unplug the 20 way trace connector from the target then power cycle the target board, JTAG adapter and QTrace probe and retry. If the problem persists, try running an example project on a demonstrator board to eliminate a target hardware issue.
  • Page 86: Cortex-M7 Based Devices

    M7 devices because of their increased performance. When tracing a Cortex-M7 device, it is recommended that QTrace Analyser is run on a fast PC with 16GB+ RAM and at least 4 CPU cores to ensure it can keep up with the streamed trace data.
  • Page 87: Overflow At Start-Up

    After configuring the target trace interface, a debugger script will run a short section of code in target RAM to allow the QTrace probe to synchronise with the trace data stream. In some scenarios, the probe may not always be synchronised in time for the target Cortex-M7 CPU to begin executing from reset.
  • Page 88: Loss Of Sync On Busfault

    The internal bandwidth of the ITM and DWT functions in the Cortex-M can become a constraint when transmitting significant amounts of data. As a result, the ITM may indicate an overflow and/or QTrace Analyser may lose synchronisation with the incoming ITM data frames.
  • Page 89: Usb Errors

    Figure 120 QTrace probe hard reset 13.4 USB Errors Erratic behaviour with the QTrace probe can be caused by USB communication issues. If underlying errors are detected with the USB link they will be displayed in the status bar as shown below in the...
  • Page 90: Tracing With Common Ides

    Although every IDE performs the same basic functions, each one has a different way of interacting with the target. This section details how to configure the debugger scripts supplied with QTrace Analyser for a number of common IDEs. These scripts eliminate the need for any modifications to target code.
  • Page 91: Atmel Studio 7.0

    14.3 Atmel Studio 7.0 Atmel Studio 7.0 supports the SAM-5x series of ARM Cortex-M based devices from Atmel (now Microchip). A Python based debugger script is supplied with QTrace Analyser for use with SAM-5x devices, see C:\Users\Public\PDQLogic\QTraceAnalyser\Debugger Scripts\Atmel Studio7 Unlike most IDEs, there are no settings required in the GUI. Simply copy the script file to the project debug folder and Atmel Studio will detect its presence and load it.
  • Page 92: Atollic Truestudio For Stm32

    Figure 124 Atollic TrueSTUDIO debug configuration In the ‘Target Software Startup Scripts’ tab, paste the contents of the ST-Link or J-Link debug script file located at C:\Users\Public\PDQLogic\QTraceAnalyser\Debugger Scripts\TrueSTUDIO into the large text box as shown in Figure 125 below. Copyright © 2018-2025 PDQLogic Ltd.
  • Page 93 (as of V9.3). As a result, QTrace Analyser will not detect a target reset and will not automatically clear its internal state, including code coverage.
  • Page 94 Figure 126 Atollic TrueSTUDIO run configuration Apply the settings and close the configuration. Next, create a new ‘Launch Group’ from the menu option Run  Debug Configurations Figure 127 TrueSTUDIO new Launch Group Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 94...
  • Page 95 Add the ST-Link programming utility to the Launch Group: Figure 128 TrueSTUDIO Launch Group add ST-Link Utility Next, add the previously created debug configuration: Figure 129 TrueSTUDIO Launch Group add Debug Configuration Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 95...
  • Page 96 Ctrl+F11 or by clicking the TrueSTUDIO ‘Run’ button: This will start the ST-Link CLI programming utility and when it has finished the debug configuration will be activated to enter debug mode. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 96...
  • Page 97: Cypress Modustoolbox

    14.5 Cypress ModusToolbox The Eclipse based ModusToolbox IDE from Cypress is used to develop applications for the dual-core CY8C63xx Bluetooth based devices. The Cortex-M4 core can be traced using QTrace Analyser (the CM0+ core doesn’t support ETM trace). An application note on using QTrace with the CY8C6347 is available at: www.pdqlogic.com/documents/QTrace-Application-Note-002.pdf...
  • Page 98 Section 14 - Tracing with common IDEs RACE ANUAL Specify Reset_Handler (or the equivalent in your application) as the start-up breakpoint location, see Figure 132 below: Figure 132 ModusToolbox KitProg3 Startup settings Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 98...
  • Page 99 Startup page: "C:\Users\Public\PDQLogic\QTraceAnalyser\Debugger Scripts\ModusToolbox\CY8C6347_JLink.cfg" The start-up breakpoint location should be set to Reset_Handler (or the equivalent in your application), see below: Figure 133 ModusToolbox J-Link Startup settings Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 99...
  • Page 100: Iar Embedded Workbench

    (see section 14.1 on page 90) and to un-tick the ‘Run to’ check box. The dialog for  these settings is displayed by selecting the Project Options menu option. Figure 134 IAR Embedded Workbench specify debugger script path Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 100...
  • Page 101: Keil Mdk

    The second step is to ensure SWO tracing is disabled in the Target Driver Setup dialog, accessed by clicking ‘Settings’. Figure 135 Keil MDK specify debugger script path Figure 136 Keil MDK disable SWO trace Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 101...
  • Page 102: Rowley Associates Crossstudio For Arm

    The group of settings to configure are the ‘Reset Script’, ‘Run Script’ and ‘Stop Script’ functions and the ‘Target Script File’ path as shown above. See section 14.1 on page 90 for script paths. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 102...
  • Page 103: Segger Embedded Studio For Arm

    Figure 139 Segger Embedded Studio debugger script settings Note: Make sure there is no XXX_Target.js file included in the project as this will take precedence over the QTrace script file. Also, after entering debug mode and re-programming the target, it may be necessary to press ('Restart' button) in Embedded Studio to ensure trace is initialised.
  • Page 104: St System Workbench

    Next, set the debugger script path as shown in Figure 140 and then configure a break point to be set at the reset handler as shown in Figure 141. See section 14.1 on page 90 for script paths. Figure 140 ST System Workbench debugger script path Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 104...
  • Page 105 Section 14 - Tracing with common IDEs RACE ANUAL Figure 141 ST System Workbench break at reset handler Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 105...
  • Page 106: Stm32Cubeide

    CPU after FLASHing or after it has been reset via the toolbar reset button. Halting at reset gives QTrace Analyser sufficient time to prepare for tracing from the reset vector. Note: Ensure the ‘Resume’ check box is un-ticked. The CPU may still not always halt at the temporary breakpoint when the target reset toolbar button is pressed.
  • Page 107 ~200ms to the application when the debugger is detected. The delay would typically be a C function called from the reset handler assembly code. 2. An application note on using QTrace with STM32CubeIDE is available at: www.pdqlogic.com/documents/QTrace-Application-Note-005.pdf Copyright ©...
  • Page 108: Visualgdb

    "The following additional GDB commands will be executed during start-up AFTER selecting a target which is on the "Additional GDB Commands" tab as shown in Figure 146 below. Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 108...
  • Page 109 Section 14 - Tracing with common IDEs RACE ANUAL Figure 145 VisualGDB J-Link configuration Figure 146 VisualGDB J-Link debugger script Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 109...
  • Page 110: Target Reset

    This will create a new GDB debug session that will initialise the processor and trace normally. The figure below shows the ‘Restart’ button highlighted. Figure 147 VisualGDB Restart Copyright © 2018-2025 PDQLogic Ltd. QTrace User Manual Rev 1.29 Page 110...
  • Page 111: Appendix A Manual Driver Installation

    ANUAL Appendix A Manual driver installation A USB3 driver is included with the QTrace Analyser installation and the installer will request Administrator privileges to do this. If the request fails then this will prevent the driver from being installed and a manual installation process is required.
  • Page 112 1) Connect the QTrace probe to a USB 3.0 port 2) If a Windows update message is displayed then cancel it 3) When no driver is installed, QTrace will be identified as ‘WestBridge’ in the Device Manager: Figure 149 QTrace probe shown as 'WestBridge' Right click on WestBridge and select the option ‘Update Driver Software…’...
  • Page 113: Appendix B Nosleep Utility

    If the source is unavailable e.g. part of a library file, then a command line utility called NoSleep.exe supplied with QTrace Analyser can be used to replace WFE/WFI instructions in an ELF file with NOP instructions.
  • Page 114: Appendix C Emc Compliance

    (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Part 15.21 Any changes or modifications to this equipment not expressly approved by PDQLogic Limited may cause harmful interference and void the user's authority to operate this equipment. Part 15.105 This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules.

Table of Contents