Trace32-ICD使用说明

合集下载

trace32的使用培训

trace32的使用培训

trace32的使⽤培训TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................! ICD In-Circuit Debugger ................................................................................................................! ICD Quick Installation and Tutorial ...........................................................................................! ICD Tutorial (1)Tutorial (3)About the Tutorial3 Start TRACE32-ICD4 Setup the Application Properties6 The Online Help7 Setup the Debug Environment10 Batch Jobs13 The User Interface15 How to Display and Modify CPU Registers18 How to Display and Modify the Special Function Registers20 How to Display and Modify Memory21 How to Debug the Program25 How to Set Breakpoints34 Software Breakpoints34 Breakpoints in ROM, Flash, EEPROM38 Breakpoints on Data Accesses39 Onchip Breakpoints (Overview)41 Display and Modify HLL Variables43 Format HLL-Variables45 Exit TRACE3248Version July, 26 2004TutorialAbout the TutorialWhat is it about?This is a tutorial for all In-Circuit Debuggers (TRACE32-ICD), that are implemented using their onchip debug interface. T ypical examples for onchip debug interfaces are BDM, JT AG, ONCE …Preconditions:The tutorial assumes that the development system is already installed. Y ou should have basic knowledge of the C-programming language in order to be able to follow the example code found in this tutorial. In addition working with WINDOWS is assumed as known. Also some knowledge of the used processor andassembler/compiler is necessary to get your debug system running.Purpose of this tutorial:The purpose of this tutorial is to get your debug system running, to write the batch job that does the necessary startup procedure and to make you familiar with the main features of the In-Circuit Debugger.How to use this tutorial:The tutorial contains a guided debug session. It uses a simple C-program example to show you the most important debug features. Y ou should perform a number of exercises as you read this tutorial. Werecommend to go completely through all chapters, since besides the tour (written in normal text format) there are very helpful remarks (written in italics) which will not be repeated in other chapters.Where can I get more information:The common TRACE32 user interface contains a detailed Online-Help, that offers the most currentdescription of all debug features. Refer to The Online Help on how to start the Online Help system.How long does it take?60 minutes.Start TRACE32-ICDIf your debug tools are installed in accordance to Quick Installation for TRACE32-ICD, power up your debug system first and then the target.T o start the debugger software on your host open the TRACE32 folder in the start menu and start theTRACE32 user interface. If you have generated an icon on your desktop, double click there. In the example below the software for two processor families (PowerPC and 68HC12) is installed.Setup the Application PropertiesThe property window of your application allows some basic settings for the debugger.1.Definition of a user specific configuration file.By default the configuration file config.t32 in the system directory is used. The option -c allowsyou to define your own location and name for the configuration file. For more information on theconfiguration file refer to Quick Installation forTRACE32-ICD2. Definition of a working directory.It is recommended not to work in the system directory.3. Definition of the start-up size of the application window.123The Online HelpThe most current version of the TRACE32 books is available in the online help. Y ou can get access to the TRACE32 online help using:the Help Topics button in the toolbarthe Help Contents entry in the menu barenter “HELP” in the command linetoolbar command linehelp menuThe online help provides also a powerful context sensitive help .Click first on the Help Context button and then move the quotation mark cursor on the object you are interested in. A popup window is opened to display information about this object.Use the Help Context button on the tool barto activate the context sensitive helpThe About TRACE32… command in the Help menu provides version information for all parts of TRACE32-ICD.Setup the Debug EnvironmentIn order to set-up your debugger, you need some knowledge about your CPU and about your target configuration. T o be able to download your program including all symbol and debug information you also need some knowledge about your compiler.A basic start-up procedure and the CPU specific setting for the ICD-Debuggers are described in the ICD Target Manual .Look at the Reference ICE/FIRE/ICD book for a detailed description of all generic commands.A typical start-up procedure consists of:ICD Target Manual gives quick accessto the settings and additional features for your CPU1.The CPU specific settings.The SYStem Window provides all CPU specific settings. Use System Settings… in the CPU menu to open this window.Inform the debugger about the CPU type on your target, if an automatic detection of the CPU is not possible. Select the correct CPU type from the pull down menu in the field CPU.(Command: SYStem.CPU )Set the system options in the option field corresponding to your target configuration and application program. (Command: SYStem.OptionOn some processor types the special function registers can be moved. The command(SYStem.Option BASE) is used to inform the debugger about the new base address (address of the first SFR). If the debugger does not have the correct base address no or wrong data will bedisplayed and FLASH programming might not be possible.Set the transfer clock from the debug interface to your target. By default TRACE32-ICD uses a fixed clock, generated by the Debug Module, to run the debug interface. A clock range from 100KHz up to5 MHz can be used.(Command: SYStem.BdmClock)We also provide a clock cable to allow you the use of the divided CPU clock as clock for the debug interface. The relation between the CPU clock and the debug interface clock is specific for your CPU.Refer to your ICD Target Manual for detailed information. The use of the divided CPU clock has the following advantages: The max. speed for the debug interface can be used. However we recommend 10MHz as the max.speed.The clock for the debug interface is automatically adapted if the CPU clock is changed by your appli-cation program.2. Enter the debug mode.Select the Up button in the Mode field to restart the CPU with debug mode enable.(Command: SYStem.Up)The user interface establishes the communication to the target′s microprocessor. After this command you should be able to access the registers.3. Do the target specific settings.The CPU is active now and you can initialize the CPU by writing to the special function registers using the Data.Set command. E. g. some CPUs need to set the chip selects in order to access memory. 4. Load your application.Load your application by using the commandData.LOAD.The option required for your compiler can be found in the ICD Target Manual in the sectionCompiler.If the file should be loaded to an EEPROM, the memory class EEPROM must be used to generate the required programming sequence. Example: d.load.b epromdata EEPROM:For flash programming refer to the FLASH command group in the Reference ICE/FIRE/ICD book.T o display the source code the compiled program must be equipped with debug information(frequently: compiler option “debug”). Then TRACE32 can load the compiler output formats directly.5. Initialize program counter and stackpointer: Register.SetMany compilers add these settings in the startup code to the user program automatically.It is recommended to write a batch job to set up the debugger to guarantee a proper start-up sequence.Batch JobsCreate a new batch file start.cmm in your working directory by using the command PEDIT start.cmm.TRACE32 has its own command language for batch jobs. It is called PRACTICE and it is very powerful (see the PRACTICE User’s Guide and PRACTICE Reference for more information). All commands of the TRACE32 development tools, commands for program flow, conditional commands and I/O commands are allowed. The default extension for batch files is “.cmm”.Also debugging of a PRACTICE program is supported. Look at the description in the PRACTICE User’s Guide and PRACTICE Reference (commands: PLIST, PEDIT, PBREAK).Enter the required commands, finish the batchjob by ENDDO and click the Save button. The picture above shows a startup procedure for the PowerPC505.Start the startup procedure by using Batchfile… in the File pulldown menu.T o continue our tour take one of the example files you can find in the TRACE32 system directory under \demo\\compiler\...e.g. \demo\powerpc\compiler\Diab\Diabc.cmm.or use your own batch file, if you have already prepared one.The User InterfaceRegister ButtonPulldown MenuCommand LineOpen a window to display the CPU registers. Y ou can alternatively select Registers from the View pulldown menu, push the Register button or enter Register.view at the prompt B:: in the command line.Most features can alternatively be selected from a pulldown menu, from a button in the main tool bar or from the command line. Please remember this even if we use just one way in the following chapters.The TRACE32 commands are not case sensitive. In the TRACE32 books we use upper case letters for the characters that are significant for the command entry. E.g. Register.view can be shortened by r . Another example which shows the typical TRACE32 command structure. is Data.List that can be shortened to d.l .A good hint is to look at the soft keys. They provide a guided command entry . All possible commands and parameters are displayed. Instead of writing to the command line you can assemble the correct command by clicking on the soft keys. Example: Assembly of the Data dump command by using the softkeys.More detailed information about the TRACE32 user interface can be found in the Operating System User’s Guide .In the window header the TRACE32 command that was executed to open the window is displayed.Soft KeysHow to Display and Modify CPU RegistersWe want to inspect the CPU registers now.T ry to change a register value by double-clicking on the value you want to change. The Register.Set command for the selected register is displayed in the command line. Y ou only have to enter the new value and confirm it with return (see right picture above).If the registers changed by the last steps should be marked in the Register window:1.Click to the window header with the right mouse button.The command, that was used to open the window is displayed in the command line for modification.The window header becomes red.2. Set the option /SpotLight and confirm the modification with return.3. Execute a few single steps.The registers changed by the last step are marked in dark red. The registers changed by the step before the last step are marked a little bit lighter etc. This works up to a level of 4 steps.function registers:If you select the register contents the address, bit position and complete name of the special function register is displayed in the state line.Y ou can modify the contents of a special function register:By pressing the right mouse button and selecting one of the predefined logical values from the pull-down menu.By a double-click to numeric values. A Data.Set command to change the register contents is dis-played in the command line. Enter the new value and confirm it with return.How to Display and Modify MemoryT o inspect an address range in the memory use the Data.dump window.。

Trace32 安装手册

Trace32 安装手册

Trace32安装手册
软件简介:
Trace32是由德国Lauterbach公司研制开发的一款仿真测试工具。

Trace32作为一种真正集成化、通用性系统仿真器可以组合成多种方案,可以支持网络方案、实验室单机方案、异地光纤方案等,它具有全模块化、积木式结构、可支持JTAG 及BDM接口和所有CPU,能够提供软件分析、端口分析、波形分析以及软件测试等强大功能。

安装注意事项:
Trace32分为USB和Simulator两种安装方式,在安装前需要询问用户要安装哪种方式,需注意:有的时候用户可能直接会说要安装Simulator,我们要清楚Simulator就是Trace32。

安装方法:
一:USB安装方式:
Open=Bin\Setup64\Setup.exe
更改安装路径: C:\T32usb,然后下一步:
选择ICD In-Circuit-Debugger>>>>>>选项:
一直下一步,直至安装完成。

二:Simulator安装方式:Open=Bin\Setup64\Setup.exe
选择Software only>>>>>>选项:。

Trace32-ICD使用说明

Trace32-ICD使用说明

Trace32-ICD使用说明作者:***日期:2008-8-11版本:V-1.0一、编写目的通过对该文档的阅读,能够掌握Trace32-ICD的软、硬件安装,使用Trace32-ICD进行flash擦除,程序下载,并熟悉在线调试。

二、T RACE32硬件的连接Trace32的硬件连接如下图所示:图2.1注意事项:电源打开/关闭时的正确顺序:打开:先调试器,再目标机。

关闭:先目标机,再调试器。

三、TRACE32软件的安装3.1 TRACE32-ICD软件包安装1、首先获取安装软件包,包括:Trace32安装包和USB Driver。

2、安装Trace软件包,运行..\ trace32\setup.bat批处理文件或..\trace32\bin\setup\setup.exe文件,系统自动安装,在安装过程中进行如下选择。

图 3.1 图3.2图3.3其他选项基本默认。

3.2 USB驱动安装正确连接Trace后,系统会自动提示发现硬件需要进行驱动。

此时选择驱动程序所在目录。

路径为..\ trace32\bin。

如图3.4所示。

图3.4四、Flash的擦除与下载程序由于手机在下载版本过程中死机或掉电造成手机无法正常启动,并且使用我们单位的ZXPST与QPST都无法进行版本下载,并且QXDM和ZXPST通过COM1接口也无法找到手机,于是无法下载。

在这种情况下我们可以使用Trace32-ICD进行Flash的擦除和程序下载。

4.1 设置环境CPU环境设置在SYStem窗口,SYStem窗口提供所有CPU特定的设置。

使用CPU菜单中的System Settings…打开SYStem窗口如图4.1所示。

需要配置主要包括CPU、时钟和UP加电,CPU选择ARM926EJ,时钟JtagClock选择Ttck,然后进行加电UP,如果连接一切都正常,设置这几项就可以了。

如图4.1所示:图4.1注意事项:如果UP不上出现如下错误emulation debug port fail,说明硬件连接不正确。

trace32使用手册

trace32使用手册

打开后的程序列表窗口可以有下面几种形式。 Pic24. 找不到源文件的程序列表窗口
对于上图所示的情形,需要用 Y.SPATH 命令指定源程序路径。如下图所示。 Pic25. 指定源程序路径(其一) Pic26. 带源程序的混合显示程序列表窗口(其二)
通过点击程序列表窗口上的“Mode”按钮可以切换混合和源码显示方式。 Pic27. 带源程序的源码程序列表窗口(其三)
这些设置主要包括: 1、 选择要调试的处理器型号。 2、 是否有多个器件串联在同一个 JTAG 链路里,连接顺序如何,每个器件的 JTAG IR
寄存器的宽度是多少。 (情况一) 3、 JTAG 时钟使用 TCK 还是 RTCK。TCK 由 TRACE-ICP 提供,一般情况下选用
10MHz。RTCK 是 TRACE-ICP 的 TCK 进入目标 JTAG 链路之后,从目标 JTAG 链路返回的时钟,它与目标处理器的时钟同步。一般情况下,具有睡眠模式的处理 器多选用 RTCK 作 JTAG 时钟, 如 ARM926EJ-S。 (情况二) 4、 通过 JTAG 与目标连接时,是否要先复位目标板。JTAG 口上的 SRST 信号产生复 位信号。 (情况三) 5、 通过 JTAG 与目标连接时,是否要停止目标处理器运行。 (情况四) 从主菜单“CPU”中选择“System Settings…” ,打开如下图所示对话框。从“CPU” 下拉菜单里选择要调试的处理器。 Pic2. System Settings 对话框
Pic29 中红框内的单选钮 IMASKASM 和 IMASKHLL 选择之后,单步时就会屏蔽中断。 用户也可以通过命令 sys.o imaskasm on 和 sys.o imaskhll on 来设置这两个选项。
十、 设置软件断点 设置软件断点可以在命令行输入命令 break.set <address> /soft 来实现,在命令中的 <address>代表程序地址,可以是程序中的函数名等符号。如下图所示。 Pic30. 用命令设置软件断点

关于TRACE32使用说明

关于TRACE32使用说明

目录1.系统组成1.1硬件1.1.1主机1.1.2调试电缆1.1.3通过USB与PC连接1.1.4通过JTAG与目标连接1.1.5对PC硬件的要求1.1.6对目标板硬件的要求1.1.7加电1.2软件1.2.1驱动程序的安装2.PowerView调试界面的使用3.1 打开调试界面3.2 JTAG连接设置3.3 运行脚本文件3.4 观察/修改寄存器3.5 观察/修改存储器3.6 下载程序3.7 观察符号表3.8 打开程序列表窗口3.9 单步执行程序3.10 设置软件断点3.11 设置Onchip硬件断点3.12 设置数据观察断点3.13 全速运行程序3.14 停止运行程序3.15 观察变量3.16 观察堆栈3.17 在线Flash编程1.系统组成TRACE-ICP调试系统由硬件和软件两部分组成,硬件是自行研发的,软件是第三方的。

下面分成硬件和软件两部分来介绍。

1.1硬件TRACE-ICP的硬件设计采用模块化的结构,分为主机和调试电缆两部分。

1.1.1主机下面三张照片是TRACE-ICP主机的顶视图和前视图以及后视图。

图一、TRACE-ICP顶视图图二、TRACE-ICP前视图图三、TRACE-ICP后视图在图二中的连接器是标准DB25/M连接器,用于连接调试电缆。

在图三中,有两个连接器和一个LED指示灯。

左边的连接器是USB接口,用于通过USB电缆和PC连接。

右边的连接器是TRACE-ICP的外接5VDC电源接口。

TRACE-ICP可以通过USB供电,在USB供电不足的情况下,使用外接电源。

LED指示灯是TRACE-ICP的电源指示灯。

1.1.2调试电缆下图是TRACE-ICP的调试电缆的照片。

图四、TRACE-ICP的调试电缆TRACE-ICP的调试电缆有两个连接端,一个是标准的DB25/F连接器,用于和TRACE-ICP主机相连,另一个是针距为2.54毫米的标准IDC20连接器,用于和目标板连接。

Lauterbach黑芯调试器TRACE32在线帮助说明书

Lauterbach黑芯调试器TRACE32在线帮助说明书

Blackfin Debugger Release 09.2023Blackfin DebuggerTRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................ICD In-Circuit Debugger ................................................................................................................Processor Architecture Manuals ..............................................................................................Blackfin ....................................................................................................................................Blackfin Debugger (1)Introduction (4)Brief Overview of Documents for New Users4 Demo and Start-up Scripts5 Location of Debug Connector5Warning (5)Quick Start JTAG (6)Troubleshooting (8)SYStem.Up Errors8FAQ (8)Configuration (9)System Overview9Blackfin specific SYStem Commands (10)SYStem.CONFIG Configure debugger according to target topology10 Daisy-Chain Example13 TapStates14 SYStem.CONFIG.CORE Assign core to TRACE32 instance15 SYStem.CPU CPU type selection16 SYStem.JtagClock JTAG clock selection17 SYStem.LOCK Lock and tristate the debug port17 SYStem.MemAccess Real-time memory access (non-intrusive)18 SYStem.Mode System mode selection19 SYStem.Option.IMASKASM Interrupt disable19 SYStem.Option.IMASKHLL Interrupt disable20Breakpoints (21)Software Breakpoints21 On-chip Breakpoints21 Breakpoint in ROM21Example for Breakpoints22 Memory Classes (23)CPU specific TrOnchip Commands (24)JTAG Connector (25)Blackfin DebuggerVersion 10-Oct-2023 IntroductionThis document describes the processor specific settings and features for the Blackfin Embedded Media Processor. TRACE32-ICD supports all Blackfin devices which are equipped with the JT AG debug interface.Please keep in mind that only the Processor Architecture Manual (the document you are reading at the moment) is CPU specific, while all other parts of the online help are generic for all CPUs supported by Lauterbach. So if there are questions related to the CPU, the Processor Architecture Manual should be your first choice.If some of the described functions, options, signals or connections in this Processor Architecture Manual are only valid for a single CPU the name is added in brackets.Brief Overview of Documents for New UsersArchitecture-independent information:•“Training Basic Debugging” (training_debugger.pdf): Get familiar with the basic features of a TRACE32 debugger.•“T32Start” (app_t32start.pdf): T32Start assists you in starting TRACE32 PowerView instances for different configurations of the debugger. T32Start is only available for Windows.•“General Commands” (general_ref_<x>.pdf): Alphabetic list of debug commands.Architecture-specific information:•“Processor Architecture Manuals”: These manuals describe commands that are specific for the processor architecture supported by your Debug Cable. T o access the manual for your processorarchitecture, proceed as follows:-Choose Help menu > Processor Architecture Manual.•“OS Awareness Manuals” (rtos_<os>.pdf): TRACE32 PowerView can be extended for operating system-aware debugging. The appropriate OS Awareness manual informs you how to enable theOS-aware debugging.Demo and Start-up ScriptsLauterbach provides ready-to-run start-up scripts for known Blackfin based hardware.To search for PRACTICE scripts, do one of the following in TRACE32 PowerView:•Type at the command line: WELCOME.SCRIPTS•or choose File menu > Search for Script.Y ou can now search the demo folder and its subdirectories for PRACTICE start-up scripts(*.cmm) and other demo software.Y ou can also manually navigate in the ~~/demo/blackfin/ subfolder of the system directory ofTRACE32.Location of Debug ConnectorLocate the debug connector on your target board as close as possible to the processor to minimize the capacitive influence of the trace length and cross coupling of noise onto the JT AG signals. WarningSignal LevelThe debugger output voltage follows the target voltage level. It supports a voltage range of 0.4…5.2V. ESD ProtectionNOTE:T o prevent debugger and target from damage it is recommended to connect ordisconnect the debug cable only while the target power is OFF.Recommendation for the software start:•Disconnect the debug cable from the target while the target power is off.•Connect the host system, the TRACE32 hardware and the debug cable.•Start the TRACE32 software.•Connect the debug cable to the target.•Switch the target power ON.Power down:•Switch off the target power.•Disconnect the debug cable from the target.Quick Start JTAGStarting up the debugger is done as follows:1.Select the device prompt B: for the ICD Debugger, if the device prompt is not active after the TRACE32 software was started.2.Select the CPU type to load the CPU specific settings.3.Enter debug mode:This command resets the CPU and enters debug mode. After the execution of this command access to the registers and to memory is possible. Before performing the first access to external SDRAM or FLASH the External Bus Interface Unit (EBIU) must be configured.4.The following command sequence is for the BF537 processor and configures the SDRAM controller with default values that were derived for maximum flexibility. They work for a system clock frequency between 54MHz and 133MHz.In the example a ST M29W320DB flash device is used in 16-bit mode. All four memory banks and CLKOUT are enabled.B:SYStem.CPU BF537SYStem.Up; configure SDRAM controllerData.Set 0xFFC00A1sLONG 0x0091998D Data.Set 0xFFC00A14 %WORD 0x0025Data.Set 0xFFC00A1C %WORD 0x03A0; EBIU_SDGCTL ; EBIU_SDBCTL ; EBIU_SDRRC; enable all flash memory banks and clock outData.Set 0xFFC00A00 %WORD 0x00FF; EBIU_AMGCTL; ST M29W320DB flash device in 16-bit modeFLASH.Create 1. 0x20000000--0x20003FFF 0x4000 AM29LV100 Word FLASH.Create 1. 0x20004000--0x20007FFF 0x2000 AM29LV100 Word FLASH.Create 1. 0x20008000--0x2000FFFF 0x8000 AM29LV100 Word FLASH.Create 1. 0x20010000--0x203FFFFF 0x10000 AM29LV100 Word5.Load the program.Data.LOAD.Elf demo.dxe; The file demo.dxe is in ELF format The option of the Data.LOAD command depends on the file format generated by the compiler. A detailed description of the Data.LOAD command is given in the “General Commands Reference”. The start-up sequence can be automated using the programming language PRACTICE. A typical start sequence is shown below. This sequence can be written to a PRACTICE script file (*.cmm, ASCII format) and executed with the command DO<file>.B::; Select the ICD device promptWinClear; Delete all windowsSYStem.CPU BF537; select the processorSYStem.Up; Reset the target and enter debug modeData.Load.Elf sieve.dxe; Load the applicationRegister.Set PC main; Set the PC to function mainList.Mix; Open disassembly window *) Register.view; Open register window *) PER.view; Open window with peripheral register *) Break.Set sieve; Set breakpoint to function sieveBreak.Set 0x1000 /p; Set on-chip breakpoint to address 1000; Refer to the restrictions in; On-chip Breakpoints.*) These commands open windows on the screen. The window position can be specified with the WinPOS command.TroubleshootingSYStem.Up ErrorsThe SYStem.Up command is the first command of a debug session where communication with the target is required. If you receive error messages while executing this command this may have the following reasons.All The target has no power.All There are additional loads or capacities on the JTAG lines.All The JTAG clock is too fast.FAQPlease refer to https:///kb.Configuration System OverviewBlackfin specific SYStem CommandsSYStem.CONFIG Configure debugger according to target topologyThe four parameters IRPRE, IRPOST , DRPRE, DRPOST are required to inform the debugger about the T AP controller position in the JT AG chain, if there is more than one core in the JT AG chain (e.g. ARM + DSP). The information is required before the debugger can be activated e.g. by a SYStem.Up . See Daisy-chain Example .For some CPU selections (SYStem.CPU ) the above setting might be automatically included, since the required system configuration of these CPUs is known.T riState has to be used if several debuggers (“via separate cables”) are connected to a common JT AG port at the same time in order to ensure that always only one debugger drives the signal lines. T APState and TCKLevel define the T AP state and TCK level which is selected when the debugger switches to tristate mode. Please note: nTRST must have a pull-up resistor on the target, TCK can have a pull-up or pull-down resistor, other trigger inputs need to be kept in inactive state.Format:SYStem.CONFIG <parameter> <number_or_address>SYStem.MultiCore <parameter> <number_or_address> (deprecated)<parameter>:CORE <core><parameter>:(JTAG):DRPRE <bits>DRPOST <bits>IRPRE <bits>IRPOST <bits>DAPDRPOST <bits>DAPDRPRE <bits>DAPIRPOST <bits>DAPIRPRE <bits>TAPState <state>TCKLevel <level>TriState [ON | OFF ]Slave [ON | OFF ]DEBUGPORTTYPE [JTAG | SWD ]SWDPIDLEHIGH [ON | OFF ]SWDPTargetSel <value>CORE For multicore debugging one TRACE32 PowerView GUI has to be startedper core. To bundle several cores in one processor as required by thesystem this command has to be used to define core and processorcoordinates within the system topology.Further information can be found in SYStem.CONFIG.CORE.… DRPOST <bits>Defines the TAP position in a JT AG scan chain. Number of TAPs in theJTAG chain between the TDI signal and the TAP you are describing. InBYPASS mode, each TAP contributes one data register bit. See possibleTAP types and example below.Default: 0.… DRPRE <bits>Defines the TAP position in a JT AG scan chain. Number of TAPs in theJTAG chain between the TAP you are describing and the TDO signal. InBYPASS mode, each TAP contributes one data register bit. See possibleTAP types and example below.Default: 0.… IRPOST <bits>Defines the TAP position in a JT AG scan chain. Number of InstructionRegister (IR) bits of all TAPs in the JT AG chain between TDI signal andthe TAP you are describing. See possible T AP types and example below.Default: 0.… IRPRE <bits>Defines the TAP position in a JT AG scan chain. Number of InstructionRegister (IR) bits of all TAPs in the JTAG chain between the T AP you aredescribing and the TDO signal. See possible TAP types and examplebelow.Default: 0.TAPState(default: 7 = Select-DR-Scan) This is the state of the TAP controller whenthe debugger switches to tristate mode. All states of the JTAG T APcontroller are selectable.TCKLevel (default: 0) Level of TCK signal when all debuggers are tristated. TriState(default: OFF) If several debuggers share the same debug port, thisoption is required. The debugger switches to tristate mode after eachdebug port access. Then other debuggers can access the port. JT AG:This option must be used, if the JTAG line of multiple debug boxes areconnected by a JTAG joiner adapter to access a single JTAG chain. Slave(default: OFF) If more than one debugger share the same debug port, allexcept one must have this option active.JTAG: Only one debugger - the “master” - is allowed to control the signalsnTRST and nSRST (nRESET).DEBUGPORTTYPE [JTAG | SWD]It specifies the used debug port type “JT AG”, “SWD”. It assumes the selected type is supported by the target.Default: JT AG.SWDPIdleHigh [ON | OFF]Keep SWDIO line high when idle. Only for Serialwire Debug mode. Usually the debugger will pull the SWDIO data line low, when no operation is in progress, so while the clock on the SWCLK line is stopped (kept low).Y ou can configure the debugger to pull the SWDIO data linehigh, when no operation is in progress by usingSYStem.CONFIG SWDPIdleHigh ONDefault: OFF.SWDPTargetSel<value>Device address in case of a multidrop serial wire debug port.Default: none set (any address accepted).Daisy-Chain ExampleBelow, configuration for core C.Instruction register length of •Core A: 3 bit •Core B: 5 bit •Core D: 6 bitSYStem.CONFIG.IRPRE 6.; IR Core D SYStem.CONFIG.IRPOST 8.; IR Core A + B SYStem.CONFIG.DRPRE 1.; DR Core D SYStem.CONFIG.DRPOST 2.; DR Core A + BSYStem.CONFIG.CORE 0. 1.; Target Core C is Core 0 in Chip 1Core A Core B Core CCore D TDOTDI Chip 0Chip 1TapStates0Exit2-DR1Exit1-DR2Shift-DR3Pause-DR4Select-IR-Scan5Update-DR6Capture-DR7Select-DR-Scan8Exit2-IR9Exit1-IR10Shift-IR11Pause-IR12Run-Test/Idle13Update-IR14Capture-IR15Test-Logic-ResetSYStem.CONFIG.CORE Assign core to TRACE32 instance Format:SYStem.CONFIG.CORE<core_index><chip_index>SYStem.MultiCore.CORE<core_index><chip_index> (deprecated) <chip_index>:1 (i)<core_index>:1…kDefault core_index: depends on the CPU, usually 1. for generic chipsDefault chip_index: derived from CORE= parameter of the configuration file (config.t32). The COREparameter is defined according to the start order of the GUI in T32Start with ascending values.T o provide proper interaction between different parts of the debugger, the systems topology must bemapped to the debugger’s topology model. The debugger model abstracts chips and sub cores of these chips. Every GUI must be connect to one unused core entry in the debugger topology model. Once the SYStem.CPU is selected, a generic chip or non-generic chip is created at the default chip_index.Non-generic ChipsNon-generic chips have a fixed number of sub cores, each with a fixed CPU type.Initially, all GUIs are configured with different chip_index values. Therefore, you have to assign thecore_index and the chip_index for every core. Usually, the debugger does not need further information to access cores in non-generic chips, once the setup is correct.Generic ChipsGeneric chips can accommodate an arbitrary amount of sub-cores. The debugger still needs information how to connect to the individual cores e.g. by setting the JT AG chain coordinates.Start-up ProcessThe debug system must not have an invalid state where a GUI is connected to a wrong core type of a non-generic chip, two GUIs are connected to the same coordinate or a GUI is not connected to a core. The initial state of the system is valid since every new GUI uses a new chip_index according to its CORE= parameter of the configuration file (config.t32). If the system contains fewer chips than initially assumed, the chips must be merged by calling SYStem.CONFIG.CORE.SYStem.CPU CPU type selection Format:SYStem.CPU <cpu><cpu>:BF531 | BF532 | BF533 | BF534…Default selection: BF534.Selects the CPU type.SYStem.JtagClock JT AG clock selection Format:SYStem.JtagClock [<frequency>]SYStem.BdmClock<frequency>(deprecated)Default frequency: 1MHz.Selects the JT AG port frequency (TCK). Any frequency up to 50MHz can be entered, it will be generated by the debuggers internal PLL.For CPUs which come up with very low clock speeds it might be necessary to slow down the JT AGfrequency. After initialization of the CPUs PLL the JT AG clock can be increased.SYStem.LOCK Lock and tristate the debug port Format:SYStem.LOCK [ON | OFF]Default: OFF.If the system is locked, no access to the debug port will be performed by the debugger. While locked, the debug connector of the debugger is tristated. The main intention of the SYStem.LOCK command is to give debug access to another tool.SYStem.MemAccess Real-time memory access (non-intrusive) Format:SYStem.MemAccess Denied | StopAndGo | BTCBTC“BTC” allows a non-intrusive memory access while the core is running, if aBackground T elemetry Channel (BTC) is defined in your application. Anyinformation on how to create such a channel can be found in AnalogDevices’ VisualDSP++ user’s manual. The JT AG clock speed should be asfast as possible to get good performanceDenied Real-time memory access during program execution to target is disabled.StopAndGo Temporarily halts the core(s) to perform the memory access. Each stoptakes some time depending on the speed of the JT AG port, the number ofthe assigned cores, and the operations that should be performed.SYStem.Mode System mode selectionFormat:SYStem.Mode <mode>SYStem.Attach (alias for SYStem.Mode Attach)SYStem.Down (alias for SYStem.Mode Down)SYStem.Up (alias for SYStem.Mode Up)<mode>:DownGoAttachUpDown Disables the debugger.Go Resets the target with debug mode enabled and prepares the CPU fordebug mode entry. After this command the CPU is in the system.upmode and running. Now, the processor can be stopped with the breakcommand or if a break condition occurs.Attach User program remains running (no reset) and the debug interface isinitialized.Up Resets the target and sets the CPU to debug mode. After execution ofthis command the CPU is stopped and prepared for debugging.StandBy Not supported.NoDebug Not supported.SYStem.Option.IMASKASM Interrupt disable Format:SYStem.Option.IMASKASM [ON | OFF]Mask interrupts during assembler single steps. Useful to prevent interrupt disturbance during assembler single stepping.SYStem.Option.IMASKHLL Interrupt disable Format:SYStem.Option.IMASKHLL [ON | OFF]Mask interrupts during HLL single steps. Useful to prevent interrupt disturbance during HLL single stepping.BreakpointsThere are two types of breakpoints available: software breakpoints and on-chip breakpoints. Software BreakpointsSoftware breakpoints are the default breakpoints. A special breakcode is patched to memory so it only can be used in RAM or FLASH areas.There is no restriction in the number of software breakpoints.On-chip BreakpointsThe Blackfin processor has a total of six instruction and two data on-chip breakpoints.A pair of two breakpoints may be further grouped together to form a range breakpoint. A range breakpointcan be including or excluding. In the first case the core is stopped if an address in the range is detected, in the second case the core is stopped when an address outside of the range is observed.Breakpoint in ROMWith the command MAP.BOnchip<range> it is possible to inform the debugger about ROM(FLASH,EPROM) address ranges in target. If a breakpoint is set within the specified address range the debugger uses automatically the available on-chip breakpoints.Example for BreakpointsAssume you have a target with FLASH from 0x20000000 to 0x200FFFFF and RAM from 0x0 to 0x1000000. The command to configure TRACE32 correctly for this configuration is: Map.BOnchip 0x20000000--0x200FFFFFThe following breakpoint combinations are possible.Software breakpoints:Break.Set 0x0 /Program; Software Breakpoint 1Break.Set 0x1000 /Program; Software Breakpoint 2On-chip breakpoints:Break.Set 0x20000100 /Program; On-chip Breakpoint 1Break.Set 0x2000ff00 /Program; On-chip Breakpoint 2Memory ClassesThe following memory classes are available: Memory Class DescriptionP ProgramD DataCPU specific TrOnchip CommandsThe TrOnchip command group is not available for the Blackfin debugger.JTAG ConnectorSignal Pin Pin SignalGND12EMU-N/C34GNDVDDIO56TMSN/C78TCKN/C910TRST-N/C1112TDIGND1314TDOJTAG Connector Signal Description CPU Signal TMS JTAG-TMS,TMSoutput of debuggerTDI TDI JTAG-TDI,output of debuggerTCK TCK JTAG-TCK,output of debugger/TRST /TRST JTAG-TRST,output of debuggerTDO TDO JTAG-TDO,input for debugger/EMU JTAG Emulation Flag /EMUVDDIO VDDIO This pin is used by the debugger to sense the targetI/O voltage and to set the drive levels accordingly. Ifthe sensed voltage level is too low (e.g. target has nopower) the debugger powers down its drivers toprevent the target from damage.。

