PDQLogic QTrace User Manual

Hide thumbs Also See for QTrace:
Table of Contents

Advertisement

Quick Links

QT
- U
M
I
RACE
SER
ANUAL
NTRODUCTION
QT
- U
M
RACE
SER
ANUAL
Revision 1.01
August 2018

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 NTRODUCTION RACE ANUAL Revision 1.01 August 2018...
  • Page 2: Table Of Contents

    ECOMMENDATIONS FOR LAYOUT OF RACE IGNALS LED ..........................9 RONT PANEL STATUS 1.10 ..............................9 RECAUTIONS QTRACE ANALYSER OVERVIEW ........................10 ..............................10 NSTALLATION ..........................10 RACE NALYSER LAYOUT 2.2.1 Drop-down menu and toolbar ......................11 2.2.2 Status bar .............................. 12 2.2.2.1...
  • Page 3 ........................34 RACE CONFIGURATION DIALOG 6.1.1 Manufacturer ............................35 6.1.2 Part/Family ............................35 6.1.3 ROM start address ..........................35 6.1.4 ROM size ............................... 36 6.1.5 Trace clock divider ..........................36 6.1.6 C++ project ............................36 6.1.7 Save paths relative to configuration file ....................36 6.1.8 Vector table address ..........................
  • Page 4 Document History Revision Date Changes 1.00 12/07/18 First release 1.01 06/08/18 Finalising trace configuration section added...
  • Page 5: Introduction

    20 way target trace connector. The target JTAG signals connect separately to the users' JTAG adapter. 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, the QTrace Analyser, configures the probe then decodes and displays its streamed trace data.
  • Page 6: Supported Ides

    Figure 1 QTrace block diagram The QTrace system does not control the target JTAG interface and so does not configure target trace hardware directly. Instead, a debug script is run from the IDE to configure the target trace pins and registers.
  • Page 7: System Requirements

    Trace data to clock set-up time Trace data to clock hold-up time EMC compliance EN55024, EN55032 Table 2 QTrace hardware specification Input voltage range is specified in the QTrace Analyser configuration dialog © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 7...
  • Page 8: Target Connection

    B STM32-Eval Demonstrator. The trace signals are highlighted in red and the component outlines of the 0402 series resistors and ESD diodes are highlighted in yellow. Figure 4 Example trace schematic and PCB signal routing © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 8...
  • Page 9: 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 10: Qtrace Analyser Overview

    2. QTrace Analyser Overview The QTrace Analyser is a standalone application that runs on 64-bit Microsoft Windows 7, 8.1 and 10. 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 11: Drop-Down Menu And Toolbar

    Show the trace trouble shooter dialog Self Test Enter self-test mode Report a Problem Send bug report to PDQLogic About… Display software versions and legal notices Table 4 Menu options summary © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 11...
  • Page 12: Status Bar

    2.2.2.1 Taskbar icon As well as the main status bar, the application icon in the Windows Taskbar is also used to convey system status. This is useful when the QTrace Analyser is hidden by another application. The following colours indicate key events:...
  • Page 13: Source Viewer

    The currently selected function in the tree-view is displayed in the source file view. Clicking on a line in the source file view that contains code will show the underlying disassembly in the setup/status view when the ‘Disassembly’ tab is active. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 13...
  • Page 14: Code Coverage

    There is, however, a similar feature in the QTrace Analyser which is limited to 8 million consecutive instructions, see Trace Capture in section 4.
  • Page 15 (unusual for a typical multi-threaded application) Figure 10 Code coverage #3 - Only 1 mutex created Line not yet executed (blocked on line 134 above) Figure 11 Code coverage #4 – Blocked thread © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 15...
  • Page 16: Code Coverage Pause And Clear

    Because the 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 17: Navigating To Function Implementations

    Find in Files… or by pressing Ctrl+Shift+F. The Find-in-Files results will be listed in the ‘Find Results’ page in the setup/status view. Clicking on any entry will display highlighted search text on the line and file where it was found. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 17...
  • Page 18: Find Function From Clipboard

    Search results 3.2.8 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 19: Itm Debugging

    _write() function. This is typically implemented as a stub function in a file usually named syscalls.c. For further details of writing to the ITM debug port, refer to the example C code installed with the QTrace Analyser here: C:\Users\Public\PDQLogic\QTraceAnalyser\Firmware\Examples\ITM ...
  • Page 20 (also sets max. log file size) Path to store time stamped debug logs when the save button is pressed in the debug viewer Table 8 ITM debug settings summary © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 20...
  • Page 21: General Settings

    RACE ANUAL 3.4 General Settings There are a number of QTrace Analyser settings that are accessible from the Settings tab in Settings / Status window in the Source Viewer: Figure 19 General settings These settings are persistent and are summarised below:...
  • Page 22: Trace Capture

    ANUAL 4. Trace Capture The QTrace Analyser will continually decode trace data streamed data from the QTrace probe. It maintains a buffer of the last 8 million instructions traced and can freeze the buffer at any time. This is referred to as trace capture. After the trace buffer has been frozen it can be viewed and analysed while trace data decoding continues as normal.
  • Page 23: Trace Point

    The resizable areas are: 1. CPU instruction list view 2. Simple source view 3. Function Timeline (see Figure 22 on the next page) Figure 21 Trace capture without the timeline shown © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 23...
  • Page 24: Cpu Instruction List View

    It is used to give source context to the trace record. It does not have features that the main source viewer has such as code coverage, loop timing, etc. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 24...
  • Page 25: Function Timeline

    ‘Load prompt’ check box [6] is ticked then there will be a prompt to load more instructions to construct a larger timeline. If it is un-ticked then the timeline will not be updated. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 25...
  • Page 26: Function Pinning

    Figure 26. Figure 26 Measuring function call intervals The trace capture view has several other features which affect all views and are described in the following sections. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 26...
  • Page 27: Find Trace Record

    If the search is successful then the new trace record will be displayed and the other views will be updated accordingly. To repeat the search from the new trace record position, click the ‘Previous’ or ‘Next’ search button. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 27...
  • Page 28: Go To Source

    The instruction list-view has a context menu giving access to most trace capture functions detailed in section 4.2. Additionally, the context menu has options to copy details of the currently selected trace record, see the highlighted menu items below: © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 28...
  • Page 29: Exception Trace Capture

    When a trace configuration is created (see section 6, page 34), a trace capture trigger is also created for the exception handlers. The QTrace Analyser determines the locations of the handlers from the vector table, specified in the trace configuration, and configures a trigger to cover all instructions in the handlers.
  • Page 30: Problems Setting Exception Handler Trigger

    However, if the handlers are not in contiguous memory then the QTrace Analyser will either be unable to set trace capture for exceptions (range > 8K) or it will generate false exception triggers when non-exception handler code is executed that has been placed by the linker in between exception handlers.
  • Page 31: Profiling

    Note that this option is not available if a generic Cortex-M3/M4 device was selected in the trace configuration dialog, see section 6.1.2 on page 35. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 31...
  • Page 32 (address, length and instruction count). Figure 36 Profiling functions in a source file Figure 37 Profiling Interrupt service handlers © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 32...
  • Page 33: Cpu Timing

    1. Pipeline delays are estimated 2. Argument dependant instruction times use an average of min/max execution times 3. Function timing does not include nested calls 4. Timing calculations assume no memory wait states © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 33...
  • Page 34: Trace Configuration

    15 Base address of RAM used by debugger trace configuration script 16 Path of the debugger script file used to configure target trace 17 Voltage range of the target trace pins Figure 39 Trace configuration dialog © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 34...
  • Page 35: Manufacturer

    This is a drop-down list of the supported device manufacturers. Currently ST Microelectronics is supported but this will be updated in subsequent QTrace Analyser releases. There is a ‘Generic’ option to allow devices that aren’t currently supported by the QTrace Analyser to be trialled.
  • Page 36: Rom Size

    The ARM Cortex-M parts allow the vector table to be relocated which is helpful for custom bootloaders. Having the correct vector table address allows the QTrace Analyser to determine the address of interrupt handlers used by the profiling view, see section 5.
  • Page 37: 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. The 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 38 If the file was found, simply double click on its file path in the Open File dialog and the QTrace Analyser will then remove the entry from the missing files list. It will also remove any other missing files that are located in the same folder.
  • Page 39: Additional Code Ranges

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

    GPIO configuration registers or to the trace hardware registers as this will likely cause tracing to fail. 6.1.16 Trace port voltage The QTrace probe supports two nominal voltage ranges, 1.8V and 3.3V. Refer to Table 2 on page 7 for minimum and maximum voltage levels.
  • Page 41 9.1, item 2 for more details. 3. CPU exceptions can’t be set. Click ‘View’ for an explanation and see section 4.3.1 for more details. Figure 47 Multiple trace configuration issues © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 41...
  • Page 42: Trace Start Sequence

    Once this is done, and the QTrace Analyser has detected a valid trace data stream, the display will change to that shown in Figure 49. If the QTrace Analyser is unable to synchronise with the trace data stream then an error message will be displayed.
  • Page 43 Figure 49 QTrace Analyser configured and ready to trace When the target is commanded to run by the IDE, it will start streaming trace data which the QTrace Analyser will decode and display. The CPU speed and coverage in the status bar will be updated to reflect their new values.
  • Page 44: Self Test Mode

    QTrace system although it is recommended that a STM32-Eval board is used if a custom target board is not available as this will showcase all QTrace Analyser features. In self test mode a dedicated trace configuration file is loaded into the QTrace Analyser which configures the trace probe to generate a sequence of trace data which was recorded from a STM32-Eval board running at 180MHz.
  • Page 45: Recommendations

    Disable instruction simulation when using a Segger J-Link, see section 12.3. Connect a second screen to display the 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 46: Pc Specification

    ANUAL 10. PC Specification The specification of the PC on which the QTrace Analyser is running will have a significant impact on the target speed that can be reliably traced. The QTrace Analyser application continuously decompresses and decodes data streamed by the QTrace probe into machine instructions executed by the target. It must do this quickly enough to avoid missing incoming data and with minimal latency to give a responsive UI.
  • Page 47: Troubleshooting

    • Try a different USB3 hub • If the PC was in sleep mode then try rebooting Trace probe not found USB3 Try a different USB3 port and USB3 hub, check 'QTrace' found communications in device manager issue No visible trace activity...
  • Page 48 Perform a project clean and rebuild synchronisation after sync trace was working OK Repeatable loss of ELF file issue or Rebuild ELF file and retry. Send ELF file to PDQLogic for sync. in specific code QTrace Analyser analysis if issue persists areas Trace buffer overflow...
  • Page 49: Tracing With Common Ides

    12. 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 the QTrace Analyser for a number of common IDEs.
  • Page 50: Segger J-Link Instruction Simulation

    J-Link icon when the debugger has been started and then clicking the ‘Open’ option in the Windows Tray area. In the settings window that is then displayed, un-tick the ‘Allow instruction set simulation’ Figure 53 J-Link disable instruction simulation © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 50...
  • Page 51: Atollic Truestudio

    In the text box on the ‘Target Software Startup Scripts’ tab, paste the appropriate debug script file contents, as shown in Figure 55 below (see section 12.1 on page 49 for script paths). © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 51...
  • Page 52 (as of V9.0.0) issue a hard reset and then re-run the debugger script. As a result, the QTrace Analyser will not detect a target reset and will not automatically clear its internal state, including code coverage.
  • Page 53 This will launch ST-Link CLI programming utility and when it has finished the debug configuration will be activated and debugging can begin. For full details of this mode see the TrueSTUDIO user manual section “USING ST-LINK UTILITY INSIDE ATOLLIC TRUESTUDIO”. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 53...
  • Page 54 Figure 57 Atollic TrueSTUDIO launch group example The following figures show how to disable the trace options for both ST-Link and J-Link. Figure 58 Atollic TrueSTUDIO ST-Link trace disabled © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 54...
  • Page 55 Tracing with common IDEs RACE ANUAL Figure 59 Atollic TrueSTUDIO J-Link trace disabled © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 55...
  • Page 56: Iar Embedded Workbench

    (see section 12.1 on page 49) and to un-tick the ‘Run to’ check box. The dialog for  these settings is displayed by selecting the Project Options menu option. Figure 60 IAR Embedded Workbench specify debugger script path © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 56...
  • Page 57: Keil Mdk

    The second step is to ensure SWO tracing is disabled in the Target Driver Setup dialog, accessed by clicking ‘Settings’. Figure 61 Keil MDK specify debugger script path Figure 62 Keil MDK disable SWO trace © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 57...
  • Page 58: Segger Embedded Studio / Rowley Crossworks For Arm

    Figure 64 Segger Embedded Studio debugger script settings Note: After entering debug mode and re-programming the target, it may be necessary to press the 'Restart' toolbar button in Embedded Studio to ensure trace is initialised. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 58...
  • Page 59: St System Workbench

    Next, set the debugger script path as shown in Figure 65 and then configure a break point to be set at the reset handler as shown in Figure 66. See section 12.1 on page 49 for script paths. Figure 65 ST System Workbench debugger script path © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 59...
  • Page 60 Tracing with common IDEs RACE ANUAL Figure 66 ST System Workbench break at reset handler © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 60...
  • Page 61: 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 69 below. © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 61...
  • Page 62 Tracing with common IDEs RACE ANUAL Figure 68 VisualGDB J-Link configuration Figure 69 VisualGDB J-Link debugger script © 2018 PDQLogic Ltd. QTrace User Manual Rev 1.01 Page 62...
  • Page 63: Appendix A Manual Driver Installation

    ANUAL Appendix A Manual driver installation A USB3 driver is installed 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 64 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 71 QTrace probe shown as 'WestBridge' Right click on WestBridge and select the option ‘Update Driver Software…’...
  • Page 65: Appendix B Stm32-Eval Demonstrator

    USB. The application source, project, trace configuration files, the QTrace Analyser installer and a quick start guide are also on the SD card. This allows the QTrace system to be evaluated with no additional hardware or software.
  • Page 66: Appendix C Nosleep Utility

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

Table of Contents