TRACE32SimulatorforARM

合集下载

Trace32 simulator For arm

Trace32  simulator For arm

Simulator for ARM and XSCALETRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................!ICD In-Circuit Debugger ................................................................................................................!Software Simulator Target Guides ...........................................................................................!Simulator for ARM and XSCALE (1)Quick Start of the Simulator (5)Operation (7)Peripheral Simulation (7)Troubleshooting (8)FAQ8 Memory Classes9 Virtual Terminal9 Semihosting10 Coprocessors11ARM Specific SYStem Commands (12)SYStem.Mode Establish the communication with the simulator12 SYStem.CPU Select the used CPU13 SYStem.CpuAccess Run-time memory access (intrusive)13 SYStem.MemAccess Run-time memory access14 SYStem.Option Alignment Enable alignment exceptions15 SYStem.Option BigEndian Define byte order (endianess)15 SYStem.Option DisMode Define disassembler mode16 SYStem.Option MMU Debugging of multi-spaced applications16 SYStem.RESetOut CPU reset command for ARM simulator16Support (18)Available Tools18 ARM718 ARM925 ARM1028 ARM1128 Compilers28 Realtime Operation System30 Debuggers30Products (32)Product Information32 Order Information32Simulator for ARM and XSCALEVersion June, 22 2005For general informations about the In-Circuit Debugger refer to the ‘Software Simulator User’s Guide’. All general commands are described in ‘IDE Reference Guide’ and ’General Reference Guide’.Quick Start of the SimulatorStarting up the simulator is done as follows:1.Select the device prompt for the ICD Debugger and reset the system.The device prompt B:: is normally already selected in the command line. If this is not the case enter B:: to set the correct device prompt. The RESet command is only necessary if you do not start directly after booting the TRACE32 development tool.2. Specify the CPU specific settings. The default values of all other option are set in such a way that it should be possible to work without modification. Please consider that this is probably not the best configuration for your target.3. Enter debug mode.This command resets the CPU and enters debug mode. After this command is executed it is possible to access memory and registers.4. Load the program.The format of the Data.LOAD command depends on the file format generated by the compiler. Refer to Supported Compilers to find the command, that is necessary for your compiler.A detailed description of the Data.LOAD command and all available options is given in the reference guide.5. Startup ExampleA typical start sequence is shown below. This sequence can be written to an ASCII file (script file)and executed with the command DO <filename>. b::RESetSYStem.CPU <cputype >SYStem.UpData.LOAD.format <filename >load program and symbolsb::Select the ICD device prompt WinClearClear all windows SYStem.CPU <cpuname>Select CPU typeSYStem.Up Reset the target and enter debug mode Data.LOAD.format <filename>Load the applicationRegister.Set pc main Set the PC to function mainData.List *)Open source code windowRegister *)Open register windowVariable.Local *)Open window with local variables *) These commands open windows on the screen. The window position can be specified with the WINPOS command.OperationFor more information see ‘Software Simulator User’s Guide’Peripheral SimulationFor more information see ‘API for Software Simulators’TroubleshootingFAQ•No information available•Memory ClassesThe following ARM specific memory classes are available.Memory Class DescriptionP Program MemoryD Data MemorySP Supervisor Program Memory (privileged access)UP User Program Memory (non-privileged access)SR Supervisor ARM Memory (privileged access)ST Supervisor Thumb Memory (privileged access)UR User ARM Memory (non-privileged access)UT User Thumb Memory (non-privileged access)U User Memory (non-privileged access)S Supervisor Memory (privileged access)R ARM MemoryT Thumb MemoryICE ICE Breaker Register (debug register; ARM7, ARM9)C14Coprocessor 14 Register (debug register; ARM10, ARM11)C15Coprocessor 15 Register (if implemented)ETM Embedded T race Macrocell Registers (if implemented)VM Virtual Memory (memory on the debug system)USR Access to Special Memory via User Defined Access RoutinesE Run-time memory access(see SYStem.CpuAccess and SYStem.MemAccess)T o access a memory class write the class in front of the address.Example: Data.dump ICE:0--3Normally there is no need to use the following memory classes: P, D, SP, UP, SR, ST, UR, UT, U, S, R, or T.The memory class is set automatically depending on the setting of SYStem.Option DisMode.Virtual TerminalThe command TERM opens a terminal window which allows to communicate with the ARM core over the ICEbreaker Debug Communications Channel (DCC). All data received from the comms channel aredisplayed and all data inputs to this window are sent to the comms channel. Communication occurs byte wide or up to four bytes per transfer. The four bytes ASCII mode (DCC4A) does not allow to transfer the byte00. Each non-zero byte of the 32bit word is a character in this mode. The four byte binary mode (DCC4B)can be used to transfer non-ascii 32bit data (e.g. to or from a file). The three bytes mode (DCC3) allows binary transfers of up to 3 bytes per DCC transfer. The upper byte defines how many bytes are transfered (0=one byte, 1= two bytes, 2=three bytes). This is the preferred mode of operation, as it combines arbitrary length messages with high bandwidth. The TERM.METHOD command selects which mode is used (DCC, DCC3, DCC4A or DCC4B).The communication mechanism is described e.g. in the ARM7TDMI data sheet in chapter 9.11. Only three move to/from coprocessor 14 instructions are necessary.The TRACE32 demo/arm/etc/terminal directory contains the file TERM.CMM which demonstrates how the communication works.SemihostingThe command TERM.GATE opens a terminal window which allows to support ARM compatiblesemihosting. The communication can either be done by stopping the target at the SWI or by using the DCC interface channel - which provides non-stop operation of the target.The SWI emulation mode requires to stop the target at the SWI exception vector. On ARM7 this can be done only with an onchip or software breakpoint at location 8. On other ARM cores it can be done by enabling the ICEbreaker breakpoint at the SWI vector (TrOnchip.Set SWI ON). The terminal must be set to the ARMSWI method (TERM.METHOD ARMSWI). The handling of the SWI is only active when the TERM.GATE window is existing. An example can be found in demo/etc/arm/semihost/swisoft.cmm.The DCC communication mode requires an target agent for the SWI. The communication is done in the DCC3 method of the TERM command. An example and the source of the SWI agent can be found in demo/ etc/arm/semihost/swidcc.cmm.CoprocessorsIt is not possible to access coprocessors which are not included in an ARM macrocell from debug mode.This means all coprocessors which are added to ARM cores by customers can not be accessed from debug mode.The following coprocessors can be accessed if available in the processor:Coprocessor 14. Please refer to the chapter Virtual Terminal and to your ARM documentation for details.Coprocessor 15, which allows the control of basic CPU functions. This coprocessor can be accessed with the access class C15. For the detailed definition of the CP15 registers please refer to the ARM data sheet.The CP15 registers can also be controlled in the PER window.The TRACE32 address is composed of the CRn, CRm, op1, op2 fields of the corresponding coprocessor register command<MCR|MRC> p15, <op1>, Rd, CRn, CRm, <op2>BIT0-3:CRn, BIT4-7:CRm, BIT8-10:<op2>, BIT12-14:<op1>is the corresponding TRACE32 address (one nipple for each field)ARM Specific SYStem CommandsSYStem.Mode Establish the communication with the simulator Format:SYStem.Mode <mode><mode>:DownNoDebugGoUpDefault: Down. Selects the target operating mode.Down The CPU is in reset. Debug mode is not active. Default state and state after fatalerrors.NoDebug The CPU is running. Debug mode is not active. Debug port is tristate. In thismode the target should behave as if the debugger is not connected.Go The CPU is running. Debug mode is active. After this command the CPU can bestopped with the break command or if any break condition occurs.Up The CPU is not in reset but halted. Debug mode is active. In this mode the CPUcan be started and stopped. This is the most typical way to activate debugging.If the mode “Go” is selected, this mode will be entered, but the control button in the SYStem window jumps to the mode “UP”.SYStem.CPU Select the used CPU Format:SYStem.CPU <cpu><cpu>:ARM7TDMI | ARM740TD | ... (JTAG Debugger ARM7)ARM9TDMI | ARM920T | ARM940T | ... (JTAG Debugger ARM9)ARM1020E | ARM1022E | ARM1026EJ | ... (JTAG Debugger ARM10)ARM1136J | ARM1136JF | ... (JTAG Debugger ARM11)JANUS2 (JTAG Debugger Janus)Selects the processor type. If your ASIC is not listed, select the type of the integrated ARM core. SYStem.CpuAccess Run-time memory access (intrusive) Format:SYStem.CpuAccess Enable |DeniedDefault: Denied. For the ARM7 and the ARM9 onchip breakpoints can always be set while programexecution is running.SYStem.MemAccess Run-time memory access Format:SYStem.MemAccess <mode><mode>:CPUDeniedDefault: Denied.If SYStem.MemAccess is not Denied, it is possible to to read from memory, to write to memory and to set software breakpoints while the CPU is executing the program. This requires one of the following monitors.CPU A run-time memory access is made without CPU intervention whilethe program is running. This is only possible on the instruction setsimulator.Denied No memory access is possible while the CPU is executing theprogram.If specific windows, that display memory or variables should be updated while the program is running select the memory class E: or the format option %E.Data.dump E:0x100Var.View %E firstSYStem.Option Alignment Enable alignment exceptions Format:SYStem.Option AlignmentCauses the processor to go into a DAbort exeception for any unaligned access. Otherwise the data will be handled according to the ARM core specification.SYStem.Option BigEndian Define byte order (endianess) Format:SYStem.Option BigEndian [ON | OFF]Default: OFF. This option selects the byte ordering mechanism. For correct operation the following three settings must correspond:•this option•the compiler setting (-li or -bi compiler option)SYStem.Option DisMode Define disassembler mode Format:SYStem.Option DisMode <option><option>:AUTOACCESSARMTHUMBThis command specifies the selected disassembler. Default: AUTO.AUTO The information provided by the compiler output file is used for thedisassembler selection. If no information is available it has the samebehavior as the option ACCESS.ACCESS The selected disassembler depends on the T bit in the CPSR or onthe selected access class. (e.g. Data.List SR:0 for ARM mode orData.List ST:0 for THUMB mode).ARM Only the ARM disassembler is used (highest priority).THUMB Only the THUMB disassembler is used (highest priority). SYStem.Option MMU Debugging of multi-spaced applications Format:SYStem.Option MMU [ON | OFF]Default: OFF. Debugging of multi-spaced applications. Extends the address scheme of the debugger to include memory spaces (16:32 address format). The option is not required when the MMU is doing a static address translation.SYStem.RESetOut CPU reset command for ARM simulator Format:SYStem.RESetOutSpecial reset command for ARM simulator.SupportAvailable ToolsARM7C P UI C EF I R EI C D D E B U GI C D M O N I T O R I C D T R A C EP O W E R I N T E G R A T O RI N S T R U C T I O N S I M U L A T O R AD20MSP430YES YES YES AD6522YES YES YES AD6526YES YES YES AD6528YES YES YES AD6529YES YES YES AD6532YES YES YES ADUC7020YES YES YES ADUC7021YES YES YES ADUC7022YES YES YES ADUC7024YES YES YES ADUC7025YES YES YES ADUC7026YES YES YES ADUC7027YES YES YES ARM710TYES YES YES YES ARM710T -AMBA YES YES YES YES YES ARM720TYES YES YES YES ARM720T -AMBA YES YES YES YES YES ARM740TYES YES YES YES ARM740T -AMBA YES YES YES YES YES ARM7TDMIYES YES YES YES YES YES ARM7TDMI-AMBA YES YESYES YES YES YES ARM7TDMI-S YES YES YESYES AT75C220YES YES YES AT75C310YES YES YES AT75C320YES YES YES AT76C501YES YES YES AT76C502YES YES YES AT76C502A YES YES YES AT76C503YES YES YES AT76C503A YES YES YES AT76C510YESYESYESAT76C551YES YES YES AT76C901YES YES YES AT78C1501YES YES YES AT91F40416YES YES YES AT91F40816YES YES YES AT91FR40162YES YES YES AT91FR4042YES YES YES AT91FR4081YES YES YES AT91M40100YES YES YES AT91M40400YES YES YES AT91M40403YES YES YES AT91M40800YES YES YES AT91M40807YES YES YES AT91M42800A YES YES YES AT91M43300YES YES YES AT91M55800A YES YES YES AT91M63200YES YES YES AT91R40008YES YES YES AT91R40807YES YES YES AT91SC321RC YES YES YES BC6911YES YES YES BERYLLIUM YES YES YES BU7611AKU YES YES YES CBC32XXA YES YESYES CDC3207G YES YES YES YES CDC3272G YES YES YES YES CDC32XXG YES YES YES CDL-82YES YES YES CDMAX YES YES YES CEA32XXA YES YES YES CL-PS7110YES YES YES CL-PS7111YES YES YES CL-PS7500FE YES YES YES CL-SH8665YES YES YES CL-SH8668YES YES YES CLARITY YES YES YES CS22210YES YES YES CS22220YES YES YES CS22230YES YES YES CS22250YES YES YES CS22270YES YES YES C I C F I I C D I C M I C T R P I N I N S ICS89712YES YES YES CSM5000YES YES YES CSM5200YES YES YES CX81210YES YES YES CX81400YES YES YES D5205YES YES YES D5313YES YES YES D5314YES YES YES EP7209YES YES YES EP7211YES YES YES EP7212YES YES YES EP7309YES YES YES EP7311YES YES YES EP7312YES YES YES EP7339YES YES YES EP7407YES YESYES GEMINIYES YES YES YES GMS30C7201YES YES YES GP4020YES YES YES HELIUM 100YES YES YES HELIUM 200YES YES YES HELIUM 210YES YES YES HMS30C7202YES YES YES HMS31C2816YES YES YES HMS39C70512YES YES YES HMS39C7092YES YES YES IXP220YES YES YES IXP225YES YES YES KS17C40025YES YES YES KS17F80013YES YES YES KS32C61100YES YES YES KS32P6632YES YES YES L64324YES YES YES L7200YES YES YES L7205YES YES YES L7210YES YES YES LH75400YES YES YES LH75401YES YES YES LH75410YES YES YES LH75411YES YES YES LH77790YES YES YES C I C F I I C D I C M I C T R P I N I N S ILH79520YES YES YES LITHIUMYES YES YES LOGIC CBP3.0YES YES YES LOGIC CBP4.0YES YES YES LOGIC L64324YES YES YES LPC2104YES YES YES YES LPC2105YES YES YES YES LPC2106YES YES YES YES LPC2109YES YES YES YES LPC2112YES YES YES YES LPC2114YES YES YES YES LPC2119YES YES YES YES LPC2124YES YES YES YES LPC2129YES YES YES YES LPC2131YES YES YES YES LPC2132YES YES YES YES LPC2138YES YES YES YES LPC2194YES YES YES YES LPC2210YES YES YES YES LPC2212YES YES YES YES LPC2214YES YES YES YES LPC2290YES YES YES YES LPC2292YES YES YES YES LPC2294YES YES YES YES M4641YES YES YES MAC7101YES YES YES YES MAC7111YES YES YES YES MAC7116YES YES YES MAC7121YES YES YES YES MAC7131YES YES YES YES MAC7141YES YES YESYES MKY -82A YES YES YES MKY -85YES YES YES ML670100YES YES YES ML671000YES YES YES ML674000YES YES YES ML674001YES YES YES ML674080YES YES YES ML675001YES YES YES ML675200YES YES YES ML675300YES YESYES C I C F I I C D I C M I C T R P I N I N S IML67Q2300YES YES YES ML67Q2301YES YES YES ML67Q4002YES YES YES ML67Q4003YES YES YES ML67Q4100YES YES YES ML67Q5002YES YES YES ML67Q5003YES YES YES ML67Q5200YES YES YES ML67Q5300YES YES YES ML70511LA YES YES YES ML7051LA YES YES YES MN1A7T0200YES YES YES MODEM YES YES YES MSM3000YES YES YES MSM3100YES YES YES MSM3300YES YES YES MSM5000YES YES YES MSM5100YES YES YES MSM5105YES YES YES MSM5200YES YES YES MSM5500YES YES YES MSM6000YES YES YES MSM6050YES YES YES MSM6200YES YES YES MSM6600YES YES YES MSP1000YES YES YES MT1020A YES YES YES MT92101YES YES YES MTC-20276YES YES YES MTC-20277YES YES YES MTC-30585YES YES YES MTK-20141YES YES YES MTK-20280YES YES YES MTK-20285YES YES YES NET+15YES YES YES NET+20YES YES YES NET+40YES YES YES NET+50YES YES YES NITROGEN YES YES YES NS7520YES YES YES OMAP710YES YES YES C I C F I I C D I C M I C T R P I N I N S IOMAP730YES YES YES OMAP732YES YES YES PBM 990 90YES YES YES PCC-ISES YES YES YES PCD80703YES YES YES YES PCD80705YES YES YES YES PCD80708YES YES YES YES PCD80715YES YES YES YES PCD80716YES YES YES YES PCD80718YES YES YES YES PCD80720YES YES YES YES PCD80721YES YES YES YES PCD80725YES YES YES YES PCD80727YES YES YES YES PCD80728YES YES YESYES PCF26002YES YES YES PCF26003YES YES YES PCF87750YES YES YES PCI2010YES YES YES PCI3610YES YES YES PCI3620YES YES YES PCI3700YES YES YES PCI3800YES YES YES PCI5110YES YES YES PCI9501YES YES YES PH21101YES YES YES PMB7754YES YES YES PS7500FE YES YES YES PUC3030A YES YES YES PUC303XA YES YES YES S3C3400A YES YES YES S3C3400X YES YES YES S3C3410X YES YES YES S3C44A0A YES YES YES S3C44B0X YES YES YES S3C4510B YES YES YES S3C4520A YES YES YES S3C4530A YES YES YES S3C4610D YES YES YES S3C4620D YES YES YES S3C4640XYES YESYES C I C F I I C D I C M I C T R P I N I N S IS3C4650D YES YES YES S3C46C0YES YES YES S3C46M0X YES YES YES S3C4909A YES YES YES S3C49F9X YES YES YES S3F441FX YES YES YES S3F460H YES YES YES S5N8946YES YES YES S5N8947YES YESYES SE470R1VB8AD YES YES YES YES SIRFSTARII YES YES YES SJA2020YES YES SOCLITE+YES YES YES ST30F7XXA YES YES YES YES ST30F7XXC YES YES YES YES ST30F7XXZ YES YES YESYES STR710YES YES YES STR711YES YES YES STR712YES YES YES STR720YES YES YESYES STW2400YES YES YES TA7S05YES YES YES TA7S12YES YES YES TA7S20YES YES YES TA7S32YES YES YES TMS320VC5470YES YES YESYES TMS320VC5471YES YES YES TMS470R1VC336A YES YES YES TMS470R1VC338YES YES YES TMS470R1VC346A YES YES YES TMS470R1VC348YES YES YES TMS470R1VC688YES YES YES TMS470R1VF288YES YES YES TMS470R1VF336YES YES YES TMS470R1VF336A YES YES YES TMS470R1VF338YES YES YES TMS470R1VF346A YES YES YES TMS470R1VF348YES YES YES TMS470R1VF356A YES YES YES TMS470R1VF37A YES YES YES TMS470R1VF448YESYESYES C I C F I I C D I C M I C T R P I N I N S IARM9TMS470R1VF45A YES YES YES TMS470R1VF45AA YES YES YES TMS470R1VF45B YES YES YES TMS470R1VF45BA YES YES YES TMS470R1VF478YES YES YES TMS470R1VF48B YES YES YES TMS470R1VF48C YES YES YES TMS470R1VF55B YES YES YES TMS470R1VF55BA YES YES YES TMS470R1VF67A YES YES YES TMS470R1VF688YES YES YES TMS470R1VF689YES YES YES TMS470R1VF76B YES YES YES TMS470R1VF7AC YES YES YES UPD65977YES YES YES UPLAT CORE YES YES YES VCS94250YES YES YES VMS747YES YES YES VWS22100YES YES YES VWS22110YES YES YES VWS23112YES YES YES VWS23201YES YES YES VWS23202YES YES YES VWS26001YES YES YESC P UI C EF I R EI C D D E B U GI C D M O N I T O RI C D T R A C EP O W E R I N T E G R A T O RI N S T R U C T I O N S I M U L A T O R 88E6208YES YES YES 88E6218YES YES YES AAEC-2000YES YESYES ARM7EJ-S YES YES YES YES ARM910T YES YES YES YES ARM920TYES YES YESYES C I C F I I C D I C M I C T R P I N I N S IARM922T YES YES YES YES ARM926EJ-S YES YES YES YES ARM940T YES YES YES YES ARM946E-S YES YES YES YES ARM966E-S YES YES YES YES ARM968E-S YES YES YES YES ARM9E-S YES YES YES YES ARM9TDMI YES YES YES YES AT91RM9200YES YES YESYES CN9414YES YES YES CX22490YES YES YES CX22491YES YES YES CX22492YES YES YES CX22496YES YES YES CX82100YES YES YES DIGICOLOR-OA980YES YES YES DRAGONBALL MX1YES YES YESYES EP9301YES YES YES EP9312YES YES YES EPXA1YES YES YES YES EPXA10YES YES YES YES EPXA4YES YES YESYES FA526YES YES YES HELIUM 500YES YES YES INFOSTREAM YES YES YES LH7A400YES YES YES LH7A404YES YES YES LH7A405YES YES YES LPC3000YES YES YES YES MC9328MX1YES YES YESYES MC9328MX21YES YES YES ML67Q2003YES YES YES MSM6100 3G YES YES YES YES MSM6250YES YES YES YES MSM6300YES YES YES YES MSM6500YES YES YES YES MSM7XXX YES YES YES NEXPERIA YES YES YES YES NOMADIC YES YES YESYES NS9360YES YES YES NS9750YES YESYES C I C F I I C D I C M I C T R P I N I N S IARM10NS9775YES YES YES OMAP1510YES YES YES YES OMAP1610YES YES YES YES OMAP1611YES YES YES YES OMAP1612YES YES YES YES OMAP1710YES YES YES YES OMAP310YES YES YES YES OMAP5910YES YES YES YES OMAP5912YES YES YESYES OMAP710YES YES YES OMAP730YES YES YES OMAP732YES YESYES PMB8870 S-GOLD YES YES YES PMB8875 S-GOLDL YES YES YES PMB8876 S-GOLD2YES YES YES S3C2400X YES YES YES S3C2410YES YES YES S3C2410X YES YES YES S3C2440YES YES YES S3C2500A YES YES YES S3C2510YES YES YES S3C2800X YES YES YES SCORPIOYES YES YES T6TC1XB-0001YES YES YES T8300YES YES YES T8302YESYESYESC P UI C EF I R EI C D D E B U GI C D M O N I T O RI C D T R A C EP O W E R I N T E G R A T O RI N S T R U C T I O N S I M U L A T O R ARM1020E YES YES YES YES ARM1022E YES YES YES YES ARM1026EJ-S YES YES YESYES C I C F I I C D I C M I C T R P I N I N S IARM11CompilersC P UI C EF I R EI C D D E B U GI C D M O N I T O R I C DT R A C EP O W E R I N T E G R A T O RI N S T R U C T I O N S I M U L A T O R ARM1136J-S YES YES YES YES ARM1136JF-S YES YES YES YES MSM7XXX YES YES YES OMAP2410YES YES YES YES OMAP2420YESYESYESYES Language CompilerCompanyOptionCommentC ARMCC ARM AIFC ARMCC ARM ELF/DWARF C GCCARM FSF COFF/STABS C GCCARMFSFELF/DWARF2C GREENHILLS C Greenhills ELF/DWARF2C ICCARM IARELF/DWARF2C ICCV7-ARM Imagecraft ELF/DWARF ARM7C HIGH-C MetawareELF/DWARF C TI-C Texas Instruments COFF C GNU-CWind River Systems COFFC++ARM SDT 2.50ARM ELF/DWARF2C++GCCARM FSF COFF/STABS C++GNUFSF EXE/STABS C++GCCARMFSFELF/DWARF2C++GREENHILLS C++Greenhills ELF/DWARF2C++HIGH-C++Metaware ELF/DWARF C++MSVCMicrosoftEXE/CV5WindowsCERealtime Operation SystemDebuggersNameCompanyComment OSEK -via ORTI ProOSEK 3Softvia ORTI AMXKADAK Products ChorusOS Sun Microsystems micro & basic ECOS eCosCentric Limited 1.3.1 and 2.0embOS Segger Linux -Kernel Version 2.4 and 2.6LinuxMontaVistaVersion 3.0 and 3.1Nucleus PLUS Accelerated Tech.OSE Basic Enea OSE Systems (OSARM)OSE Epsilon Enea OSE Systems (OSARM), 3.x Precise/MQX Precise Software 2.40 and 2.50pSOS+Integrated Systems 2.1 to 2.5, 3.0QNXQNX Software Systems 6.0 to 6.3RealTime Craft GSI tecsi(XECARM)RTXC 3.2Quadros Systems Inc.RTXC Quadros Quadros Systems Inc.Sciopta ScioptaSMXMicro Digital Symbian OS Symbian6.x,7.0s,8.0a+b, 8.1a+b,9.1ThreadX Express Logic uC/OS-II Micrium Inc. 2.0 to 2.7uCLinux freewareKernel Version 2.4VxWorks Wind River Systems 5.x, with TRACE32 BSP Windows CEMicrosoft4.0 to 4.2CPU DebuggerCompany Host ALL EASYCASE BKR GmbHWindows ALL X-TOOLS / X32blue river software Windows ALL RHAPSODY IN MICROC I-Logix Windows ALL A TTOL TOOLS MicroMax Windows ALL VISUAL BASIC INTERFACE MicrosoftWindows ALL CODEWRIGHT Premia Corporation Windows ALLDA-CRistanCASEWindows31 ProductsProduct InformationOrder InformationOrderNo CodeText LA-8809SIM-ARM Instruction Set Simulator for ARM Instruction Set Simulatorfor ARM, XSCALE, Janus2Order No.Code Text LA-8809SIM-ARM Instruction Set Simulator for ARM。