TRACE32 调试器使用指南 TRACE32 Trace Tutorial说明书

TRACE32 调试器使用指南 TRACE32 Trace Tutorial说明书

T race T utorial Release 02.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Debugger Getting Started ..............................................................................................Trace Tutorial (1)History (3)About the Tutorial (3)What is Trace? (3)Trace Use Cases4Trace Methods (5)Simulator Demo (6)Trace Configuration (7)Trace Recording (8)Displaying the Trace Results (10)Trace List10 Displaying Function Run-Times13 Graphical Charts13 Numerical Statistics and Function Tree14 Duration Analysis15 Distance Analysis16 Variable Display17 Track Option18Searching Trace Results (19)Trace Save and Load (20)Version 10-Feb-2023 History18-Jun-21New manual.About the TutorialThis tutorial is an introduction to the trace functionality in TRACE32. It shows how to perform a tracerecording and how to display the recorded trace information.For simplicity, we use in this tutorial a TRACE32 Instruction Set Simulator, which offers a full tracesimulation. The steps and features described in this document are however valid for all TRACE32 products with trace support.The tutorial assumes that the TRACE32 software is already installed. Please refer to “TRACE32Installation Guide” (installation.pdf) for information about the installation process.Please refer to “ICD Tutorial” (icd_tutorial.pdf) for an introduction to debugging in TRACE32 PowerView. What is Trace?T race is the continuous recording of runtime information for later analysis. In this tutorial, we use the term trace synonymously with core trace. A core trace generates information about program execution on a core,i.e. program flow and data trace. The TRACE32 Instruction Set Simulator used in this tutorial supports a fulltrace simulation including the full program flow as well as all read and write data accesses to the memory. A real core may not support all types of trace information. Please refer to your Processor Architecture Manual for more information.Trace Use CasesT race is mainly used in the following cases:1.Understand the program execution in detail in order to find complex runtime errors more quickly.2.Analysis of the code performance of the target code3.Verification of real-time requirements4.Code-coverage measurementsTrace MethodsTRACE32 supports various trace methods. The trace method can be selected in the Trace configuration window, which can be opened from the menu Trace > Configuration…If a trace method is not supported by the current hardware/software setup, it is greyed out in the trace configuration window. NONE means that no trace method is selected.We use in this tutorial the trace method Analyzer. Please refer to the description of the commandTrace.METHOD for more information about the different trace methods.Simulator DemoWe use in this tutorial a TRACE32 Simulator for Arm. The described steps are however valid for the TRACE32 Simulator for other core architectures.T o load a demo on the simulator, follow these steps:1.Start the script search dialog from the menu File > Search for scripts…2.Enter in the search field “compiler demo”3.Select a demo from the list with a double click, a PSTEP window will appear. Press the“Continue” button.We will use here the demo “GNU C Example for SRAM”.Trace ConfigurationIn order to set up the trace, follow these steps:1.Open the menu Trace > Configuration… The trace method Analyzer [A] should be selected perdefault. If this is not the case, select this trace method2.Clear the contents of the trace buffer by pressing the Init button [B].3.Select the trace operation mode [C].In mode Fifo , new trace records will overwrite older records. The trace buffer includes thus always the last trace cycles before stopping the recording.In Mode Stack , the recording is stopped if the trace buffer is full. The trace buffer always includes in this case the first cycles after starting the recording.Mode Leash is similar to mode Stack , the program execution is however stopped when the trace buffer is nearly full.TRACE32 supports other trace modes. Some of these modes depend on the core architecture. Please refer to the documentation of the command Trace.Mode for more information. We will keep here the default trace mode selection, which is Fifo .4.The SIZE field [D] indicates the size of the trace buffer. As we are using a TRACE32 Simulator, the trace buffer is reserved by the TRACE32 PowerView application on the host. It is thuspossible to increase the size of this buffer. If a TRACE32 trace hardware is used with a real chip, the size of the trace buffer is limited by the size of the memory available on the trace tool.In order to have a longer trace recording, we will set the trace buffer size to 10000000.BACDThe same configuration steps can be performed using the following PRACTICE script:Trace RecordingPress the Go button to start the program execution.The trace recording is automatically started with the program execution. The state in the Trace window changes from OFF to Arm [A]. The used field displays the fill state of the trace buffer [B].In order to stop the trace recording, stop the program execution with the Break button. The state in the trace window changes to OFF .Trace.METHOD Analyzer Trace.InitTrace.Mode FifoTrace.SIZE 10000000.BACThe trace recording is automatically started and stopped when starting and stopping the program execution because of the AutoArm[C] setting in the Trace window, which is per default enabled. The trace recording can also be started/stopped manually while the program execution is running using the radio buttons Armand OFF of the Trace window [A].Displaying the Trace ResultsTRACE32 offers different view for displaying the trace results. This document shows some examples.Please note that the trace results can only be displayed if the trace state in the Trace window is OFF. It is not possible to display the trace results while recording.The caption of a TRACE32 window includes the TRACE32 command that can be executed in the TRACE32 command line or in a PRACTICE script to open this window, e.g. here Trace.ListTrace ListA list view of the trace results can be opened from the menu T race > List > Default. The same window canbe opened from the Trace configuration window by pressing the List button.The Trace.List window displays the recorded trace packets together with the corresponding assembler and source code.In our case, trace packets are program fetches (cycle fetch) or data accesses (e.g. wr-long and rd-long for 32bit write and read accesses). Each trace packet has a record number displayed in the record column. The record number is a negative index for Fifo mode.As we are using a Simulator, each assembly instruction has an own trace packet. This is not the case with a real hardware trace.The displayed information can be reduced using the Less button. By pressing Less three times, only the high-level source code is displayed. This can be reverted using the More button.A double click on a line with an assembly instruction or high-level source code opens a List window showing the corresponding line in the code.Using the TRACE32 menu Trace > List > Tracing with Source , you get a Trace.List and a List /Track window. When doing a simple click on a line in the Trace.List window, the List window will automaticallydisplay the corresponding code line.The timing information (see ti.back column) is generated in this case by the TRACE32 Instruction Set Simulator. With a real core trace, timestamps are either generated by the TRACE32 trace hardware or by the onchip trace module.Double clickSimpleclickDisplaying Function Run-TimesTRACE32 supports nested and flat function run-time analysis based on the trace results. Please refer to the video “Flat vs. Nesting Function Runtime Analysis” for an introduction to function run-time analysis inTRACE32:/tut_profiling.htmlGraphical ChartsBy selecting the menu Trace > Chart > Symbols, you can get a graphical chart that shows the distribution of program execution time at different symbols. The displayed results are based on a flat analysis:The corresponding nesting analysis can be displayed using the menu Perf > Function Runtime > Show as Timing.The In and Out buttons can be used to zoom in/out. Alternatively, you can select a position in the window and then use the mouse wheel to zoom in/out.Numerical Statistics and Function TreeThe menu entry Perf > Function Runtime >Show Numerical displays numerical statistics for each function with various information as total run-time, minimum, maximum and average run-times, ratio, and number of function calls.ABParents [A] displays for example a caller tree for the selected function. By doing a right mouse click on func1 and selecting Parents, we see the run-times of the functions func2 and func9, which have called func1 in thetrace recording.Children [B] displays the run-times of the functions called by the selected function, for example here the function subst called by the function encode.A function call tree view of all function recorded in the trace can be displayed using the menu entries Perf >Function Runtime > Show as Tree or Perf > Function Runtime > Show Detailed Tree.Duration AnalysisBy doing a right mouse click on a function in the numerical statistics window (Trace.STATistic.Func) then selecting Duration Analysis, you get an analysis of the function run-times between function entry and exit including the time spent in called subroutines, e.g. here for the function subst (P:0x114C corresponds to the start address of the subst function):The time interval can be changed using the Zoom buttons.Distance AnalysisBy doing a right mouse click on a function in the numerical statistics window (Trace.STATistic.Func) then selecting Distance Analysis, you can get run-times between two consecutive calls of the selected function,e.g. here for the function subst (P:0x114C corresponds to the start address of the subst function):Variable DisplayThe Trace.ListVar command allows to list recorded variables in the trace. If the command is used without parameters all recorded variables are displayed:Y ou can optionally add one or multiple variables as parameters.Example: display all accesses to the variables plot1 and plot2The Draw button can then be used to plot the displayed variables graphically against time. This corresponds to the following TRACE32 command:Please refer for more information about the Trace.DRAW command to “Application Note forTrace.DRAW” (app_trace_draw.pdf).Trace.ListVar Trace.ListVar %DEFault plot1 plot2Trace.DRAW.Var %DEFault plot1 plot2Track OptionThe /Track options allows to track windows that display the trace results. Y ou just need to add the /Track option after the command that opens a trace window, e.g.Trace.List /TrackThe cursor will then follow the movement in other trace windows, e.g. Trace.Chart.Func. Default is time tracking. If no time information is available, tracking to record number is performed.TRACE32 windows that displays the trace results graphically, e.g. Trace.Chart.Func, additionally accept the /ZoomTrack option. If the tracking is performed with another graphical window, the same zoom factor is used in this case.Trace.Chart.Func /ZoomTrackSearching Trace ResultsThe Find button allows to search for specific information in the trace results.Example 1: find the first call of function func21.Enter “func2” under address / expression2.Select Program under cycle3.Press the Find First button. The next entries to func2 in the trace can then be found using theNext buttonExample 2: Find all write accesses to the variable mstatic1 with the value 0x01.Enter “mstatic1” under address / expression2.Select Write under cycle3.Enter 0x0 under Data4.Press the Find All buttonPlease refer to “Application Note for Trace.Find” (app_trace_find.pdf) for more information about Trace.Find.Trace Save and LoadThe recorded trace can be stored in a file using the command Trace.SAVE , e.g.The saved file can then be loaded in TRACE32 PowerView using the command Trace.LOADThe TRACE32 trace display windows will show in this case a LOAD message in the low left cornerPlease note that TRACE32 additionally allows to export/import the trace results in different formats. Refer to the documentation of the command groups Trace.EXPORT and Trace.IMPORT for more information. Trace.SAVE file.adTrace.LOAD file.ad。

