Home

Trace intrastructure getting started

image

Contents

1. amp stm_channels 2 no_stamp 0x76543210ABCDEF89ULL Emit a D64 Timestamped STP message on channel 2 volatile unsigned long long amp stm_channels 2 stamp 0x76543210ABCDEF89ULL Then launch the ARM Cortex A9 debugger 7 2 2 Collect and display trace Before running the application launch the trace viewer treviewer and select the option display unknown raw display to connect to STM Probe and display traces If you start the application before launching the viewer you may lose some trace data Figure 17 Example of trace viewer initialization 2 Select a working directory and or add custom options Press Ctri Space or type to activate auto completion in the options field Open Trace Stream Select Advanced Options Input Descriptors Advanced Working Directory Manual Options Options q display unknown stmprobe novrefdetect Cancel 24 27 DoclD024336 Rev 1 KYI UM1616 How to use trace infrastructure Figure 18 Example of raw trace viewer E Trace Viewer C Documents and Settings assematv trcviewer workspace File Trace Tools Help Trace E console lal Ex A DB Details 1 selected item ih Dictionaries amp Ox IS roject SystemTrace Toolset Trace_Infrastructure_2012 1 bin TraceServer exe In C Project SystemTrace Toolset Trace_Infrastructure_2012 1 bin TraceServer Copyri
2. Cor UM1616 WI life augmented User man ual Trace infrastructure getting started Introduction The trace infrastructure provides a mechanism for capturing decoding and displaying system trace data for SOCs that have embedded heterogeneous cores It provides the user with a complete easy to use trace environment It includes the following features e ensures consistency and homogeneity for all core traces on a SoC e works with any core or platform e can be used to provide trace data for firmware stack applications inter processor exchanges operating systems and so forth The Trace Infrastructure supports STM2 and STM3 IPs associated with STPv1 and STPv2 data protocols respectively It is coupled to the Multi Target Trace API and data protocol March 2013 DoclD024336 Rev 1 1 27 www st com Contents UM1616 Contents 1 Definitions and acronyms e eee eee eee 4 1 1 References anaana aaae 4 2 Trace infrastructure context eee 5 3 Trace infrastructure components 0c eee eee eee 6 3 1 FAR WAN os aaa fect iets tet yin ay ee Gotta einen Ah Scan ee 6 3 2 Software package i 22 y2oxbexchbow BNG oye eRe sew NANANG eye 6 4 Installing the trace infrastructure 0 00 cece eee 7 4 1 System requirements 226 fib sie Phen hed CET KAREENA RAGE Hee 7 4 1 1 Linux environment 0020 e cee tees 7 4 1 2 Windows environment 000 e cece eee eee eee 7 4 2 Hardware i
3. Trace infrastructure components The trace infrastructure consists of both hardware and software components These are available separately Hardware The trace infrastructure is based on the STMicroelectronics system trace capture box called STM Probe To obtain the STM Probe hardware contact ST manufacturing The product order code is STM PROBE It consists of a trace box and associated LVDS cable with documentation Software package The Trace Infrastructure software is available from ST FAEs It is available for Linux host RHEL5 and Fedora14 15 and Windows XP Windows 7 environments it provides e libraries and drivers to enable trace capture e host USB information 1ibusb win32 installer for Windows USB rules files for Linux e adiagnostic program to validate the installation of the STM Probe e atrace server e an MTT decoder and viewer e raw trace decoder and viewer e a documentation portal DocID024336 Rev 1 4 UM1616 Installing the trace infrastructure 4 4 1 4 2 4 Installing the trace infrastructure This chapter provides detailed instructions on how to install the trace infrastructure System requirements Before attempting to install the trace infrastructure make sure that the operating system meets the requirements described in this section Linux environment Supported Linux environments are RHEL5 and Fedora 14 or 15 The trace infrastructure has been validated on
4. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE THE PURCHASER SHALL USE PRODUCTS AT PURCHASER S SOLE RISK EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR AUTOMOTIVE AUTOMOTIVE SAFETY OR MEDICAL INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS PRODUCTS FORMALLY ESCC QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2013 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com ky DoclD024336 Rev 1 27 27
5. 0 00 04 512 XP70 0 00 04 512 XP70 MTT USER Ox0000abcd 5958308 0 00 04 512 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 128 byte s 0 00 04 512 XP70 MTT USER Ox0000abcd 5958309 00 00 04 512 XP70 MTT USER Ox0000abcd Trace message from 5TxP70 0 00 04 512 XP70 MTT USER 0x0000abcd 5958310 10 00 04 512 XP70 MTT RAWE COMPID 0x0000abed TRACEID 0x00400254 10 00 04 512 XP70 MTT USER Ox0000abcd 5958311 0 00 04 512 XP70 MTT USER Ox0000abcd Trace message from STxP70 0 00 04 512 XP70 MTT USER 0x0000abcd 5958312 0 00 04 512 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 0 00 04 512 XP70 MTT USER 0x0000abcd 5958313 0 00 04 512 XP70 MTT USER 0x0000abcd Trace message from STxP70 0 00 04 512 XP70 MTT USER 0x0000abcd 5958314 0 00 04 512 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 0 00 04 512 xP70 MTT USER Ox0000abcd 5958315 XP70 MTT USER Ox0000abcd Trace message from STxP70 XP70 MTT USER 0x0000abcd 512 XP70 MTT RAW COMPID 0 abcd TRAC Ox00400254 0 00 04 512 XP70 MTT USER 0x0000abcd 0 00 04 512 XP70 MTT USER 0x0000abcd Trace message from STxP70 0 00 04 512 XP70 MTT USER Ox0000abcd 5958318 00 00 04 512 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 0 00 04 512 XP70 MTT USER 0x0000abcd 5958319 XP70 MTT USER Ox0000abcd Trace message from 5TxP70 XP70 MTT USER Ox0000abcd 5958320 0 00 04 512 XP70 MTT RAW COMPID 0x0000abed TRACEID 0x00400254 0 00 04 512 XP70 MTT U
6. 14 or 15 run the executable ST_TraceInfrastucture_ lt version gt bin and follow the instructions on the screen To complete the Linux installation the following files delivered in the directory SSTT system drivers must be copied with root privileges Copy STT system drivers 99 stmprobe rules to the directory etc udev rules d Copy STT system drivers blacklist stmprobe to the directory etc modprobe d The USB library v1 0 if required is in SSTT system libusb 1 0 SSST is an environment variable that represents the installation path of the trace infrastructure software On Windows XP or Windows 7 To install the tools on Windows XP or Windows 7 double click on the Windows installer Trace Infrastructure versions exe and follow the instructions on the screen Before completing the installation the Windows installer offers to set up the libusb win32 1 2 5 0 library on your PC The trace infrastructure installer launches the libusb win32 setup wizard To set up the library check the check box Launch filter installer wizard See Figure 2 Figure 2 LibUSB win32 Launch filter installer wizard 16 Setup LibUSB Win32 Completing the LibUSB Win32 Setup Wizard Setup has Finished installing LibU5B Win32 on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup Launch Filter installer wizard 4 DoclD024336 Rev 1 UM1616 Installing the t
7. COMPID 0 P70 MTT USER Ox0000abed XP70 MTT USER 0x0000abcd P70 MTT USER Ox0000abcd XP70 MTTJRA XP70 MTT USER 0x0000abcd XP70 MTT USER 0x0000abcd P70 MTT USER Ox0000abcd V COMPID COMPID 0x0 Trace message From STxP70 5958308 0000abcd TRACEID 0x00 5958309 Trace message from STxP70 5958310 J000abcd TRACEID 0x00400254 5958311 Trace message from STxP70 5958312 0000abcd TRACEID 0x00400254 5958313 Trace message from 5TxP70 5958314 000abcd TRACEID 0x0040 5958315 Trace message from STxP70 5958316 00abcd TRACEID 0 5958317 Trace message from STxP70 5958318 Dabcd TRACEID 0x00400254 5958319 Trace message from STxP70 5958320 cd TRACEID 0x00400254 12 5958321 Trace message from STxP70 5958322 abcd TRACEID 0x0040 254 XP70 MTT USER Ox0000abc 5958323 0 00 00 000 0 00 00 022 0 00 00 044 0 00 00 089 0 00 00 111 0 00 00 134 0 00 00 156 0 00 00 179 0 00 00 201 XP70 MTT USER 0x0000abcd Trace message from STxP70 XP70 MTT USER 0x0000abcd 5958324 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x004002 YD7N MTTHISEDIAvANNN shed CACAI Ex bB E console o Details 1 selected item ih Dictionaries UNKNOWN decoded packets Statistics discarded a UN Timestamp Elapsed Tine barbed 0 00 04 512044945 6 MA 4 CH 194 1 Discarded 1 packets INFO Disconnected from soc
8. Next setup the environment 1 The first step is to setup the ARM Cortex A9 environment 2 Initialize according to the platform all the necessary environment variables needed by ST Micro Connection Package LD LIBRARY PATH lt installation directory gt lib 22 27 DoclD024336 Rev 1 ky UM1616 How to use trace infrastructure Then instrument the application Note The application must initialize the STM and must be instrumented to emit trace over STM Refer to the STM documentation of your board to be able to configure the STM Figure 15 Example page 1 define STM CHANNELS BASE 0x80100000 STM Channel Base Address define STM CONFIG REGS BASE 0x8010F000 STM Configuration Register Base Address static unsigned int volatile PRCM_GPIOCR unsigned int volatile 0x80157138 static unsigned int volatile GPIOO AFSLA unsigned int volatile 0x8000E120 static unsigned int volatile GPIOO AFSLB unsigned int volatile 0x8000E124 Get the STM IP ready to use static unsigned int volatile STM CR unsigned int volatile STM CONFIG REGS BASE static unsigned int volatile STM MMC unsigned int volatile STM CONFIG REGS BASE 0x08 static unsigned int volatile STM TER unsigned int volatile STM CONFIG REGS BASE 0x10 static unsigned int volatile STM TDSR unsigned int volatile STM CONFIG REGS BASE 0x18 static unsigned int volatile STM TFSR unsigned int volatile STM CONFIG RE
9. Rev 1 This parameter shows the FPGA version number The parameter is set by the driver layer Users have no need to change it because the driver and FPGA are delivered in the same package 17 27 Configuration and diagnostics UM1616 Table 5 Debug and test options Name Value by default Description Set this parameter to 1 to generate STP messages from the FPGA without using a target This option can generate a large amount of messages without a break It works only for STPv1 internal FPGA test 0 disabled Use this parameter to select the required debug level The trace infrastructure prints a message only when its level is less than the level set here The permitted values are 0 no log 1 errors only 2 level 1 plus initialization statistics 3 level 2 plus timeout and driver overflow 4 level 3 plus decoded messages this level suffers from degraded performance debug level 1 Set this parameter to print information concerning the BHI veel ee FPGA firmware version and DDR2 version Use this option to activate a dump after an opcode request_dump_on_error 0 disabled error in order to locate the error The output is stored ina dat file 6 2 Executing the diagnostic test program To check if everything has been set up correctly run the diagnostic program Test Stm Probe DLL exe The test is a short example of instrumented code and provides raw di
10. 64 bit host PCs with a 32 bit emulation library 64 bit machines are not supported use the Trace Infrastructure on a 64 bit machine only if the 32 bit emulation library is installed In addition check that the USB library is libusb v1 0 To ensure complete installation tools you need root privileges to copy two files specific rules under specific directories Windows environment Supported Windows environments are Windows XP and Windows 7 The Trace Infrastructure has been validated on Windows XP 32 bit with an X86 architecture Check that the USB library installed on your PC is libusb win32 1 2 5 0 The libusb win32 is a library that enables a user space application to access the USB devices in the Windows operating system For more information visit the project s web site at http sourceforge net apps trac libusb win32 wiki where full documentation can be found If this library has not been installed use the Windows installer to install it You must have administrator privileges to complete this operation Hardware installation The hardware installation can be completed in three steps 1 Connect the STM Probe target to the board 2 Connect the STM Probe to your PC using USB 3 Power up the STM Probe first and then the board DoclD024336 Rev 1 7127 Installing the trace infrastructure UM1616 4 3 4 3 1 4 3 2 8 27 Software installation On Linux hosts To install the tools on Linux RHEL5 or Fedora
11. GS BASE 0x28 typedef volatile struct unsigned long long no_stamp unsigned long long stamp s_stm channel it is up to the calling application to provide a definition for stm channels volatile s stm channel const stm channels s stm channel STM CHANNELS BASE initialize the STM IP GPIO 70 74 GPIOO AFSLA 0x000007C0 GPIOO AFSLB 0x000007C0 PRCM GPIOCR amp 1 lt lt 11 get Modem STM traces out of GPIO 70 74 set cores from 0 to 4 as SW mode initiators STM MMC amp 0x20 set PRCMU as HW mode STM_MMC 0x20 clock divisor we chose XCKDIV 11b for ED XCKDIV 00b for palladium STM_CR 0x000000C0 allow all masters to write onto the STM STM TER 0x01 A9 O amp A9 1 DoclD024336 Rev 1 23 27 4 How to use trace infrastructure UM1616 Figure 16 Example page 2 Emit Trace through STM Emit a D16 STP message on channel 0 volatile unsigned short amp stm_channels 0 no_stamp 0x1234 Emit a D16 timestamped STP message on channel 0 volatile unsigned short amp stm_channels 0 stamp 0x1234 Emit a D32 STP message on channel 1 volatile unsigned int amp stm_channels 1 no_stamp 0x12345678 Emit a D32 timestamped STP message on channel 1 volatile unsigned int amp stm_channels 1 stamp 0x12345678 Emit a D64 STP message on channel 2 volatile unsigned long long
12. M Probe on your PC when the wizard displays the final installation message see Figure 5 Figure 5 LibUSB win32 installation check 1 aw libusb win32 device filter successfully installed for STMicroelectronics br STM Probe usb vid_04b4 amp pid_8613 amp rev_ 001 An alternative method for installing the STM Probe device is to select Filter Wizard in the menu selection as shown in Figure 6 Figure 6 LibUSB win32 installation check 2 J Dia d FileZilla FTP Client P Games J Git B IBM Installation Manager J IBM Rational B IBM Rational ClearCase p LANDesk Management Ji LibUSB Win32 Filter Console Help 45 Uninstall LibUsb Win32 di Class Filter B License P Maintenance p Microsoft Office J Microsoft Office Live Meeting 2007 J Microsoft Silverlight 4 Back 10 27 DoclD024336 Rev 1 ky UM1616 Installing the trace infrastructure To test that the installation was completed successfully select Test Win Program in the Start menu This utility checks that one device have the values idVendor 04B4 and idProduct 8613 See Figure 7 Figure 7 TestLibUsb DLL version 5 0 Driver version Ssg bus device idVendor idProduct bus 0 N libusb0 0001 0x04b4 0 8613 04B4 8613 bLength 18 bDescriptorType Dih bedUSB 0200h bDeviceClass FFh bDeviceSubClass FFh bDeviceProtoco 2 2 Lo iby bodVevice iManufacturer iProduct iSerialNumber bNunConfigurations wTotalLengt
13. SER Ox0000abcd 5958321 0 00 04 512 XP70 MTT USER Ox0000abcd Trace message from STxP70 0 00 04 512 XP70 MTT USER 0x0000abcd 5958322 0 00 04 512 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 0 00 04 512 XP70 MTT USER 0x0000abcd 5958323 XP70 MTT USER 0x0000abcd Trace message from STxP70 XP70 MTT USER Ox0000abed 5958324 2 XP70 MTT RAW COMPID 0x0000abcd TRACEID 0x00400254 128 YD7N MTTH ISEDIMNYANNNahrAT CACAI E console lal Ex A DA Details 1 selected item ik Dictionaries amp Ox 5 ko lal x UNKNOWN decoded packets Statistics discarded a MA 4 CH 194 ma paa e ma MATIN AAAI lt 7 Discarded 1 packets 0 00 04 512044945 0 00 00 000000606 COMPID 0x0000abcd TRACEID 0x00400254 128 bytefs INFO Disconnected from socket server Timestamp Elapsed Time Payload lt gt Filters deactivated TraceServer is running Parsing ostdecoder data 7 2 ARM Cortex A9 example 7 2 1 On ST Ericsson MOP500 HREF500 board This section describes the steps on the MOP500 HREF500 board to collect traces from an application running on ARM Cortex A9 Traces are collected using the STM Probe system trace capture box Environment and application setup Before starting you need to install e the trace infrastructure toolset e an ARM Cortex A9 debugger e ST Micro Connection Package STMicroelectronics recommend that you install the latest available version
14. TM Probe status information On the left panel of the STM Probe the green LED indicates that the USB connection is effective see Figure 8 Figure 8 STM Probe left panel On the right panel of the STM Probe there are three LEDs see Figure 9 e the PRES LED is lit when the power is on e LED 1 is lit while FPGA is loading confirming STP trace input e LED2is lit to indicate I7C activity host program activity Figure 9 STM Probe right panel DoclD024336 Rev 1 13 27 How to initiate trace infrastructure UM1616 5 3 2 Viewing trace The trace infrastructure provides two viewers e araw trace viewer that displays all traces see Figure 10 Figure 10 Raw trace viewer Trace Viewer C Documents and Settings assematv trcviewer workspace File Trace Tools Help Trace E console lal RK AN QE Details 1 selected item ik Dictionaries A 0x S GE E Exec C lProject SystemTracelToolsettTrace Infrastructure 2012 1 bin TraceServer exe Timestamp Elapsed Time Payload In C Project SystemTrace Toolset Trace_Infrastructure_2012 1 bin TraceServer Copyright C 2010 5TMicroelectronics All Rights Reserved TraceServer Trace Infrastructure Tools Trace Server version 4 0 0 is launched Exec C Project SystemTrace Toolset Trace_Infrastructure_2012 1 bin mttdecoder exe T STMF INFO Connected to socket server 164 129 123 90 2284 INFO STMProbe Fo
15. configure in the FPGA which master send messages disable flush sync Set this parameter to 1 to configure the driver to not wait for an ASYNC message following a request to flush except for the first request default channel DEFAULT CHANNEL 10 Use this parameter to set the default channel Trace infrastructure uses the default channel when it has not yet received a channel message ring buffer no runtime o disabled Set this parameter to 1 to configure the driver not to store a runtime message in the ring buffer This means when we do a flush we have no runtime information Name always load FPGA rbf file name Table 4 FPGA and drivers configuration Value by default logplug rbf Description Set this parameter to 1 to load the FPGA every time the driver is initialized irrespective of FPGA version By default the trace infrastructure loads the FPGA only when the version is different than the one it requires This parameter provides the path of the FPGA file The parameter is set by the driver layer Users have no need to change it because the driver and FPGA are delivered in the same package hex file name fx2 hex This parameter provides the path of the hex file The parameter is set by the driver layer Users have no need to change it because the driver and FPGA are delivered in the same package rbf file version 4 RBF FILE VERSION DoclD024336
16. e ep8 read data 0 save ep8 data file name trace ep8 out dat Use this parameter to save all data that have been received from ep8 The trace infrastructure saves the data in the file defined by the save ep8 data file name parameter Use this parameter to define the path of the file where data received from ep8 is to be saved emul ep8 data 0 Use this parameter to load data from the file named by the emul ep8 data file name parameter to ep8 No data is input from the FPGA The trace infrastructure uses the driver layer only emul ep8 data file name trace ep8 in dat Use this parameter to define the path of the file from where data for ep8 is to be loaded 16 27 DoclD024336 Rev 1 ky UM1616 Configuration and diagnostics Table 3 Driver options Name stp_version Value by default STPv1 1 Description Use this parameter to configure the driver and the FPGA with the appropriate protocol Set this to 1 for STPv1 2 for STPv2 disable target check Use this parameter to disable the automatic check to establish if a target is connected at driver initialization nonstop flush 0 disabled Set this parameter to 1 to disable runtime mode and configure the driver to use flush mode continuously In this mode the trace infrastructure does not use a filter and receives all data irrespective of the channel select master Use this parameter to
17. ght C 2010 STMicroelectronics All Rights Reserved TraceServer Trace Infrastructure Tools Trace Server version 4 0 0 is launched Exec C Project SystemTrace Toolset Trace_Infrastructure_2012 1 binlmttdecoder exe T STMF INFO Connected to socket server 164 129 123 90 2284 INFO STMProbe Format INFO STMProbe home undefined using STMP directory TraceServer Connection From Client 127 0 0 1 2286 TraceServer 5TMProbe Box CONNECT STMProbe_id 0 Trace5erver STMProbe Box Target CONNECT TraceServer STMProbe_id 0 TraceServer STMProbe Box flush size changed STMProbe_id 0 INFO Connected to trace server Timestamp Elapsed Time Payload 25 Filters deactivated TraceServer is running Parsing ostdecoder data ky DoclD024336 Rev 1 25 27 Revision history UM1616 8 26 27 Revision history Table 6 Document revision history Date 19 Mar 2013 Revision 1 Initial release Changes DoclD024336 Rev 1 4 UM1616 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the ch
18. h bNumInterf aces bConf igurationValue iConfiguration bmAttributes MaxPower bInterfaceNumber bAlternateSetting bNumEndpoints bInterfaceClass Note Administrator rights are necessary to complete the installation If you do not have these privileges please contact your system administrator to complete the following actions e Install usb win32 library if it is not yet installed on your machine Execute lt TOOLS DIR gt system liusb win32 libusb win32 devel filter 1 2 5 0 exe and follow the instruction on the screen e Copy the STM Probe drivers files Copy lt TOOLS DIR gt system drivers x86 CyUSB inf to c Windows inf Copy lt TOOLS DIR gt system drivers x86 CyUSB sys to c Windows drivers 4 DoclD024336 Rev 1 11 27 How to initiate trace infrastructure UM1616 5 5 1 5 2 12 27 How to initiate trace infrastructure Global context raw trace or MTT instrumented An SoC environment including STM IP in which application code has been instrumented for the MTT libraries can use trace infrastructure The MTT libraries follow MTT API and data protocol definitions and are available in core toolsets such as STxP70 or STLinux Preliminary to capturing trace Before starting to use the trace infrastructure you must ensure the following tasks have been completed e The SoC has been initialized properly especially with regards to system trace emission Specifically this
19. ket server Bi Parsing ostdecoder data gt Filters deactivated O TraceServer is running DociD024336 Rev 1 15 27 Configuration and diagnostics UM1616 6 6 1 ep8 read size 6471024 bulk read on the ep8 unit octet The value must be flush size 1287102471024 Configuration and diagnostics For information relating to the configuration of the test client see Section 6 1 After configuring the test client use the STM Probe diagnostic program provided with the package to discover if it can capture trace data This program is described in Section 6 2 The test displays trace captured from the SoC and permits the capture of raw data provided by trace infrastructure Configuring the test client The default configuration should satisfy the requirements of most use cases However depending upon your target you may have to configure the tool by modifying the Test Stm Probe DLL ini file with target specific parameters The following tables list the parameters that can be modified e for Ep8 configuration flush see Table 2 e for driver options see Table 3 e for FPGA and driver configuration see Table 4 e for debug and test options see Table 5 Table 2 Ep8 configuration flush Name Value by default Description Use this parameter to configure the buffer size for all a multiple of 16 Use this parameter to configure the flush size unit octet The value must be a multiple of 16 sav
20. means that GPIOs are configured to link STM output to the connector see the appropriate SoC reference guide for more details the STM IP is configured to get trace from the application running on a core The main information to be initialized is listed below See the appropriate SoC reference guide for the correct initialization values The addresses listed must be filled with correct values STM CONFIG REGS BASE TM CHANNELS BASE TM CHANNELS BASE 1 TM CHANNELS BASE 3 s s STM CHANNELS BASE 2 s s TM_CR STM_MMC STM_TER STM This is the base address for the configuration register of the STM IP This is the base address of the STM IP Channel corresponding to a CPU Channel corresponding to a CPU Channel corresponding to a CPU STM control register It is recommended for a first test to set the value to 0x1C0 This value corresponds to dividing the STM clock by 16 in order to have no performance issues However another divider can be used STM MIPI modes control register This value corresponds to set the core as SW Mode initiators Trace enable register e The application code has been instrumented in order to emit trace through the STM IP See the appropriate core toolset user manual for more details DoclD024336 Rev 1 3 UM1616 How to initiate trace infrastructure 5 3 5 3 1 4 Capturing and viewing trace Capturing trace The LEDs on the STM Probe panels provide S
21. nstallation 000 cece 7 4 3 Software installation 0c ee 8 4 3 1 On Linux hosts 22 0264 RG eee eed bees eee ie NA ened 8 4 3 2 On Windows XP or Windows 7 0000 0c eee eee ees 8 5 How to initiate trace infrastructure 0000 c eee eee eee 12 5 1 Global context raw trace or MTT instrumented 12 5 2 Preliminary to capturing trace 2 2 a 12 5 3 Capturing and viewing trace 2 2 ee ee 13 5 3 1 Capturing trace 2 0 0 0 2 ee 13 5 3 2 VIEWING trace saa adda cg PAL KAP NAG Rhee eed ea RE ly 14 6 Configuration and diagnostics cece eee eee 16 6 1 Configuring the test client 0 0 c cee ee 16 6 2 Executing the diagnostic test program 0 00 ee 18 7 How to use trace infrastructure 0 000 cece eee 19 7 1 STxP70 example 2 19 7 1 1 On an STiH415 board 0 0 2 2 eee 19 7 1 2 Collect and display trace 0 0 00 cee eee 21 2 27 DoclD024336 Rev 1 ky UM1616 Contents 7 2 ARM Cortex A9 example 2 0000 eee eae 22 7 2 1 On ST Ericsson MOP500 HREF500 board 04 22 7 2 2 Collect and display trace eee 24 8 Revision history 44aa naaa EBA BRBAR AA AAANAAG beaten ee eeeeaes 26 hy DoclD024336 Rev 1 3 27 Definitions and acronyms UM1616 1 Definitions and acronyms This chapter defines abbreviations and acronyms necessary to understand this document or that occur in othe
22. nt variable PATH STMC_DIR bin LD_LIBRARY_PATH STMC_DIR lib Then build your application e Build your application with the STxP70 compiler and link with the STxP70 MTT library Please refer to MTT Library Documentation Finally launch the STxP70 debugger e To connect to debugger you must declare a suitable target in your target ini file Figure 12 shows an example DoclD024336 Rev 1 19 27 How to use trace infrastructure UM1616 Note 20 27 Figure 12 Example target ini file xp70 1pm Rule target type EMU Rule define V4 Section Core Section Common Section Memory Map lpm OwnerParam lt BEGIN gt connect STMC2 retry 2 100 p no reset 1 timeout 3000 no jtag test target_pack STMC2_ IP ADDR b2000stxh415 xp70 lpm no convertor abort 1 silent 1 tck frequency 10000000 targetpack debug jtag stmc pokepeek timeout 10000 module function stm cpt table orly OWNER PARAM END gt Memory Map lpm Rule require EMU amp amp V4 MemoryMap DRAM 0x00000000 0x00002000 rw MemoryMap PRAM 0x00400000 0x00008000 rwx MemoryMap ERAM 0x00800000 0x02000000 rwx MemoryMap ERAM 0xA00000 OxFF600000 rwx The stm cpt_table_orly tokens that appear in the connect command are Python scripts in charge of respectively initializing the STM and the MTT API You must be sure that these two files are in your target pack directory The command line to launch the STxP70 debugger is the following sxgdb targetfile lt y
23. oice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT ST PRODUCTS ARE NOT AUTHORIZED FOR USE IN WEAPONS NOR ARE ST PRODUCTS DESIGNED OR AUTHORIZED FOR USE IN A SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS B AERONAUTIC APPLICATIONS C AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS AND OR D AEROSPACE APPLICATIONS OR ENVIRONMENTS
24. our target ini gt prop connect cmd st config fetch enable on target lt your targets lt your instrumented applications As an example sxgdb targetfile target ini prop connect cmd st config fetch enable on target xp70 lpm exampleMTTAPI out If you use STWorkbench add prop connect cmd st config fetch enable onin the More options field of the debug configuration Debug Configurations gt Tab Debugger gt Main gt More options DoclD024336 Rev 1 ky UM1616 How to use trace infrastructure 7 1 2 Collect and display trace Before running the application launch the trace viewer named trcviewer to connect to STM Probe and display trace data If you start the application before launching the decoder you may lose some trace data E Open Trace Stream Select Input IE Input might be a file a named pipe or a stream emitted by a capture box Buit on nA e Input Descriptors Advanced _ Source P CI Jctu Tests TRACE INFRA TESTS SELA sela_test2 TraceFile bin f Connectto STMPROBE through TraceServer automatic Select the data protocol STMProbe will use as input Options E Pause on startup DociD024336 Rev 1 21 27 a How to use trace infrastructure UM1616 Figure 14 MTT instrumented trace viewer from STxP70 application B Trace Viewer C Documents and Settings assematv trcviewer workspace File Trace Tools Help Trace
25. r key process documents Table 1 Definitions and acronyms Term Definition LVDS Low voltage differential signalling Mb s Megabits per second MB s Megabytes per second Mobile Industry Processor Interface The MIPI Alliance is an open membership organization that includes leading companies in the mobile MIF industry that share the objective of defining and promoting open specifications for interfaces in mobile terminals MTT Multi target trace PTI Parallel trace Interface RHEL Red Hat Enterprise Linux STMC2 ST Micro Connect 2 host target interface SBC Stand by controller STM System trace module STP System trace protocol Messages generated by the software in order to give system or System Trace application level visibility 1 1 References e STM Probe datasheet 8282484 e Multi Target Trace API user manual DocID023121 4 27 DoclD024336 Rev 1 ky UM1616 Trace infrastructure context 2 Trace infrastructure context Figure 1 STM Probe connection Trace Analysis Tools USB connection Serial Relay J Ji i retin STM Probe Reference Board The Trace Infrastructure can be used either as a standalone toolset or interoperating with a core toolset Whatever the context the Trace Infrastructure is closely linked to the SoC including an STM IP a DociD024336 Rev 1 5 27 Trace infrastructure components UM1616 3 3 1 3 2 6 27
26. race infrastructure Click on the Finish button to proceed to the next stage of the operation The filter installer wizard displays the first screen see Figure 3 Figure 3 LibUSB win32 filter installer 1 9 libusb win32 filter installer mn esa Information This program adds removes libusb win32 as a driver to an existing device installation The libusb win32 filter driver allows access to usb devices using the libusb win32 api while maintaining compatibility with software which uses the original driver Install Remove Device Filter s Install a device filter O Remove a device filter O Remove all device filters Select Install a device filter to set up the library If no STM Probe device is proposed in the Device Selection list then the device is already installed Click on Cancel Otherwise select the device with the following hardware identifier vib 04b4 pid 8613 rev 001 and click on the Install button see Figure 4 Figure 4 LibUSB win32 filter installer 2 Device Selection Connect your device and select it from the list of unfiltered devices below If your device isn t listed it may already be filtered be in a driverless state or incompatible with the libusb win32 filter driver Hardware ID Description rid 04b4 pid 86 13 rev 001 STMicroelectronics STM Probe 3 DocID024336 Rev 1 9 27 Installing the trace infrastructure UM1616 You can use the ST
27. rmat INFO STMProbe home undefined using STMP directory TraceServer Connection from Client 127 0 0 1 2286 TraceServer STMProbe Box CONNECT STMProbe_id 0 TraceServer STMProbe Box Target CONNECT TraceServer STMProbe_id 0 TraceServer STMProbe Box Flush size changed STMProbe_id 0 INFO Connected to trace server lt la 25 Filters deactivated Q TraceServer is running Parsing ostdecoder data 14 27 DoclD024336 Rev 1 KYI UM1616 How to initiate trace infrastructure e n MTT trace viewer that displays MTT instrumented trace only refer to the appropriate core toolset user manual for details Figure 11 MTT instrumented trace viewer from STxP70 application I Trace Viewer C Documents and Settings assematv trcviewer workspace File Trace Tools Help Trace 0 00 04 512 2 XP70 MTT RAW XP70 MTT USER 0x0000abcd XP70 MTT USER Dx0000abcd XP70 MTT RAW COMPID 0Ox XP70 MTT USER Ox0000abcd XP70 MTT USER Ox0000abcd XP70 MTT USER 0x0000abcd xP70 COMPID 0x0 XP70 MTT USER Ox0000abcd TIRAWH P70 MTT USER Ox0000abcd Fi R 0x000Dabcd l COMPID 0x XP70 MTT USER OxO000abcd XP70 MTT USER 0x0000abcd XP70 MTT USER Ox0000abcd 0 COMPID 0 XP70 MTT USER 0x0000abcd XP70 MTT USER Ox0000abcd XP70 MTT USER OxO000abed XP70 MTT RA COMPID 0 XP70 MT T USER Ox0000abcd XP70 MTT USER 0x0000abcd 4P70 MTT USER OxO000abed MTT RAW
28. splay of the trace captured 18 27 DoclD024336 Rev 1 ky UM1616 How to use trace infrastructure 7 7 1 4 How to use trace infrastructure STxP70 example On an STiH415 board This section describes the steps required to configure an STiH415 board to collect traces from an application running on the STxP70 core Traces are collected using the STM Probe acquisition box This example is specific to the standby controller SBC The STxP70 application instrumentation is based on the MTT API function Environment and application setup Before starting install the following e the trace infrastructure toolset e the STxP70 toolset version 2012 1 or later for information on how to obtain the toolset contact stxp70 support st com e the ST Micro Connection Package and associated ST TargetPack supporting the STxP70 toolset STMicroelectronics recommend that you install the latest available version of the ST Micro Connection Package Then setup the environment e The first step is to setup the STxP70 toolset environment Please refer to STxP70 toolset documentation Then initialize according to the host platform all the necessary environment variables needed by target pack STMC DIR ST Micro Connection Package installation directory TARGETPACK PATH TARGET PACK installation directory STMC2 IP ADDR STMC2 IP Address STTP XML PATH sttp xml file directory e According to the host platform update your PATH environme

Download Pdf Manuals

image

Related Search

Related Contents

Echo PB-265L User's Manual  Display - Internet  "取扱説明書"  mde thermo - Sport  HydraCat 4.0,4.5 High Performance c. 1991 - Owners  ZTE N799D Quick Start Guide  DOC TECHNIQUE ( 1503 Ko)  be.ez LE Cristal  Conjunto Tampa-Tanque  Brother 7860DW All in One Printer User Manual  

Copyright © All rights reserved.
Failed to retrieve file