TRACE32系列仿真器介绍

TRACE32系列仿真器介绍
Hub Ethernet Interface BDM/JTAG Debugger
EPROM Simulator Module
深圳旋极
ICD配置方案
例 4: BDM/JTAG调试器,带ROM仿真器(USB口)
BDM/JTAG Debugger with USB Interface
EPROM Simulator Module
网址:
深圳旋极
TRACE32为何与众不同
一、All in One,模块化。丰与俭,巧规划。
模块化结构。可按用户要求裁剪,配置 多种仪器的综合体:
– 通用仿真器 – 逻辑/状态/时序分析仪 – 通用计数器/定时器 – 模式/脉冲信号源 – 模拟调试器 – 软件测试 – FLASH编程
深圳旋极
Trace32的使用
Support for a wide range of on-chip debug interfaces Easy high-level and assembler debugging Interface to all compilers Fast download RTOS awareness Interface to all hosts Display of internal and external peripherals at a logical level Flash programming Hardware breakpoints and trigger (if supported by the on-chip
Emulation Control
Fire Pod
Podbus
PC Workstation
Target
深圳旋极

Android_trace32_Kernel_Debug

Android_trace32_Kernel_Debug

如何用trace32调试native和kernel异常---------- for Android System Debug众所周知gdb功能强大,但相对于gdb的指令式调试,trace32的图形界面要更方便易上手,而且不用查记那些繁复的指令,虽然效率上不及gdb,但对于新手而言,使用trace32要比gdb 快捷。

下面就介绍如何使用trace32加载symbol文件。

1.启动trace32默认安装好trace32后,在开始菜单中选择“Trace32 Simulator for ARM”,如图1图12.启动模拟器在CPU菜单中选择“System Settings…”,如图2,图2在弹出窗口中的CPU框选择对应的CPU,如图3,对于MT6589平台选择CortexA9MPCore,图3然后点击UP即可启动模拟器,右下角会显示“system ready”,如图4。

图43.加载symbol文件加载的指令为“data.load.elf <symbol路径> <加载地址> /gnu /noclear /nocode”,symbol 文件可以是boot、lk等的elf文件,kernel的vmlinux,native so的symbol库;加载地址是可选项,可从PROCESS_MAP获取,也可从问题log获取。

加载完成后点击工具条上的蓝色感叹号就会显示出该symbol文件所对应的symbol,如图5,双击symbol符号可进入该symbol的具体内容。

图54.设置资源路径symbol文件加载完了,但对应的内容是十分难读的汇编语言,如图6,图6不过不用担心trace32支持symbol与code映射,可以将symbol与代码对应起来,在图6界面滑动鼠标滚轮,在命令框下方会提示该段symbol所对应的文件,如图7,图7将与symbol文件对应的同一版本的代码放到提示的路径下,在View菜单选择“Symbols”-> “Source Search Paths”,如图8,图8在弹出的对话框中点击“Add Dir…”按钮将路径设置到代码路径,然后点击“Reload”按钮,如图9,图9回到刚才symbol 界面,汇编语言就变成对应的代码了,如图10,图10点击 “Mode ” 按钮可切换到纯代码模式,如图11。

T32

T32

Qualcomm Trace32 crash forMTP and A60KAuthor: Field Trial DepartmentRevision HistoryContents目的 (4)前置作業 (4)安裝TRACE32 FOR QDSP6 (4)LOAD MODEM RAM DUMP LOGS INTO TRACE32 SIMULATOR (10)EXTRACT F3 MESSAGE LOGS FROM RAM DUMP LOGS (12)FIRMWARE DEBUGGING (13)SUBMIT QUALCOMM CASE (15)備注一: INSTALL PERL (16)●目的我們在crash分類時,看到”fws_task.c, line240”時,需要再細分,才可報上Qualcomm case,此份SOP為當碰到”fws_task.c, line240”時,如何使用trace32做進一步的分類。

●前置作業請至FTP下載Trace32以及所需的檔案,路徑如下:Venderftp://QT5/FT/A60K/Trace32-tool/Note: 由於後面開啟f3 log需要,所以建議先安裝perl(已於folder中),安裝方法請參考備註一●安裝Trace32 for QDSP61.解壓縮後,將Trace32 資料夾打開2.點擊setup.bat並把預設路徑改為C:\T32_QDSP63.選擇”New Installation”4.選software only5.Setup Type選Trace32 Instruction Set Simulator6.CPU selection選SIM ARM,然後選擇”Next”7.Press確定8.接下來都選擇default setting,Press “Next”9.看到”Finish”即代表安裝完成10. 接著將QDSP6201012資料夾內檔案全選並複製到C:\T32_QDSP6目錄,遇到重複的直接蓋掉。

TRACE32系列仿真器介绍

TRACE32系列仿真器介绍
深圳旋极
Trace32-ICE的结构
Host Connection
To Target
深圳旋极
TRACE32-ICE
深圳旋极
TRACE32-ICE的基本模块
仿真头Emulation Probe 仿真基本模块Emulation Base 逻辑分析仪State Analyzer
扩展存储模块 Emulation RAM up to16M
深圳旋极
TRACE32为何与众不同
八、基本功,样样精。搞开发,轻轻松。
Memory 测试 硬件断点功能,TRACE32可以在FLASH或EPROM
中直接调试 支持多CPU调试 丰富的断点类型 支持MMU、 FPU调试 上下文追踪系统CTS(Context Tracing System) 条件执行功能(STEP、GO) ...
深圳旋极
TRACE32 -ICD
TRACE32-ICD是基于集成在片内的调试和跟踪逻辑 (BDM、JTAG、ETM、OCDS、NEXUS)的在线调试 器(In-Circuit Debugger)
深圳旋极
常见的调试接口
BDM:背景调试模式 – Background Debug Mode –主要由Motorola使用,用于调试 –有6Pin和10Pin两种形式
ROM Monitor
深圳旋极
ICD配置方案
例 2: ROM仿真器(网口,32位)
Ethernet Interface EPROM Simulator Module and ROM Monitor EPROM Simulator Module
深圳旋极
ICD配置方案
例 3: BDM/JTAG调试器,带ROM仿真器(网口)

关于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连接器,用于和目标板连接。

TRACE32系列仿真器介绍

TRACE32系列仿真器介绍

TRACE32系列仿真器介绍TRACE32系列仿真器是由German Lauterbach公司开发的一套用于嵌入式系统开发和调试的工具,旨在帮助开发人员进行快速、高效的开发和调试工作。

TRACE32系列仿真器包含多种型号,适用于不同的平台和处理器架构,如ARM,PowerPC,MIPS等。

1.统一的调试界面:TRACE32提供了一个统一的调试界面,可以同时支持多种不同的处理器架构。

这使得开发人员能够使用一套工具进行不同架构的调试工作,而不需要切换到不同的开发环境。

2.高级调试功能:TRACE32提供了丰富的高级调试功能,如断点调试、单步执行、观察变量、内存查看等。

开发人员可以利用这些功能快速定位和解决问题,提高调试效率。

3.多核调试支持:TRACE32支持多核处理器调试,可以同时跟踪和调试多个核心。

开发人员可以实时查看和分析不同核心的状态和交互情况。

4.实时追踪:TRACE32提供了实时追踪功能,可以记录系统运行时的任务切换、中断、函数调用等信息。

这有助于开发人员了解系统的运行状态,定位问题和调优性能。

5.嵌入式硬件调试:TRACE32支持对嵌入式硬件进行调试,如片上系统(SoC)和外围设备。

开发人员可以通过TRACE32对硬件进行控制和监控,以便更好地了解和优化系统设计。

6.脚本自动化:TRACE32可以通过脚本进行自动化测试和调试。

开发人员可以编写脚本来执行一系列调试操作,从而提高测试效率和减少人工操作的错误。

7.高性能仿真:TRACE32具有高性能的仿真能力,可以快速加载和运行大型程序。

这使得开发人员能够更快地进行代码调试和性能分析,提高开发效率。

总之,TRACE32系列仿真器是一套功能强大的工具,可帮助开发人员进行嵌入式系统的开发和调试工作。

无论是单核还是多核,无论是硬件还是软件,TRACE32都提供了丰富的调试功能和便于使用的界面,让开发人员能够更轻松地进行调试工作,提高效率。

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。

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

1 前言
Trace32 ICD ARM USB能实时DEBUG代码在手机中的运行情况,功能强大,但需要连接TRACE32硬件才能工作。

更重要的是,对于概率性死机的BUG,用Trace32 ICD ARM USB应该是很难找到问题,因为你不能确定手机什么时候crash。

其实TRACE32还有一个WIN32版本,用户只需要把手机crash时候的寄存器信息dump出来,就能在WIN32下定位到死在代码的那一行,非常类似于EMP 平台的CHKARM工具。

这就是本文将要描述的Trace32 Simulator for ARM工具。

2 安装
WIN32版的TRACE32需要重新安装,安装文件和硬件版TRACE32是一样的,只是安装时候的选项不同,而且WIN32版的需要安装在不同的目录下(比如trace32-win32)。

z运行安装文件\trace32\bin\setup\setup.exe。

首先设置安装路径,注意不要和硬件版TRACE32安装在同一个目录下,请新建一个文件夹(比如
trace32-win32)
z选择【New Installation】,然后Next
z选择【Simulator】,这个是WIN32版TRACE32的选项(硬件版TRACE32是选择第2项,注意不要搞错了)
z选择默认值,然后Next
z选择【SIM ARM7 ARM9 ARM10 ARM11】,和硬件版TRACE32一样
z安装中,安装完毕后就可以使用了。

3 使用
首先请确保你有保存当前手机软件的原始ARM文件。

手机死机时,按“#”键进入downloading模式。

z运行【QPST】→【Memory Debug】,制指定数据线端口
z点击【Get Regions】显示将要dump的信息
z点击【SaveTo】保存dump数据
z创建保存dump数据的文件夹,建议放到Arm/ms/dump目录下
z保存dump数据,这个过程花的时间比较长
z保存完毕dump数据后,运行软件【Trace32 Simulator for ARM】首先把工作路径切换到\source\Arm\ms下
z在命令行中输入do load_log,然后按回车
z根据屏幕上的提示,选择【2. Call stack or memory compression log (.cmm file)】,然后按回车
z根据屏幕上的提示,直接按回车
z选中刚才dump出来的load.cmm文件并导入
z导入load.cmm中……
z完成load.cmm导入后,在命令行输入do load_rex_cor e 命令,并按回车
z TRACE32定位到死机的代码行(高亮显示部分),和硬件版的TRACE32一样,可以查看当前变量值等有用的信息……
分析,代码如下图所示。

4 后记
本文旨在给出一个WIN32版TRACE32的快速使用指南,预知更多细节,
请查阅TRACE32帮助文档或请教有使用经验的同事。

TRACE32提供的功能是非常强大的,使用的细节和技巧需要我们在实际工作中不断去摸索总结。

希望大家把使用心得分享出来,让TRACE32在我们的工作中发挥更大的作
用。

相关文档
最新文档