TRACE32调试技巧

TRACE32调试技巧

TRACE32调试技巧1. 调试步骤l 连接好 TRACE32-ICD 和目标板,注意不要带电插拔 JTAG ,容易损坏 TRACE32 或目标板,然后依次打开 TRACE32-ICD 和目标板的电源。

l 开启调试软件 TRACE32l 设置 CPU 类型,状态等,可以通过命令或菜单,命令如下:sys.resetsys.CPU ARM7TDMI ; 这里设置 CPU 类型sys.up ; 启动调试,如果正常的话,状态为 system.ready; 否则会报错,需要检查 CPU 设置是否正确,TRACE32 和目标板的连接和电源是否正常如果调试正常启动后,就可以下载编译好的文件(可以是 .elf 、 .binary 等文件)到 RAM 或 FLASH 中调试了l 下载编译文件,命令如下:data.load.elf E:/source/test.elf /PATH E:/source这里的/PATH选项是用来指明源代码的路径,在调试时TRACE就可以查找到源代码了。

这里 TRACE会根据 .elf 文件里包含的目标代码起始地址加载到 RAM 的对应地址上,也可以指定加载到 RAM 的地址,但须和编译时的设置一致,否则程序不能正常运行。

注: TRACE 也可以把编译目标文件烧录到 flash 中进行调试,需要使用 flash 烧录相关命令,这里就不详述了。

l 然后就可以设置断点进行调试了,如:break.set 0x0c008000TRACE32 的断点有两种,一种是硬件断点(在 FLASH 中的断点),另一种是软断点(在 RAM 中的断点);硬件断点需要 CPU 的支持,如 ARM7 最多只支持 2 个硬件断点,如果使用了软断点的话,就只能使用一个硬断点了;而软断点没有限制,可以设置很多个。

注:在TRACE32中,如果要使用硬件断点,需要先设置好FLASH内存映射范围,如下命令:Map.bonchip 0x0000--0xfffff ; 具体范围根据目标板 FLASH 的范围设置l 设置好断点就可以正常调试了。

TRACE32 异常控制系统文档说明书

TRACE32 异常控制系统文档说明书

FEATURE OVERVIEWUsing TRACE32 for IEC 62304TRACE32 for IEC 62304 at a Glance• TRACE32 Tool Qualification Support-Kit streamlines TRACE32 tool qualification effort and costs.• TRACE32 TQSK is fully featured, field proven and ready to cover new use casesand requirements.• TRACE32 TQSK Customer Interface provides full support and service around tool qualification.• All test suites run in the target environment and are fully multicore aware.• Test Suite Coverage includes statement, decision, condition, function and call coverage, as well as MC/DC.• TRACE32 Instruction Simulator, TRACE32 Debug and Trace Tools, USB Debug and Trace provide comprehensive tool support throughout all project phases.Website-LinksTRACE32 Trusted Tools for Functional Safety /trusted_tools.htmlTQSK Customer Portal /register_tqsk.htmlTRACE32 Code Coverage /coverage.htmlTRACE32 Instruction Set Simulator /sim.htmlThe TRACE32 Tool Qualification Support-Kit (TQSK) provides everything needed to qualify use in safety-related software projects.Figure 1: The 2-stage qualification processCertification ArtifactsDocumentsTest SuiteTool Verification and Validation Supplement for Integration toOperational EnvironmentTest Suite DocumentsTest ReportTesting in Operational EnvironmentTest Report Testing inTSSTCTest Suite Simulator TriCore(paid)DSMDeveloper SafetyManualTSCTest Suite Coverage(free)TSDTest Suite Debug(free)$$TSSATest Suite Simulator Arm(paid)Test Suite SimulatorUpon customer request, Lauterbach also provides test suites for its Arm and TriCore Instruction Set Simulators. A qualified instruction set simulator is an accepted test environment in the software module testing phase of the project (see also figure 3) and offers the following advantages:• Product software qualification can start before product hardware is available.• The qualification of the product software can be well organized even in a distributed team, becauseeverything necessary is purely software-based.• If bottlenecks occur during this phase due to a lack of development hardware or debug/trace tools, additional test benches can be easily equipped with simulators.Test Suite DebugThe Test Suite Debug includes all basic debugging functionality such as target configuration, programming onchip and NOR flashes, loading programs, setting breakpoints and reading/writing of memory and variables.Figure 3: TRACE32 tool use in code coverage qualification。

TRACE32梯度32在线帮助应用程序说明书

TRACE32梯度32在线帮助应用程序说明书

Application Note for t32cast Release 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................Source Level Debugging ..............................................................................................................Application Note for t32cast (1)History (3)Introduction (4)Intended Audience4 Prerequisites5 Related Documents5 Restrictions5Installation (6)System Requirements6 License Requirements6 Installing t32cast6Command Line Parameters of t32cast (7)t32cast Usage (9)Version 09-Oct-2023 History18-Apr-23Added commands for source code instrumentation.11-Jun-18Initial version.IntroductionThere are TRACE32 features which require additional source code details that are not included in the debug infromation generated by the compiler. For example, several coverage metrics such as MC/DC or decision coverage need information about the locations of decisions and function calls in the source code.The task of the command line tool t32cast is to generate all the additional information. It analyzes the C/C++ source code and generates an Extended Code Analysis data file (.eca) per source file.The .eca files have to be loaded into TRACE32 if needed. The source code file and the .eca file must be located in the same directory. In this way, the assignment is simple and unambiguous.t32cast can be started via a PRACTICE script or a batch job. But to ensure that the .eca files always match the source code files, it is recommended to integrate their generation into the build process.Intended Audience•Developers who want to use one of the TRACE32 code coverage metrics that require additional details about the source code.•Persons in charge of the build system who want to integrate t32cast into their build process.PrerequisitesWindows users will need to ensure that the Microsoft Visual C++ Redistributable package is installed on their system. The latest one is always available as a free-of-charge download from the Microsoft download center.Linux users will need at least libncurses-5 or libncurses-compat. Depending upon the distribution used, other dependencies may be needed. Generally, running the t32cast tool will highlight any missingcomponents.Related Documents•“Application Note for Trace-Based Code Coverage” (app_code_coverage.pdf).•The description of the sYmbol.ECA command group in “General Commands Reference Guide S” (general_ref_s.pdf).RestrictionsCurrently, t32cast does not parse decisions within macros within macros correctly. The source file must be pre-processed by the compiler to expand these before running it against t32cast.InstallationSystem Requirements•64-bit Windows or Linux host computer.•The sYmbol.ECA command group was supported for the first time with TRACE32 build of 95748 (March 2018). The version of TRACE32 can be verified with the VERSION.SOFTWAREcommand.License RequirementsThe use of t32cast requires no additional licenses.Installing t32castThe command line tool t32cast is located under ~~/bin/<host_os>. An installation is not necessary.If you receive an error message about a missing *.dll, then install the Microsoft Visual C++ Redistributable package. See “Prerequisites”, page 5.Command Line Parameters of t32castThe command line tool t32cast is designed to be included as part of the build process.The examples below show how you can quickly display the help message (--help) and the version information (--version). They are independent of the t32cast integration into the build process.t32cast [subcommand] [options] <input>Available subcommands:eca Generate data for extended code analysis in TRACE32.This command generates additional information about theC/C++ code which is usually not included in the debugsymbols. The data includes the position of decisions,function calls and comments.instrument Instrument source file for MC/DC or Decision coveragemeasurement with TRACE32. Depending on the target andcompiler the source file may be partially or fullyinstrumented. Refer to “Application Note for Trace-BasedCode Coverage” (app_code_coverage.pdf) for moreinformation.vectors Generate MC/DC test vectors.This command will output all decisions together with testvectors to achieve full MC/DC coverage. The results may beused for developing test cases. They are not for use withTRACE32.Available options:--help Display the help message and exit.--version Display version information and exit.-o <output>Write output to file <output>.--comments List comments in output.-I <dir>Add directory to include search path.-D <macro[=value]>Define a macro.-imacros <file>Define macros from file before parsing.-m32Preprocess source code for 32-bit target.-m64Preprocess source code for 64-bit target.<input>Read input from file.-x <language>Set the language as which the file as parsed. The optionsare C and C++.--show-warnings Show additional warnings when parsing the C or C++ code --stop-on-error Stop on Clang parser errors--strict-mode Abort the parsing process on any warning--parse-const-expr Exports decisions where the expression can already beevaluated during compile-time--mode <value>Specify instrumentation mode.Allowed values:•MCDC--filter <file>Specify filter file for partial instrumentation--extra-arg=<string>Additional argument to append to the t32cast parseroptions. All options available to the Clang compiler areavailable.--extra-arg-before=<string>Additional argument to prepend to the t32cast parseroptions. All options available to the Clang compiler areavailable.The t32cast utility requires the output from the compiler’s pre-processing step. Most compilers generate these intermediary files but automatically remove them as part of the normal build process. These files contain the full source code, any included files and all compiler macros have been replaced or expanded. Please refer to your toolchain documentation to configure your compiler to generate and keep these files.The t32cast tool will generate an Extended Code Analysis (ECA) data file. These should be loaded into TRACE32 to be able to calculate coverage data for several coverage metrics.Examples for Arm and PowerArchitecture can be found under ~~/demo/t32cast/eca/ppc or~~/demo/t32cast/eca/arm. These contain a complete build environment showing how to adapt a Makefile for GNU make and GCC.t32cast UsageExamplesExample 1: This PRACTICE script (*.cmm) shows how to start t32cast from within TRACE32 and display the help message.OS.screen cmd /C c:/t32/demo/t32cast/bin/win-x64/t32cast.exe --help && pauseExample 2: This batch script (*.bat) displays the version number of t32cast in a shell window.@echo offC:cd c:\t32\demo\t32cast\bin\win-x64\t32cast.exe --version && pause。

TRACE32使用

TRACE32使用

• 6.4)查看CPU寄存器:
Thank You!
由于th100使用的那根小线fpc很容易受到干扰如果出现连接不成功的情况建议使用防干扰的fpc线或更换testboard试试不用怀疑跳线问题
TRACE32 使用
刘小春 2009-05-26
1,TRACE32作用:
在线实时仿真 • 设置实时地址和数据断点、单步执行、对 ARM内核完全存取和控制。 • 跟踪调试程序异常原因。
2,硬件连接
• • TH100连接Trace32及开发板跳线方法: 1.1)下图为TH100,TRACE32和开发板 连接方法:
TRACE32,手机,开发板连接图:
• 1.2)下图适用于TH100接开发板跳线方法。 • J14和J13两个跳线帽放到左边 ,J7在右边
• •

1.3)TH100连接Trace32注意事项: 图中的开发板的版本是 “TG100_TESTBOARD_V2.10_PCB(07 0619)”,请尽量使用此版本的Test Board。 由于TH100使用的那根小线(FPC)很容易 受到干扰,如果出现连接不成功的情况, 建议使用防干扰的FPC线或更换Test Board试试,不用怀疑跳线问题。
TRACE32运行截图:
7,TRACE32调试
• • • • • • 6.1)断点 最多可设置两个硬件断点。 可设置条件断点。 6.2)单步跟踪,跳转 6.3)查看堆栈,变量和内存 当TRACE停在断点上,或者处于break状态下执 行view—stackframe查看堆栈中函数调用关系。 • 查看变量和读取制定内存接好TRACE32,手 机和开发板。 • 5.2)运行TRACE32程序,选择脚本 “file—open batch file…— js_it_debug.cmm”。 • 5.3)长按手机开机键,执行 js_it_debug.cmm脚本开机,如下图所示:

TRACE32测试软件及操作说明书

TRACE32测试软件及操作说明书

T raining Simulator and Demo SoftwareRelease 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Training ............................................................................................................................Training Simulator and Demo Software (1)About the Demo (3)Starting the TRACE32 Simulator (3)User Interface - TRACE32 PowerView (4)TRACE32 Command Line and Softkeys6 Window Captions - What Makes Them Special in TRACE327Debugging the Program (8)Basic Debug Commands8 Debug Modes9 Displaying the Stack Frame11Breakpoints (12)Setting Breakpoints12 Listing all Breakpoints13 Setting Read/Write Breakpoints14Variables (15)Displaying Variables15 Displaying Variables of the Current Program Context16 Using the Symbol Browser16 Formatting Variables17 Modifying Variables18Memory (19)Displaying Memory19 Modifying Memory20Version 10-Oct-2023About the DemoWhat is this? This is a guided tour through TRACE32 - a tutorial. We use a simple program example in C to illustrate the most important debug features, and give lots of helpful tips & tricks for everyday use.How long does this tutorial take? 0.5 to 1 hrs.How can I learn most from this tutorial? Work completely through all chapters in sequence and then do the quiz at the end.Where can I download the TRACE32 Simulator for the hands-on debug session? From:https:///download.html . You do not need any hardware for this tutorial.Starting the TRACE32 Simulator1.Unzip the downloaded file. Y ou do not need to install the TRACE32 Simulator.2.Double-click the t32m <architecture>.exe file (e.g. t32m arm .exe ) to start the demo debug session. When the TRACE32 Instruction Set Simulator starts, a start-up PRACTICE script that sets up a debug session is automatically executed.Y ou can manually execute the same start-up PRACTICE script by choosing File menu > Run Script .PRACTICE, the Lauterbach script language, is used for automating tests, configuring the TRACE32 PowerView GUI and your debug environment.For our demo debug session, the PRACTICE start-up script armc.cmm loads the application program armle.axf and generates a TRACE32 internal symbol database out of the loaded information.By default, TRACE32 executes the autostart.cmm script on start-up.User Interface - TRACE32 PowerViewThe graphical user interface (GUI) of TRACE32 is called TRACE32 PowerView.The following screen shot presents the main components of the user interface.We’ll briefly explain the GUI using the List command and List window as an example.A video tutorial about the TRACE32 PowerView GUI is available here:/kb/articles/introduction-to-trace32-gui Do one of the following to open the List window:•Choose View menu > List Source•or, at the TRACE32 command line, type: List (or L )Main Menu Bar Main Tool BarC o n t e x t M e n uLocal ButtonsMessage Line SoftkeyLine State LineWindow AreaCommand LineThe List window displays the code in assembler mnemonic and HLL (HLL stands for High-Level Language and means the programming language of your source code).In the List window, the gray bar indicates the position of the program counter (PC). Right now, it is located on the symbolic address of the label main .A video tutorial about the source code display in TRACE32 is available here:/kb/articles/displaying-the-source-codeT o summarize it, you can execute commands in TRACE32 PowerView via the usual suspects:1.Menus on the menu bar2.Buttons on the main toolbar and the buttons on the toolbars of TRACE32 windows3.Context menus in TRACE32 windowsAdditionally in TRACE32, you can execute commands via the TRACE32 command line.Opens the List windowProgram counter (PC)TRACE32 Command Line and SoftkeysTRACE32 commands are not case sensitive: register.view is the same as Register.view UPPER CASE letters indicate the short forms of commands and must not be omitted. All lower case letters can be omitted. This makes short forms an efficient time saver when you are entering frequently-used commands in the command line. Examples:•Instead of the long form Register.view type just the short form r or R •Instead of the long form List type just the short form l or LThe softkeys are below the command line. The camel casing (i.e. upper and lower case letters) on any softkey tells you the long form of a command. The softkeys guide you through the command input, displaying all possible commands and parameters.Example - To assemble the Data.dump command using the softkeys:1.Click Data .2.Click dump .3.Type the <range> or <address> you want to dump. For example, 0x1000--0x20004.Click [ok] to execute the command. The Data.dumpwindow opens.SoftkeysCommand lineWindow Captions - What Makes Them Special in TRACE32The command with which you open a window will be shown as the window caption. The parameters and options are also included in the window caption.You can re-insert a command from a window caption (a) into the command line (b) in order to modify the command. Let’s do this with the Register window.1.Choose View menu > Register . 2.Right-click the window caption (a).3.Modify the command, e.g. by adding the /SpotLight option: It will highlight changed registers.4.Click [ok] to execute the modified command.5.Click Single Step on the TRACE32 toolbar. Changed registers are highlighted immediately.(a)(b)Debugging the ProgramBasic Debug CommandsThe basic debug commands are available via the Run menu, the toolbar of the List window, the main toolbar, and via the TRACE32 command line.Single steppingis one of the basic debug commands.TRACE32 provides also more complex debug control commands. Y ou can step until an expression changes or becomes true.Example: Var.Step.Till i>11. single-steps the program until the variable i becomes greater than 11. Please note that TRACE32 uses a dot to denote decimal numbers.Step over function calls or subroutinesGo to the next code line written in the program listing Go Return / Go to the last instruction of the current functionUseful e.g. to leave loopsSingle StepStop the program executionGo / Start program executionGo Up / return to the caller functionStep till next unreached lineDebug ModesT ake a look at the state line at the bottom of the TRACE32 main window:6.On the toolbar of the Listwindow, clickMode to toggle the debug mode to HLL .The state line tells you:A The (symbolic) address of the current cursor position.The program counter (PC) is highlighted in gray.B The state of the debugger: stopped means program execution is stopped. Y ou can now, for example, inspect or change memory.C The state line displays the currently selected debug mode: The code display will beHLL (High Level Language) or ASM (assembler) or a MIX ed mode with HLL and its corre-sponding assembler mnemonic.AB CDebug mode HLLDebug mode MIXStep.7.ClickThe step you are taking is debug mode HLL goes to the next source code line.8.ClickMode again to toggle the debug mode to MIX.Step.9.ClickThis time, the step executes one assembler line.10.Right-click a code line, and then select Go Till.The program execution starts. It stops when the program reaches the selected code line.Displaying the Stack FrameFor the following example, let’s assume we have the following call hierarchy: main() calls func2() and func2() calls func1():Choose Show Stack in the Var menu. The Frame.view window displays the call hierarchy.•The /Locals option shows the local variables of each function.•The /Caller option shows a few source code lines to indicate where the function was called.This screenshot corresponds to the calling hierarchy shown above.BreakpointsVideo tutorials about breakpoints in TRACE32 are available here:/kb/articles/using-breakpoints-in-trace32Setting BreakpointsLet’s set a breakpoint to the instruction prime = i + i + 3 and the instruction k += prime1.Double-click a code line to set a program breakpoint.2.Make sure to click the white space in the code line, and not the code literal.All code lines with a program breakpoint are marked with a red vertical bar.T o set a breakpoint to an instruction that is not in the focus of the current source listing1.Choose Var menu > Show Function.The sYmbol.Browse.Function window opens.2.Select the function you are interested in e.g. sieve.The List window opens, displaying this function. This window is now fixed to the start address ofthe function sieve and does not move with the program counter cursor.Listing all Breakpoints1.Choose Break menu > List to list all breakpoints.The Break.List window opens, providing an overview of the set breakpoints.2.On the toolbar, clickGoto start the program execution. 3.When the program execution stops at a breakpoint, it is highlighted in the Break.List window.A Address of the breakpoint.B Breakpoint type.C Breakpoint method: SOFTware, ONCHIP or DISABLED.D Symbolic address of the breakpoint. Example:•sieve\11 means source code line 11 in function sieve .AB C DSetting Read/Write BreakpointsY ou can set a breakpoint that stops the program execution at a read or write access to a memory location(e.g. global variable). T o set a breakpoint on the array flags for instance, do a right mouse click on thearray name in the List window then select Breakpoints > Write.VariablesVideo tutorials about variable display in TRACE32 are available here:/kb/articles/variable-logging-and-monitoring-in-trace32Displaying VariablesLet’s display the variables flags, def, and ast.1.Choose Var menu > Watch...The Var.AddWatch window opens, displaying the variables known to the symbol database.2.Double-click the variable flags.The Var.Watch window opens, displaying the selected variable.steps:3. Alternative-In the Var.Watch window, click Watch, and then double-click the variables def and ast to add them to the Var.Watch window.-From a List window, drag and drop any variable you want into the Var.Watch window.-In a List window, right-click any variable, and then select Add to Watch window from the context menu.-If you want to display a more complex structure or an array in a separate window, choose Var menu >View.Displaying Variables of the Current Program Context1.Set the program counter (PC) to sieve() by typing at the TRACE32 command line:2.Choose Var menu > Show Current Vars .The Var.REF window opens, displaying all variables accessed by the current program context.3.Click Step on the TRACE32 toolbar to execute a few single steps. TheVar.REFwindow is updated automatically.Using the Symbol BrowserThe symbol browser provides an overview of the variables, functions, and modules currently stored in the symbol database.1.ChooseVar menu > Watch...The Var.AddWatch window lets you browse through the contents of the symbol database. Global variables are displayed in black and functions in gray. By double-clicking a function, its local variables are displayed.2.In the Var.AddWatch window, double-click func2.Register.Set PC sieve ;The command short form is: r.s pc sieveTo format the display of variables - global settings:1.Choose Var menu > Format.2.In the SETUP.Var window, make your settings. Decimal and Hex are useful global settings.TRACE32 applies your settings to all Var.view windows that you open afterwards.To format the display of an individual variable:1.At the command line, type: Var.view ast (The variable ast is included in this demo.)2.In the Var.view window, right-click ast, and then click Format.The Change Variable Format dialog opens.3.Select the Type check box to display the variable ast with the complete type information.4.Click Apply. The format of ast in the Var.view window is updated immediately.5.For more complex variable select TREE in the Change Variable Format dialog box.Click + and - to expandand collapse the tree.1.Double-click the variable value to modify the value. The Var.set command will be displayed in thecommand line. The short form of the command is V or v2.Enter the new value directly after the equal sign and confirm with [ok].MemoryDisplaying Memory1.To display a memory dump in a Data.dump window, do one of the following:-Choose View menu > Dump,-or click Memory Dump on the toolbar,-or, at the TRACE32 command line, type: Data.dumpY ou can also specify an address or symbol directly, e.g.: Data.dump flags2.In the Data.dump dialog, enter the data item, e.g. flags-Alternatively click to browse through the symbol database.3.In the Browse Symbols window, double-click the symbol flags to select it, and then click OK.Double-click flags.In the following screenshot, theData.dump window is called via the TRACE32 command line.There are different ways to define an address range:•<start_address>--<end_address> (SD is an access class)•<start_address>++<offset>Modifying Memory1.In a Data.dumpwindow, double-click the value you want to modify.A Data.Set command for the selected address is displayed in the command line. The short form of the command isD.S or d.s2.Enter the new value directly after %LE , and then confirm with [ok].(%LE stands for Little Endian).Data.dump SD:0x5530--SD:0x554FData.dump cstr1++0x1f /Byte ;start at cstr1 plus the next 0x1f bytesAccess Class + AddressHEX ASCIITraining Simulator and Demo Software | 21©1989-2023 L auterbach。

TRACE32系列仿真器介绍教程文件

TRACE32系列仿真器介绍教程文件

RTXC
pSOS
– ...
深圳旋极
TRACE32为何与众不同
五、FLASH,可擦写。全序列,任选择。
TRACE32支持FLASH在线编程,FLASH(厂家) 主要有:
AMD ATMEL MICRON
MOTOROLA
FUJISTU INTEL MITSUBISHI
MACRONIX
SHARP SST ST
TI
TOSHIBA…
既支持片外FLASH,也支持片内FLASH 支持8bit、16bit、32bit总线宽度
深圳旋极
TRACE32为何与众不同
六、测软件,辨好坏。查性能,算覆盖。
TRACE32具有独特的嵌入式软件测试功能: – 程序追踪(Trace)
程序流程 选择追踪... – 函数性能测试(Performance)
仿真控制模块Emulation Controller 系统控制模块System Controller
深圳旋极
TRACE32-ICE配置方案举例
例1:简洁型,针对8位单片机
ICExxx ECC8 SCU32
深圳旋极
TRACE32-ICE配置方案举例
例2:简洁型,针对32位单片机
ICExxx ECC32 SCU32
Zilog
Infineon ...
通用性,更换仿真模块就可调试不同的芯片
深圳旋极
TRACE32为何与众不同
三、编译器,款款宜。各平台,没问题。
TRACE32支持60种以上的编译器,主要有:
ARM Borland Tasking CAD-UL Diab-SDS
Greenhills
Hitech Hiware HP
运行时间 函数嵌套... – 代码覆盖分析(Coverage)

TRACE32 用户手册说明书

TRACE32 用户手册说明书

Support Addresses Release 02.2022TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Technical Support ........................................................................................................... Support Addresses .. (1)Addresses of Reps and Subsidaries (3)Version 09-Mar-2022 Addresses of Reps and SubsidariesArgentinaAnacom Eletronica Ltda.Mr. Rafael SoriceRua Nazareth, 807, BarcelonaBR-09551-200 São Caetano do Sul, SPPhone: +55 11 3422 4200FAX: +55 11 3422 4242EMAIL:******************.brAustraliaEmbedded Logic Solutions P/LMr. Ramzi KattanSuite 2, Level 3144 Marsden StreetParramatta NSW 2150Phone: +61 2 9687 1880FAX: +61 2 9687 1881EMAIL:*******************.auAustriaLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:**********************BelgiumT ritec Benelux B.V.Mr. Robbert de VoogtStationspark 550NL-3364 DA SliedrechtPhone: +31 184 41 41 31FAX: +31 184 42 36 11EMAIL:******************BrazilAnacom Eletronica Ltda.Mr. Rafael SoriceRua Nazareth, 807, BarcelonaBR-09551-200 São Caetano do Sul, SPPhone: +55 11 3422 4200FAX: +55 11 3422 4242EMAIL:******************.brCanadaLauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:*************************BeijingChinaLauterbach Technologies Co., LtdMr. Linglin HeBeijing OfficeA3,South Lishi Road, XiCheng DistrictBeijing 100037, P.R. ChinaPhone: +86 10 68023502FAX: +86 10 68023523EMAIL:*************************ShenzhenChinaLauterbach Technologies Co., Ltd1406/E Xihaimingzhu BuildingNo.1 Taoyuan Road, Nanshan DistrictShenzhen 518052, P.R. ChinaPhone: +86 755 8621 0671FAX: +86 755 8621 0675EMAIL:*************************SuzhouChinaLauterbach Technologies Co., LtdMr. Linglin HeHengyu Square, Rm 1207No. 188, Xing Hai StreetSuzhou, 215021 P.R. of ChinaPhone: +86 512 6265 8030FAX: +86 512 6265 8032EMAIL:*************************Czech.RepublicLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:**********************DenmarkNohau Danmark A/SMr. Flemming JensenHørkær 18, 3. SalDK-2730 HerlevPhone: +45 44 52 16 50FAX: +45 44 52 26 55EMAIL:****************EgyptLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:**********************FinlandNohau Solutions FinlandMr. Marko RepoT ekniikantie 14FI-02150 EspooPhone: +358 40 546 0142FAX: +358 9 2517 8101EMAIL:****************FranceLauterbach S.A.R.L.Mr. Soufian ElmajdoubEuroparc - Le Hameau B135 Chemin Des BassinsF-94035 Créteil CedexPhone: +33 1 49 56 20 30FAX: +33 1 49 56 20 39EMAIL:*************************GermanyLauterbach GmbHSales T eam GermanyAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:**********************GreeceLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:**********************HungaryLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:**********************India-BangaloreElectro Systems Associates Pvt. Ltd.Mr. G. V. GurunathamS-606, World Trade CenterMalleswaram West, No.26/1, Dr. Rajkumar Road India - Bangalore 560055Phone: +91 80 67648888FAX:EMAIL:***************************India-ChennaiElectro Systems Associates Pvt. Ltd.Mr. D. KannanNo.109 /59A , Ground FloorIV Avenue, Ashok NagarIndia - Chennai - 600 083 T amilnaduPhone: +91 98410 53251FAX:EMAIL:***************************India-DelhiElectro Systems Associates Pvt. Ltd.Mr. Arun RoyIndia - DelhiPhone: +91 98305 78843FAX:EMAIL:***************************India-HyderabadElectro Systems Associates Pvt. Ltd.Mr. C.V.M. Sri Ram MurthyManasa Ap./Flat No 3, Plot 533/3,No 3-5-7Vivekanandanagar Colony, KukatpallyIndia - Hyderabad 500 072Phone: +91 90084 76566FAX:EMAIL:***************************India-KolkataElectro Systems Associates Pvt. Ltd.Mr. Arun RoyIndia - KolkataPhone: +91 98305 78843FAX:EMAIL:***************************India-PuneElectro Systems Associates Pvt. Ltd.Mr. M. S. Vijendra KumarIndia - Pune - 411 016Phone: +91 98451 49926FAX:EMAIL:***************************IrelandLauterbach Ltd.Mr. Richard CopemanPhone: +44-118 328 3334FAX:EMAIL:*************************Itec Ltd.Mr. Mauri GottliebP.O.Box 10002IL-Tel Aviv 61100Phone: +972 3 6491202FAX: +972 3 6497661EMAIL:***************.ilItalyLauterbach S.r.l.Mr. Maurizio MenegottoRegus EasyPoint (Building F) 1st floorVia Caldera 21I-20153 MilanoPhone: +39 02 45490282FAX: +39 02 45490428EMAIL:************************JapanLauterbach Japan, Ltd.Mr. Yuji Mori3-8-8 ShinyokohamaKouhoku-ku, Nisso 16th BuildingY okohama-shi, Japan 222-0033Phone: +81 45 477 4511FAX: +81 45 477 4519EMAIL:*********************.jpLuxembourgT ritec Benelux B.V.Mr. Robbert de VoogtStationspark 550NL-3364 DA SliedrechtPhone: +31 184 41 41 31FAX: +31 184 42 36 11EMAIL:******************MalaysiaFlash TechnologyMr. Teo Kian HockNo 61, # 04-15 Kaki Bukit Av 1Shun Li Industrial ParkSGP-Singapore 417943Phone: +65 6749 6168FAX: +65 6749 6138EMAIL:***********************.sgLauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:************************* NetherlandsT ritec Benelux B.V.Mr. Robbert de VoogtStationspark 550NL-3364 DA SliedrechtPhone: +31 184 41 41 31FAX: +31 184 42 36 11EMAIL:******************ZealandNewEmbedded Logic Solutions P/LMr. Ramzi KattanSuite 2, Level 3144 Marsden StreetParramatta NSW 2150Phone: +61 2 9687 1880FAX: +61 2 9687 1881EMAIL:*******************.auNorwayNohau Solutions ABMr. Jörgen NilssonDerbyvägen 6DSE-21235 MalmoePhone: +46 40 592 206FAX: +46-40 592 229EMAIL:****************PolandQUANTUM Sp. z o.o.Mr. Aleksander Bilul. Jeleniogórska 654-056 WroclawPhone: +48 71 362 6356FAX: +48 71 362 6357EMAIL:****************.plPortugalCaptura Electronica SCCLMr. Juan Martinezc/Duero, 40 bajosE-08031 BarcelonaPhone: +34 93 429 57 30FAX:EMAIL:**********************RomaniaLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnPhone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:**********************RussiaRTSoftMr. Alexey IsaevNikitinskaya 3RUS-105037 MoscowPhone: +7 495 967 1505FAX: +7 495 742 6829EMAIL:******************.ruSingaporeFlash TechnologyMr. Teo Kian HockNo 61, # 04-15 Kaki Bukit Av 1Shun Li Industrial ParkSGP-Singapore 417943Phone: +65 6749 6168FAX: +65 6749 6138EMAIL:*******************.sgSouth Korea, Rep. of KoreaHancom MDS Inc.Mr. Chang Y oul Lee4FL. Hancom Tower49, Daewangpangyo-ro 644, Beon-gil,Bundang-gu Seongnam-si, Gyeonggi-do, 13493, ROKPhone: +82-31-627-3000FAX: +82-31-627-3100EMAIL:*********************Captura Electronica SCCLMr. Wenceslao Rodríguezc/Duero, 40 bajosE-08031 BarcelonaPhone: +34 93 429 57 30FAX:EMAIL:**********************SwedenNohau Solutions ABMr. Jörgen NilssonDerbyvägen 6DSE-21235 MalmoePhone: +46 40 592 206FAX: +46 40 592 229EMAIL:****************SwitzerlandJDT Jberg DatenT echnikMr. Andreas JbergZimmereistrasse 2CH-5734 Reinach AGPhone: +41 62 7710 886FAX:EMAIL:********************TaiwanSuperlink Technology Corp.Mr. Sulin Huang3F-8,No.77,Sec.1,Xintaiwu Rd.,Xizhi District, New Taipei City 22101, T aiwan, R.O.C.Phone: +886 2 26983456FAX: +886 2 26983535EMAIL:************************.twTunisiaLauterbach Consulting S.A.R.L.Mr. Khaled JmalRoute El Ain Km 3.5TN-3062 SfaxPhone: +216-31361061FAX: +216-74611723EMAIL:**********************T ektronik Muh. ve Tic. A.S.Mr. Hakan Y avuzCyberPlaza B-Blok, 702BBilkent06800 AnkaraPhone: +90 312 437 3000FAX: +90 312 437 1616EMAIL:*************************.tr UKLauterbach Ltd.Mr. Richard CopemanPhone: +44-118 328 3334FAX:EMAIL:*************************EastUSALauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:************************* W estUSALauterbach Inc.Mr. Bob Kupyn1111 Main Street, Suite 620USA-Vancouver, WA. 98660Phone: +1 503 524 2222FAX: +1 503 524 2223EMAIL:******************************。

TRACE32 在线帮助说明书

TRACE32 在线帮助说明书

Converter SPIRIT XML to PER Commands Release 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ...................................................................................................................... Peripheral Files .............................................................................................................................. Converter SPIRIT XML to PER Commands (1)Introduction (3)Main view (4)Component properties (7)Start processing (9)Version 09-Oct-2023 IntroductionThis document describes using SpiritXML - PER Converter. The executable file can be found in theTRACE32 installation directory under ~~/demo/tools/ipxact_converter.SpiritXML software is used to convert XML format data into a Perfile format data. The files describing the peripheral modules using XML standard are converted to a PER format compatible with TRACE32.Main view1.Project name & Output Perfile location.Name of the project schould be given in “Project name” field. Location where the perfile will begenerated should be given in the “Output” field.2.SpiritXML Schema Locations.Access directly from Internet:If this option is selected, SpiritXML Schema files are accessed directly from SPIRIT ConsortiumWebsite, each time the Perfile is generated. The oldest version available from this location is 1.2.Perfile generating may take long time if Internet connection is slow.Access from local directories:If this option is selected, SpiritXML Schema files are accessed from local directories listed below (Listof SpiritXML Schemas locations). T o add a new location, click on the “green plus”. T o remove aselected location, click on the “red minus”.3.Help.4.Perfile Header options:Generate header in output perfile:If this option is set, generated Perfile contains a header.Generate SpiritXML files summary after header:If this option is set, Perfile header contains information about SpiritXML files used to generate Perfile.Edit header content Button:Launch header content editor. In editoer is posible availlable variables changed to values whenheader is included to perfile.5.New Project. To create a new project, click on this icon or click on tab Project / New Project (Ctrl+n).6.Open Project. T o open the project, click on this icon or click on tab Project / Open Project(Ctrl+o).7.Save Project. To save the project, click on this icon or click on tab Project / Save Project (Ctrl+s).8.Add component. To add component, click on this icon or click on tab Components / Addcomponent (Ctrl+a).9.Start processing. T o start data converting, click on this icon or click on tab Perfil / Startprocessing (F7).10.Tips. In this field tips and advice are displayed.11.Bookmarks. In a “Project bookmark” are the main settings for the project. In the “Componentsbookmark” are settings for the components. In the “Messages bookmark” are information about XML to Perfile data conversion displayed.12.Add Component / Delete Component:T o add a new Component, click on the “green plus”. T o remove a selected Component, click on the “red minus”.13.Move Component Up / Move Component Down:T o move Component up, click on the “Up arrow”. T o move down, click on the “Down arrow”.14.Sort components dialog: Sorting options appears.15.Properties of selected component / Properties of all components.ponents dialog.In this window information about the conversion of data are displayed.Component propertiesSingle Component properties.In the "General" tab can be changed the following options : component name, path to the component xml file, base address, memory class and checkboxs settings.In the "Excluded from perfile” checkbox: Setting this option causes component to be skipped whengenerating perfile.In the "Automatically open tree with this component is loaded when perfile" checkbox: If enabled, thecomponent TRACE32 tree opens automatically after the peripheral file has been displayed.In the "Create button if data.dump register array size exceeds <value> items" checkbox: If enabled, register array of size exceeding the specified number of items will be replaced by data.dump button.On the "Layout Perfile" Y ou quantity of columns can be changed.In the "Decrease number of columns if tree width exceeds <value> characters" checkbox: If enabled, the number of columns displayed register of fields will be decreased if the width of the tree exceedes defined number of characters. This option prevents registers from the displayed fields to be not fit in narrow window, making the perfil unreadable.In the "Default formats of numeric values in bit fields: When selected, all register values of 1 to 5-bit-field which are not directly defined in XML, are displayed in decimal / hexadecimal / binary number format.T o restore the original settings, click on the "Restore default"All Component Properties. In this window, the settings are the same as for a single “Component properties”, but the changes are introduced for all components.In the dialog box after adding the components their settings can be checked and if necessary enter the next one.Start processingAfter all options are set, conversions can be started. T o do this click on the "green arrow" icon or tap F7 key.In the message window information about the conversion are displayed.Once data processing is completed, a message confirming perfile generation appears.Perfile is created at the location specified in the Output field.。

TRACE32系列仿真器介绍

TRACE32系列仿真器介绍
JTAG:边界扫描
–边界扫描来源于IEEE Std 1149.1,是由联合测 试行动小组(Joint Test Action Group)制定的 一种测试逻辑,所以又称JTAG标准。
–基本功能(必须实现)是边界扫描测试 – 调试功能(可选)
深圳旋极
常见的调试接口
OCDS – On Chip Debug Support – 由Infineon公司定义 – 有16Pin和40Pin两种形式
NEXUS – NEXUS来自IEEE-ISTO 5001标准 – 用于嵌入式微处理器调试 – 标准接口为5Pin – 可以加入用户定义的引脚 – 调试功能共有4级
深圳旋极
TRACE32-ICD 基本结构
典型构成: 1、Controller 2、Debugger 3、Debug Port
深圳旋极
winprintdatadump0x1000byteoptionparametersubcommandcommandprecommanddevicename所有命令都支持简略形式深圳旋极trace32的使用?supportforawiderangeofonchipdebuginterfaces?easyhighlevelandassemblerdebugging?interfacetoallcompilers?fastdownload?rtosawareness?interfacetoallhosts?displayofinternalandexternalperipheralsatalogicallevel?flashprogramming?hardwarebreakpointsandtriggerifsupportedbytheonchipdebuginterface?traceextensionavailable?multiprocessormulticoredebugging?softwaretrace?virtualanalyzer?usbethernetorparallelinterface深圳旋极trace32的使用?简单调试命令stepsinglestepovergonextgoreturngoupgonobreak深圳旋极trace32的使用?复合调试命令这类命令允许单步或全速运行程序直到满足某条件时停止stepchangerd1varstepchangehllexpressiongo

trace32仿真器使用教程+

trace32仿真器使用教程+

trace32仿真器使⽤教程+简介⼤家可能会对uTrace-ICD⽐较陌⽣,简单介绍⼀下,uTrace-ICD 是TRACE32-ICD的兼容机。

在这⾥我⾸先感谢国⼈的努⼒能让我⽤很少的RMB⽤上这么⾼端仿真器。

废话少说,下⾯我给⼤家介绍⼀下uTrace-ICD下具体实现Linux调试的具体过程。

⼤概介绍⼀下实现的具体原理,⾸先要有⼀块可⽤的⽬标板,我选⽤的是SMDK2410评估板。

编译环境是在虚拟VMware+RedHat9.0,调试环境是uTRACE。

在这⾥有个问题:就是在虚拟机下编译的arm linux内核如何传递给安装在Windows下的uTRACE。

我⽤的⽅法就是通过SMB服务器。

在Redhat9.0下配置SMB Server将arm linux的源码包通过⽹络共享的⽅式共享给Windows XP。

在XP下的Windows 资源管理器中将Redhat9.0共享的arm linux源码包影射为本地的⼀个虚拟盘⽐如是:Z盘。

这样uTRACE就可以象操作本地盘⼀样来读取Redhat9.0中的arm linux源码包以及编译⽣成的内核映像及内核的符号表。

对于uTRACE调试器来说,需要的东东就是包含调试信息的arm linux的内核映像vmlinux。

在这⾥要注意"包含调试信息",arm linux内核配置选项默认可能是不包含调试信息,如果将没有包含调试信息的vmlinux供uTRACE使⽤是实现不了内核源码级调试的。

所以我们在配置arm linux内核时⼀定要将包含内核调试信息的选项选上。

具在"kernel hacking"下。

其次uTRACE调试器需要的就是arm linux内核源码树。

调试器的⼯作原理就是通过给定的地址查找对应的符号表找到对应的符号,以及符号所在⽂件的路径信息,⾏信息等,近⽽找到源程序所对应的函数或变量。

简单介绍了uTRACE调试的基本原理,接下来,具体介绍⼀下arm linux内核,驱动,及应⽤层源码级调试的具体实现过程。

TRACE32软件更新手册说明书

TRACE32软件更新手册说明书

!!!-m a n u a l _s t a t e -!!!TRACE32 Online Help TRACE32 Directory TRACE32 IndexTRACE32 Technical Support ........................................................................................................... Software Updates ..........................................................................................................................1 About this Document .................................................................................................................2 Do you have a valid Software License Key? ...........................................................................3 Temporary License Keys3 TRACE32 Software Updater ......................................................................................................4 Prerequisites4 Supported Operating Systems5 How to start the TRACE32 Software Updater 5 Contacting Support7 Manual Installation of Software Updates .................................................................................8 Subdirectory Structure8 Update of the Host Driver Software ..........................................................................................9 USB Interface9 Firmware Update ........................................................................................................................10 Serial Numbers ...........................................................................................................................11!!!-m a n u a l _s t a t e -!!!Version 25-May-2021About this DocumentThis document describes how to update the TRACE32 software installation. There are two methods to make a TRACE32 software update:1.Using the TRACE32 Software Updater:The TRACE32 Software Updater automatically determines if the selected TRACE32 installation is outdated, and installs the latest release for all installed architectures. This can be used if the installed TRACE32 version is newer than “August 2012”.2.Make an update manually:This can be done by downloading an update package from /update.html or requesting an update from **********************.The detailed steps are described in “Manual Installation of Software Updates” (updates.fm).!!!-m a n u a l _s t a t e -!!!Do you have a valid Software License Key?The most current update of the TRACE32 software can only be used if at least one of the following requirements is fulfilled:•The software guarantee for the development system is still valid. A software guarantee exists for 1 year after the purchase of the system.•A valid software maintenance contract exists for the TRACE32 system.If none of these requirements is fulfilled, the new software version can only be used in a time limited demo mode.Y ou can check the status of your maintenance contracts in the VERSION window which can be opened from the menu Help > About TRACE32 or by typing the command LICENSE.state in the TRACE32 command line .Please refer to the chapter “Serial Numbers”, page 11 and /update.html for more information.Temporary License KeysT o test the most current TRACE32 software, you can get a temporary license key valid for 1 month from:/register.htmlPlease use the license serial number displayed in the LICENSE.state window to get the temporary key .!!!-m a n u a l _s t a t e -!!!TRACE32 Software UpdaterThe TRACE32 Software Updater performs an update of one TRACE32 system directory to the latest release version.After a successful update made by the TRACE32 Software Updater, the installation will contain all the latest files, including binaries, flash algorithms, kernel awarenesses, peripheral files, menu files, and demo scripts.PrerequisitesThe following prerequisites must be met to use the TRACE32 Software Updater:• A TRACE32 installation from release R.2012.08 or newer.•Disc space around 3 times the size of the installation to be updated.•Write access to all files in the TRACE32 installation.•Internet access during the whole update process.A proxy setup might be required if you are working with a proxy .NOTE:Make sure to keep all files from the TRACE32 system directory closed during the update process.NOTE:If you have an installation containing non used files, it is highly recommended that you make a cleanup before performing the update in order to reduce the update time, and the used disc space.!!!-m a n u a l _s t a t e -!!!Supported Operating SystemsThe TRACE32 Software Updater supports the following operating systems:How to start the TRACE32 Software UpdaterThe TRACE32 Software Updater can be started using the menu Help:It is also possible to start the TRACE32 Software Updater application directly . The client can be found at <TRACE32_install_path>/bin/<os>/t32update[.exe] Example:The TRACE32 Software Updater can also be downloaded from the following link: /update.htmlThe TRACE32 Software Updater will automatically update itself to the latest version if this is required.Operating System Requirement Microsoft Windows Windows 7 or newer Linux GTK+ 2.6 or higher MacOSOS X 10.5 or higherC:\T32\bin\windows64\t32update.exe!!!-m a n u a l _s t a t e -!!!Update ProcessAfter starting please follow the instructions of the wizard.Command Line ParametersThe TRACE32 Software Updater accepts the following command line parameters:•--t32sys="<path>": defines the TRACE32 directory to be updated Example:This parameter may be passed only once, since the update can be done on a unique TRACE32 system directory.•--help : shows the help messageDowngrade PossibilityThe TRACE32 Software Updater will show a warning about files that will be downgraded during the update process. This is the case, if the installation contains files newer than the official release, e.g. from an interim software update package received per e-mail.The user can choose to cancel or continue the update process.t32update.exe --t32sys="C:\T32"!!!-m a n u a l _s t a t e -!!!License CheckThe TRACE32 Software Updater will check the validity of the maintenance license if it started from the TRACE32 menu, in this case, if the new release is not valid for your license key, there will be a warning.The license detection is based on the connected debugger, so it is possible that the TRACE32 Software Updater does not detect all the expired maintenance licenses compared to the latest TRACE32 release.BackupThe TRACE32 Software Updater creates a backup directory containing all replaced files. The path of this backup directory will be shown in the update process, as well as in the log file. Note that there is no automatic roll back of the backup.Log FileA log file containing information about the whole update process is created in your temporary directory.A link referring to this log file will be shown when the update ends.Contacting SupportFor any support request, please attach your log file and send an e-mail to **********************.It is also recommended to include detailed system information about your TRACE32 configuration using the TRACE32 menu Help > Support > System Information...!!!-m a n u a l _s t a t e -!!!Manual Installation of Software UpdatesThe minimum required TRACE32 version for using the TRACE32 Software Updater is R.2012.08. Older TRACE32 installations have to be updated manually .Moreover, updating TRACE32 to an interim version (e-mail based updates) has to be performed manually .To manually install a software update:1.Backup you existing TRACE32 installation 2.Close all TRACE32 instances3.Unpack the update archive into the TRACE32 installation directory (e.g. C:\T32) overwriting existing files4.Start TRACE32 as usual and verify if the new software version has been installed correctly by checking the version information from the TRACE32 menu Help > About TRACE32...A conflict with regards to the software version might occur, if the TRACE32 software is installed for more than one processor architecture under the same TRACE32 system directory . Since a software updateoverwrites all files that are used from all processor architectures in common, it is recommended to perform a software update for all architectures. Otherwise the start of the software for a not-updated processorarchitecture might result in a version conflict, since the used TRACE32 files do not match. Please be aware, that in this case a valid software guarantee/software maintenance contract is needed for all used TRACE32 systems.Subdirectory StructureThe internal subdirectory structure of the TRACE32 software update packages has been changed since software version November 2010. Starting from this version, the TRACE32 executables are located inside a subdirectory bin\<operating_systemtype>, e.g. bin\windows64.For older installations the executable must be moved manually to the TRACE32 system directory e.g. C:\T32 or the shortcut property must be corrected. NOTE:Software update packages are not full installations. By unpacking the update archive the most important TRACE32 system files are overwritten.NOTE:We recommend to modify the shortcut property , due to the fact that this kind of subdirectory structure will be used from the installer in the future, too.!!!-m a n u a l _s t a t e -!!!Update of the Host Driver SoftwareUSB InterfaceIf the most current TRACE32 software asks you to update the USB driver proceed as follows:1.Go to Control Panel -> System -> Device Manager -> TRACE32 Devices 2.Select Lauterbach PODBUS USB Controller3.In the Lauterbach PODBUS USB Controller Properties window select Driver4.Click Update Driver..!!!-m a n u a l _s t a t e -!!!Firmware UpdateFiles for updating the firmware of the TRACE32 modules are available in the TRACE32 installation directory under ~~/demo/etc/firmware/The script icd_fire_firmwareupdate.cmm should be used for updating the firmware of a PowerDebug module.DO icd_fire_firmwareupdate.cmm!!!-m a n u a l _s t a t e -!!!Software Updates | 11©1989-2021 L auterbach G mbH Serial NumbersPlease check the field license serial number in the LICENSE.state window.The serial number consists of the device identifierplus an 11 digit number.For TRACE32-ICD, the expiration date of the software guarantee is also implicitly part of the serial number. The first 6 digits after the letters C, F or I represent the delivery date.Example: if the serial number is C 19020012345 (<year><month>00), then the TRACE32-ICD system was delivered in February 2019 so the software guarantee is valid until February 2020.If the field valid until end is empty when you enter the LICENSE.state command use also these first 6 digits of the license serial number to find out when your software guarantee will expire.For device identifiers other than C, F and I, the only way to see the expiration date of the softwareguarantee/software maintenance and the license serial number is to use the LICENSE.state command.Device IdentifierCTRACE32-ICD MROM Monitors for serial access licensed via the ethernet address of the host.DROM Monitors for serial access licensed via a USB dongle TTemporary license for all TRACE32 tools L Floating license for software only products。

trace32使用手册-图文

trace32使用手册-图文

trace32使用手册-图文Trace32是一款功能强大的实时调试和跟踪工具,它支持多种处理器和微控制器的开发和调试。

它具有丰富的调试功能和直观的图形用户界面,可帮助开发人员快速定位和解决软件缺陷。

本文将详细介绍Trace32的使用方法,包括环境配置、调试基本操作以及常用命令。

一、环境配置在开始使用Trace32之前,我们需要进行一些环境配置。

首先,我们需要将Trace32安装到开发计算机上。

在安装完成后,我们需要配置Trace32与目标设备的连接。

具体步骤如下:1. 连接目标设备的调试接口和开发计算机的引导接口。

这样,我们就可以通过Trace32连接到目标设备。

2. 启动Trace32,并选择"Connect"选项。

然后,选择适配器和目标设备的连接方式。

3.配置连接选项,包括目标设备的型号和调试接口。

4. 完成连接配置后,点击"Connect"按钮,Trace32将尝试与目标设备建立连接。

二、调试基本操作Trace32提供了一系列的调试工具和选项,可以帮助开发人员定位和修复软件错误。

下面是一些常见的调试操作:2. 设置断点。

Trace32允许我们在软件的特定位置设置断点,以便在执行到断点位置时暂停软件运行。

我们可以通过命令行或图形界面设置断点,以及设置条件断点和硬件断点。

3.单步调试。

当软件执行到断点或者处于暂停状态时,我们可以使用单步调试功能,逐条指令地执行软件。

这样,我们可以更加详细地了解软件的执行过程,并分析软件的状态和变量值。

4. 查看寄存器和变量值。

Trace32允许我们查看目标设备上的寄存器和变量的值。

我们可以通过Trace32的寄存器窗口或变量窗口查看这些值,并在调试过程中对这些值进行修改。

5. 追踪函数调用和函数返回。

Trace32可以追踪函数的调用和返回过程,以帮助开发人员理解软件的执行流程和函数调用关系。

6. 监视程序性能。

Trace32可以监视程序的性能指标,如执行时间、内存占用等。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Trace32-ICD使用说明
作者:***
日期:2008-8-11
版本:V-1.0
一、编写目的
通过对该文档的阅读,能够掌握Trace32-ICD的软、硬件安装,使用Trace32-ICD进行flash擦除,程序下载,并熟悉在线调试。

二、T RACE32硬件的连接
Trace32的硬件连接如下图所示:
图2.1
注意事项:
电源打开/关闭时的正确顺序:
打开:先调试器,再目标机。

关闭:先目标机,再调试器。

三、TRACE32软件的安装
3.1 TRACE32-ICD软件包安装
1、首先获取安装软件包,包括:Trace32安装包和USB Driver。

2、安装Trace软件包,运行..\ trace32\setup.bat批处理文件或..\trace32\bin\setup\setup.exe文件,系统自动安装,在安装过程中进行如下选择。

图 3.1 图3.2
图3.3
其他选项基本默认。

3.2 USB驱动安装
正确连接Trace后,系统会自动提示发现硬件需要进行驱动。

此时选择驱动程序所在目录。

路径为..\ trace32\bin。

如图3.4所示。

图3.4
四、Flash的擦除与下载程序
由于手机在下载版本过程中死机或掉电造成手机无法正常启动,并且使用我们单位的ZXPST与QPST都无法进行版本下载,并且QXDM和ZXPST通过COM1接口也无法找到手机,于是无法下载。

在这种情况下我们可以使用Trace32-ICD进行Flash的擦除和程序下载。

4.1 设置环境
CPU环境设置在SYStem窗口,SYStem窗口提供所有CPU特定的设置。

使用CPU菜单中的System Settings…打开SYStem窗口如图4.1所示。

需要配置主要包括CPU、时钟和UP加电,CPU选择ARM926EJ,时钟JtagClock选择
Ttck,然后进行加电UP,如果连接一切都正常,设置这几项就可以了。

如图4.1所示:
图4.1
注意事项:如果UP不上出现如下错误emulation debug port fail,说明硬件连接不正确。

4.2 Flash的擦除
TRACE32扩展工具的全部命令,程序执行命令,条件命令和输入/输出命令都可以作为批处理文件命令。

批处理文件的默认扩展名是“.cmm”。

使用CMM文件擦除Flash,菜单选择File---Run Batchfile 然后打开CMM文件,如:erasechip_TRACE32.cmm执行批处理文件进行擦除。

如图4.2所示。

图4.2
注意事项:1、并不是所有下载程序前都需要擦除Flash。

2、如果擦除后还不能正确下载程序,请多次擦除再进行下载。

4.3 下载程序
执行CMM文件如jflash.cmm文件,然后选择要下载程序的版本,这里可以是elf文件和bin文件,如果选择Edit BatchFile,可以通过在行前加入注释符“;”来决定选择那种文件。

如下设置就是选择.elf文件,如图4.3所示。

;d.load.binary ..\..\build\ms\bin\&filename\all.mbn
d.load.elf ..\..\build\ms\&filenam
e.elf /include
图4.3
注意事项:在擦除Flash后下载程序,如果下载程序不是全版本可能出现下载程序后仍然不能开机,请再下载全版本的Bin进行试验或下载nv。

五、调试程序
5.1 load elf文件
首先把与手机中相同版本的.elf文件load到Trace32中,操作如图5.1所示。

图5.1
5.2快速定位到函数
执行操作View----Symbols----BrowseFunctions。

如图5.2所示。

图5.2
在弹出的窗体中输入要定位的函数如WMSAPP_FileInit,就能快速定位到该函数,通过窗口中Mode按钮,在混合(MIX)和高级语言(HLL )调试模式之间切换,WMSAPP_FileInit 所在文件源程序如图5.3所示。

图5.3
注意事项:如果无法显示源文件内容,说明没有正确指定源程序所在路径,在命令行输入如下命令:y.spath.setRecursedir e:\code 其中e:\code为源程序所作路径。

5.3断点设置
在默认情况下ICD调试器使用软件断点。

当一个软断点被设到一条指令,一条特殊的指令将代替地址上的代码。

例如:TRAP,它停止实时执行并返回控制到片上调试系统。

这种方法要求断点位置在RAM中,如果您的程序运行在RAM上,软件断点的数目将没有限制。

大多数处理器类型(除6833x and 6834x)都提供一些片上(onchip)断点。

即使程序不能运行在RAM上,TRACE32-ICD也可以使用这些断点对程序进行程序断点和侦察断点的设置。

而我们的手机程序都不是运行在RAM上,而是运行在FLASH中。

所以不能直接使用软件断点。

我们只能设置片上断点。

返回到程序窗口,双击您要设置的一个程序断点所在的代码行。

设置了程序断点的所有的代码行有一个小黑杠作为标记。

因为调试器在默认情况下使用软件断点,但您必须告诉调试器该使用片上断点。

我们
通过命令MAP.Bonchip指定断点为片上断点,或者通过Break---Implementation进入配置窗体,在Program中选择Onchiip,一个程序或是侦察断点被设置在确定的地址范围内的时候,调试器应该使用一个片上断点。

我们最多只能设置两个onchip断点,当设置的断点数目超过处理器能够提供的片上断点数目时,将发生错误。

通过Break----List可以查看当前已经设置的断点。

如图5.4所示。

图5.4
5.4程序调试跟踪
调试跟踪主要包括如下几个方面:Step、Step Over Call、Go Next、Go Return、Go Up、Go Till、Go、Break。

如图5.5所示。

Step:单步执行程序。

Step Over Call:跳出调用函数。

Go Next:执行下一条语句,主要用来跳出循环。

Go Return:执行到函数的最后一条语句。

Go Up:返回到调用它的函数。

Go Till:程序将开始执行。

当程序运行到所选择的代码行,它将停止。

Break:退出。

如果程序运行在RAM上或是CPU提供片上断点,Go Next, Go Return 和Go Up这些命令才可使用。

图5.5
举例:如图5.6所示在程序12929行设置断点,使用go命令,把鼠标放到变量处,就能够查看该变量的值。

图5.6
六、参考文档
1、Trace 入门.ppt
2、80-V6107-1_Rev_A_Debug_Troubleshoot.pdf
3、OPENice_Spider_edu_doc_Chinese20061115.ppt
4、ICD 指南手册.ppt
5、trace32icd training.ppt。

相关文档
最新文档