trace32使用手册
TRACE32 iAMP 双核调试应用说明书

Application Note for iAMP Debugging Release 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ...................................................................................................................... Multicore Debugging ..................................................................................................................... Application Note for iAMP Debugging . (1)SMP, iAMP or AMP? (3)iAMP Setup (7)Example iAMP Setup10Version 09-Oct-2023 11-Nov-2021New manual.SMP, iAMP or AMP?TRACE32 offers various configuration possibilities for debugging multi-core target systems. This chapter explains the basic differences between:•SMP (Symmetrical MultiProcessig)•iAMP (integrated Asymmetrical MultiProcessing)•AMP (Asymmetrical MultiProcessig)This application note focuses on iAMP. It gives you a basic overview of the iAMP concept and helps you to choose the right configuration for your setup. For further details about iAMP and the commands used here, you can also see the “General Reference Guide” (general_ref_<x>.pdf) or contact**********************.If you want to create a new TRACE32 setup for any multicore system, one of the very first decisions you have to make is “AMP or SMP or iAMP?”. In some cases, only one of the possibilities is supported by TRACE32, for example: if you have several cores of different architectures (like one Arm core, one Xtensa core and one RISC-V core), then AMP is the only possible option. But in many cases, you have a choice.Let’s first take a look at the key properties of the three concepts:•All cores have the same instruction set.•All cores use the same instance of an OS (when not bare-metal and unless you are using a hypervisor (“Hypervisor Debugging User Guide” (hypervisor_user.pdf)).•All cores use the same memory model and same address translations (unless you are using a hypervisor).•All cores share the same physical and logical address space.•All cores share the same debug symbols (typically the same elf file).•All cores are debugged from a single TRACE32 PowerView instance. Y ou can have up to 1024cores.•TRACE32 starts and stops all cores simultaneously (even though you can temporarily single out one core for independent start/stop).iAMP (integrated asymmetrical multiprocessing):•All cores have the same instruction set.•There are typically multiple OS instances (if not bare metal).•There is just one global physical address space but each OS maintains its own set of virtual address spaces.•All cores are debugged from a single TRACE32 PowerView GUI. The number of cores is limited just by the core architecture used and can be very high.•TRACE32 allows to group cores logically into machines; this grouping depends on the logical structure of the system under debug - each machine consists of one or more cores. Up to30machines are possible.•Each machine has its own OS instance (if not bare metal).•Each machine has its own memory model, address translations and debug symbols.•TRACE32 starts and stops all cores simultaneously (even though you can temporarily single out one core for independent start/stop).•AMP can bundle single cores, as well as SMP and iAMP subsystems.•Mixing of different core architectures with different instruction sets is possible.•Each core/subsystem has its own TRACE32 PowerView GUI.•Each core/subsystem has its own (different) memory models, address translations, elf files and debug symbols.•Each core/subsystem can have its own physical address space.•Each core/subsystem has its own logical address spaces.•Each core/subsystem starts and stops independently but can also be synchronized.•AMP is limited to 16 TRACE32 PowerView GUIs.An example of an AMP system that bundles single cores, an SMP and an iAMP subsystem can be found on page10.The most important questions for the decision are:•Do all my cores use the same instruction set?If not, it is definitely AMP.•Do all my cores of the same instruction set run a single instance of OS?If yes, these cores form an SMP (sub)system.•Are there SMP subsystems and single cores of the same instruction set? Does it make sense to configure them as an iAMP system and debug them from a single TRACE32PowerView instance?Y es, if they are all using a global physical address space.Y es, if they logically belong together; that means they work together or in parallel on the same tasks.Y es, if you want or need to reduce the number of TRACE32 PowerView instances.The following table provides a systematic overview:SMP AMP iAMP Homogeneous cores (cores of the same instruction set)✓✓✓Heterogeneous cores✓Single TRACE32 instance/GUI✓✓Multiple TRACE32 instances/GUIs 16Hypervisor with statically assigned guests (core identity)✓✓✓Hypervisor with dynamic core assignment (core sharing)✓SMP OS (a single OS managing multiple cores)✓Multiple OSes without hypervisor✓Synchronous run✓✓✓Asynchronous run✓iAMP is available for selected core architectures like Arm, Hexagon and T riCore. If you need iAMP and your platform does not support it yet, please contact your local Lauterbach representative or**********************.Some of the decision criteria are easy to evaluate (like more than 16 CPUs) but some of them are quite fuzzy - talking to Lauterbach representative or Lauterbach support might help you with the decision.iAMP SetupThe basis for an iAMP system is that cores are grouped into machines.The SYStem.Option.MACHINESPACES ON command creates the basis for this.All cores that use the same instance of an OS (when not bare-metal) can be grouped and assigned to a machine by the TASK.Create.MACHINE command.Example :This will create two machines, each of them with two cores. Their setup can be then displayed using the commandTASK.List.MACHINES :The columns name and cores in the screenshot are self-explaining, ‘mid’ displays the machine ID, other columns are not relevant for our example.It may be necessary to use the CORE.ASSIGN command beforehand to assign the physical cores to the logical cores of the iAMP system.Use the command CORE.select <logical_core> to switch to the core of interest and the TRACE32PowerView GUI will display the system information from the perspective of the selected core. T o understand how this works, think that “the machine is never selected directly but always follows selected core”.By default, all cores are started and stopped simultaneously , but you can single out a single core for independent start/stop by using the CORE.SINGLE <logical_core> command.The CORE.select command without an argument can be used to reverse this selection after the core is stopped.It is imperative to ensure that the symbols loaded by any of the Data.LOAD.* commands will be added to the right machine space. When loading executables and symbol information, the safest way is to explicitly select the core to which the executable belongs – it then explicitly defines both the core and machine. One of the reasons is that registers like PC might be pre-initialized during Data.LOAD so by selecting the correct core it becomes clear where the register(s) are to be set:TASK.Create.MACHINE , 0. "main0" /CORE 0. 1.TASK.Create.MACHINE , 1. "main1" /CORE 2. 3.CORE.select 0.Data.LOAD.Elf application_subsystem0.elf CORE.select 2.Data.LOAD.Elf application_subsystem1.elf /NoClearOn the other hand, when you load only symbol information and no register content, it is sufficient to specify only the machine; knowledge of the specific core is not required. T o specify only the machine, use theloading offset parameter to Data.LOAD.* where this offset contains the machine number. In most cases you use zero as offset (unless you need to shift the data to another base address).Loading symbols using the machine ID makes them machine aware as can be seen in the image below.The machine name can be explicitly specified in a symbol name using triple-backslash (“\\\”) syntax.Example :This command will show the source of the symbol start from the module Global on the machine named main1.The general format for symbol names becomes:[\\\<machine_name>]\\[<program_name>]\[<module_name>]\<symbol_name>Both <program_name> and <module_name> may be omitted if there is no ambiguity with another symbol but the appropriate backslashes must remain to indicate where they were, for example:\\\<machine_name>\\\<symbol_name>So, our example of \\\main1\\Global\start now becomes \\\main1\\\\startWhen you activate the iAMP mode, the behavior of many commands changes. The commands now also consider the correct machine scope, for example:Data.LOAD.Elf application_subsystem0.elf 0x0:::0 /NoCODE /NoRegData.LOAD.Elf application_subsystem1.elf 0x1:::0 /NoClear /NoCODE /NoRegNOTE:This concept is extended to allow you to access a logical address on any machine and works like this:[<access_class>:][<machine_id>:::]<address_offset> Example:P:1:::0x1234000 means program address P:0x1234000 on machine 1.R:0:::0x81021864 means AArch32 Arm code at address R:0x81021864 on machine 0.List.Asm \\\main1\\\Global\startNormally, MMU.DUMP.TLB shows the only TLB in the system (where available). With iAMP, the contents displayed by MMU.DUMP.TLB will update after every change of machine and always show the TLB of the currently selected machine.The program counter is now shown everywhere with the machine number included - like in this CORE.List window:The machine number is also included in many other outputs and windows, almost everywhere where you see an address. The screenshot below shows the sYmbol.List.SECtion window. It can be seen that sections from all machines and all addresses include the machine number.Example iAMP SetupAssume the following system, based on a TDA4VM chip from T exas Instruments:•Four Cortex-R5 cores, grouped in two core pairs, called “main0” and “main1”. These four cores form our example iAMP system.Each core pair has its own symbols and ELF file (app_ddr.elf and app_sram.elf ).Both core pairs use logical memory but have their own translations.•In addition to that, there is also a Cortex-M3 core (“master”), Cortex-R5 (“mcu”) based SMP subsystem and a TI C71x (“dsp”) on the chip, which all need to be debugged as well.Four TRACE32 PowerView GUIs are needed to debug this AMP system:1.GUI to control the Cortex-R5 based iAMP subsystem 2.GUI to control a single Cortex-M33.GUI to control the Cortex-R5 based SMP subsystem4.GUI to control a single C71x DSPTRACE32 PowerDebugDebug Port®iAMP main0 + main1Cortex-M3masterSMP 2x Cortex-R5mcuC71x dspApplication Note for iAMP Debugging | 11©1989-2023 L auterbach So, let's focus on the iAMP subsystem - we want to preload all elf files, execute all startups immediately after loading, and then start the execution of all cores/machines from the symbol main simultaneously. For this setup, the following script can be used:The other subsystems of SoC are initialized as usual with their own scripts.The structure of the whole system can be then displayed via the command TargetSystem ALL .sYmbol.RESetSYStem.Option.MACHINESPACES ONTASK.CREATE.MACHINE , 0. "main0" /CORE 0. 1.TASK.CREATE.MACHINE , 1. "main1" /CORE 2. 3.CORE.select 0.Data.LOAD.Elf app_ddr.elfCORE.select 2.Data.LOAD.Elf app_ram.elf /NoClearCORE.SINGLE 0. ; enter single core execution mode Go mainWAIT !STATE.RUN()CORE.SINGLE 2. ; enter single core execution mode Go mainWAIT !STATE.RUN()CORE.select 0. ; leaving single core execution mode PRINT "Now we are ready to debug from main"。
trace32使用手册

置调试源文件路径。
四、 观察/修改寄存器 从主菜单区点击“CPU->CPU Registers” ,打开内核寄存器窗口,如下图所示。 Pic11. 内核寄存器观察菜单
Pic12. 内核寄存器窗口
从 Pic12 所示的内核寄存器窗口, 用户能够观察处理器内核寄存器的值。 如果用户想 修改某一个寄存器的值, 只要双击寄存器名右边的值, 在行命令输入区就会出现相应 寄存器值修改的命令,紧接着输入十六进制的值(如,0x12345678)并回车就可以了。 下图是以修改寄存器 R2 的值为例,在行命令输入区出现的命令。 Pic13. 修改内核寄存器
Pic29 中红框内的单选钮 IMASKASM 和 IMASKHLL 选择之后,单步时就会屏蔽中断。 用户也可以通过命令 sys.o imaskasm on 和 sys.o imaskhll on 来设置这两个选项。
十、 设置软件断点 设置软件断点可以在命令行输入命令 break.set <address> /soft 来实现,在命令中的 <address>代表程序地址,可以是程序中的函数名等符号。如下图所示。 Pic30. 用命令设置软件断点
六、 下载程序 使用 data.load 命令实现程序下载的功能,如下图所示。 Pic20. 下载程序 上图中,“elf”指示所下载的程序的文件格式,“/v”指示程序下载完成之后进行校验。
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 PXROS用户手册和版本帮助(MANUAL)说明书

OS Awareness Manual PXROS Release 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................OS Awareness Manuals ................................................................................................................OS Awareness Manual PXROS (1)History (3)Overview (3)Brief Overview of Documents for New Users4 Supported Versions4Configuration (5)Quick Configuration Guide5 Hooks & Internals in PXROS6Debug Features (7)Display of Kernel Resources7 Task Stack Coverage7 Task-Related Breakpoints8 Task Context Display9 SMP Support9 Dynamic Task Performance Measurement10 PXROS Specific Menu11Trace Features (12)Task Runtime Statistics12 Function Runtime Statistics13 CPU Load Analysis15 PXROS Specific Menu for Tracing16PXROS Commands (17)TASK.ListmbX Display mailboxes17 TASK.ListObject List objects17 TASK.ListObj.DeLaY Display delay objects18 TASK.ListObj.MailBoX Display mailboxes18 TASK.ListObj.MemClass Display memory classes19 TASK.ListObj.MeSsaGe Display message objects19 TASK.ListObj.OPool Display object pools20 TASK.ListTask Display task table20Version 09-Oct-2023 History08-Oct-19Added support for PXROS v7.OverviewThe OS Awareness for PXROS contains special extensions to the TRACE32 Debugger. This manual describes the additional features, such as additional commands and statistic evaluations.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.Supported VersionsCurrently PXROS is supported for the following versions:•PXROS 4.x on C166/C167, PowerPC and T riCore•PXROS 5.x, 6.x, 7.x and 8.x on TriCoreConfigurationThe TASK.CONFIG command loads an extension definition file called “pxros.t32” (directory“~~/demo/<arch>/kernel/pxros”). It contains all necessary extensions.TASK.CONFIG ~~/demo/<arch>/kernel/pxros/pxros.t32 [<magic_address>[<args>]]<magic_address>Specifies a memory location that contains the current running task. Thisaddress can be found at “...”.<args>The configuration requires additional arguments, that are:•<sleep>: Currently not used, specify “0”•<dpp>: (only on C166) The first argument configures the datapage settings of the application. Specify a long word which leastsignificant byte is the dpp0 content and which most significant byteis the dpp3 content. E.g. '03060500' means dpp0=0, dpp1=5,dpp2=6 and dpp3=3. If you don't know the dpp settings of yourapplication, just start it for a while and check in the 'register' com-mand the dpp's. Note that the dpp settings must be adapted to everysingle application.•<internal>: The next three arguments are PXROS internal struc-tures. Specify “__PxTasklist __PxTaskRdyFromRdy__PxUsedObjs”.Without any parameters, the debugger tries to locate the internals of PXROS automatically. For this purpose, the kernel symbols must be loaded and accessible at any time the OS Awareness is used (see also “Hooks & Internals”).If you want to display the OS objects “On The Fly” while the target is running, you need to have access to memory while the target is running. In case of ICD, you have to enable SYStem.MemAccess orSYStem.CpuAccess (CPU dependent).Quick Configuration GuideExample scripts are provided in ~~/demo/<arch>/kernel/pxros. It is recommended to take one of these as a starting point and modify it to suit your target and setup.If you already have a setup/configuration script which configures the target and loads the application code and/or symbols, you can add the following lines to your script after the symbols have been loaded: TASK.CONFIG ~~/demo/<arch>/kernel/pxros/pxros.t32MENU.ReProgram ~~/demo/<arch>/kernel/pxros/pxros.menThese lines will automatically configure the awareness and add a custom menu that provides access to many of the features.Hooks & Internals in PXROSNo hooks are used in the kernel.T o retrieve information on the kernel data and structures, the OS Awareness uses the global kernel symbols and structure definitions. Ensure that access to those structures is possible every time when features of the OS Awareness are used.Be sure that your application is compiled and linked with debugging symbols switched on.Debug FeaturesThe OS Awareness for PXROS supports the following debug features.Display of Kernel ResourcesThe extension defines new commands to display various kernel resources. Information on the following PXROS components can be displayed:TASK.ListObject.DeLaY Delay objectsTASK.ListObject.MailBoX or TASK.ListmbX MailboxesTASK.ListObject.MemClass Memory classesTASK.ListObject.MeSsaGe Message objectsTASK.ListObject.OPool Object poolsTASK.ListTask TasksFor a description of the commands, refer to chapter “PXROS Commands”.If your hardware allows memory access while the target is running, these resources can be displayed “On The Fly”, i.e. while the application is running, without any intrusion to the application.Without this capability, the information will only be displayed if the target application is stopped.Task Stack CoverageFor stack usage coverage of tasks, you can use the TASK.STacK command. Without any parameter, this command will open a window displaying with all active tasks. If you specify only a task magic number as parameter, the stack area of this task will be automatically calculated.T o use the calculation of the maximum stack usage, a stack pattern must be defined with the command TASK.STacK.PATtern (default value is zero).T o add/remove one task to/from the task stack coverage, you can either call the TASK.STacK.ADD or TASK.STacK.ReMove commands with the task magic number as the parameter, or omit the parameter and select the task from the TASK.STacK.* window.It is recommended to display only the tasks you are interested in because the evaluation of the used stack space is very time consuming and slows down the debugger display.Task-Related BreakpointsAny breakpoint set in the debugger can be restricted to fire only if a specific task hits that breakpoint. This is especially useful when debugging code which is shared between several tasks. T o set a task-relatedbreakpoint, use the command:Break.Set<address>|<range>[/<option>] /TASK <task>Set task-related breakpoint.•Use a magic number, task ID, or task name for <task>. For information about the parameters, see “What to know about the Task Parameters” (general_ref_t.pdf).•For a general description of the Break.Set command, please see its documentation.By default, the task-related breakpoint will be implemented by a conditional breakpoint inside the debugger.This means that the target will always halt at that breakpoint, but the debugger immediately resumesexecution if the current running task is not equal to the specified task.NOTE:T ask-related breakpoints impact the real-time behavior of the application.On some architectures, however, it is possible to set a task-related breakpoint with on-chip debug logic that is less intrusive. T o do this, include the option /Onchip in the Break.Set command. The debugger then uses the on-chip resources to reduce the number of breaks to the minimum by pre-filtering the tasks.For example, on ARM architectures: If the RTOS serves the Context ID register at task switches, and if the debug logic provides the Context ID comparison, you may use Context ID register for less intrusive task-related breakpoints:eContextID ON Enables the comparison to the whole Context ID register.Break.CONFIG.MatchASID ON Enables the comparison to the ASID part only.TASK.List.tasks If TASK.List.tasks provides a trace ID (traceid column), thedebugger will use this ID for comparison. Without the trace ID,it uses the magic number (magic column) for comparison.When single stepping, the debugger halts at the next instruction, regardless of which task hits thisbreakpoint. When debugging shared code, stepping over an OS function may cause a task switch and coming back to the same place - but with a different task. If you want to restrict debugging to the current task,you can set up the debugger with SETUP .StepWithinTask ON to use task-related breakpoints for single stepping. In this case, single stepping will always stay within the current task. Other tasks using the same code will not be halted on these breakpoints.If you want to halt program execution as soon as a specific task is scheduled to run by the OS, you can use the Break.SetTask command.Task Context DisplayY ou can switch the whole viewing context to a task that is currently not being executed. This means that all register and stack-related information displayed, e.g. in Register , Data.List , Frame etc. windows, will refer to this task. Be aware that this is only for displaying information. When you continue debugging the application (Step or Go ), the debugger will switch back to the current context.T o display a specific task context, use the command:•Use a magic number, task ID, or task name for <task>. For information about the parameters, see “What to know about the Task Parameters” (general_ref_t.pdf).•To switch back to the current context, omit all parameters.T o display the call stack of a specific task, use the following command:If you’d like to see the application code where the task was preempted, then take these steps:1.Open the Frame /Caller /Task <task> window. 2.Double-click the line showing the OS service call.SMP SupportThe OS Awareness supports symmetric multiprocessing (SMP).Frame.TASK [<task>] Display task context.Frame /Task <task>Display call stack of a task.An SMP system consists of multiple similar CPU cores. The operating system schedules the threads that are ready to execute on any of the available cores, so that several threads may execute in parallel.Consequently an application may run on any available core. Moreover, the core at which the application runs may change over time.T o support such SMP systems, the debugger allows a “system view”, where one TRACE32 PowerView GUI is used for the whole system, i.e. for all cores that are used by the SMP OS. For information about how to set up the debugger with SMP support, please refer to the Processor Architecture Manuals.All core relevant windows (e.g. Register.view) show the information of the current core. The state line of the debugger indicates the current core. Y ou can switch the core view with the CORE.select command.T arget breaks, be they manual breaks or halting at a breakpoint, halt all cores synchronously. Similarly, a Go command starts all cores synchronously. When halting at a breakpoint, the debugger automatically switches the view to the core that hit the breakpoint.Because it is undetermined, at which core an application runs, breakpoints are set on all coressimultaneously. This means, the breakpoint will always hit independently on which core the application actually runs.Dynamic Task Performance MeasurementThe debugger can execute a dynamic performance measurement by evaluating the current running task in changing time intervals. Start the measurement with the commands PERF.Mode TASK and PERF.Arm, and view the contents with PERF.ListTASK. The evaluation is done by reading the ‘magic’ location (= current running task) in memory. This memory read may be non-intrusive or intrusive, depending on the PERF.METHOD used.If PERF collects the PC for function profiling of processes in MMU-based operating systems(SYStem.Option.MMUSPACES ON), then you need to set PERF.MMUSPACES, too.For a general description of the PERF command group, refer to “General Commands Reference Guide P” (general_ref_p.pdf).PXROS Specific MenuThe menu file “pxros.men” contains a menu with PXROS specific menu items. Load this menu with the MENU.ReProgram command.Y ou will find a new menu called PXROS.•The Display menu items launch the kernel resource display windows.•The Stack Coverage submenu starts and resets the PXROS specific stack coverage and provides an easy way to add or remove tasks from the stack coverage window.In addition, the menu file (*.men) modifies these menus on the TRACE32 main menu bar:•The Trace, List menu is extended.-“Task Switches” shows a trace list window with only task switches (if any)-“Default and T asks” shows switches together with the default display.•The Perf menu contains additional submenus-“Task Runtime” enables and shows the task runtime analysis-“Task Function Runtime” enables and shows the function runtime statistics based on tasks-“CPU Load” enables and shows the CPU load analysisTrace FeaturesThe OS Awareness for PXROS supports the following trace features.Task Runtime StatisticsNOTE:This feature is only available, if your debug environment is able to trace taskswitches (program flow trace is not sufficient). It requires either an on-chip tracelogic that is able to generate task information (eg. data trace), or a softwareinstrumentation feeding one of TRACE32 software based traces (e.g. FDX orLogger). For details, refer to “OS-aware Tracing” (glossary.pdf).Based on the recordings made by the Trace (if available), the debugger is able to evaluate the time spent ina task and display it statistically and graphically.T o evaluate the contents of the trace buffer, use these commands:Trace.List List.TASK DEFault Display trace buffer and task switchesTrace.STATistic.TASK Display task runtime statistic evaluationTrace.Chart.TASK Display task runtime timechartTrace.PROfileSTATistic.TASK Display task runtime within fixed time intervalsstatisticallyTrace.PROfileChart.TASK Display task runtime within fixed time intervals ascolored graphTrace.FindAll Address TASK.CONFIG(magic) Display all data access records to the “magic”locationTrace.FindAll CYcle owner OR CYcle context Display all context ID records The start of the recording time, when the calculation doesn’t know which task is running, is calculated as “(unknown)”.Function Runtime StatisticsAll function-related statistic and time chart evaluations can be used with task-specific information. Thefunction timings will be calculated dependent on the task that called this function. T o do this, in addition to the function entries and exits, the task switches must be recorded.T o do a selective recording on task-related function runtimes based on the data accesses, use the following command:NOTE:This feature is onlyavailable, if your debug environment is able to trace task switches (program flow trace is not sufficient). It requires either an on-chip tracelogic that is able to generate task information (eg. data trace), or a software instrumentation feeding one of TRACE32 software based traces (e.g. FDXor Logger ). For details, refer to “OS-aware Tracing” (glossary.pdf).; Enable flow trace and accesses to the magic location Break.Set TASK.CONFIG(magic) /TraceDataT o do a selective recording on task-related function runtimes, based on the Arm Context ID, use the following command:T o evaluate the contents of the trace buffer, use these commands: The start of the recording time, when the calculation doesn’t know which task is running, is calculated as “(unknown)”.; Enable flow trace with Arm Context ID (e.g. 32bit)ETM.ContextID 32Trace.ListNesting Display function nestingTrace.STATistic.FuncDisplay function runtime statistic Trace.STATistic.TREEDisplay functions as call tree Trace.STATistic.sYmbol /SplitTASK Display flat runtime analysis Trace.Chart.FuncDisplay function timechart Trace.Chart.sYmbol /SplitTASKDisplay flat runtime timechartCPU Load AnalysisNOTE:This feature is only available, if your debug environment is able to trace taskswitches (program flow trace is not sufficient). It requires either an on-chip tracelogic that is able to generate task information (eg. data trace), or a softwareinstrumentation feeding one of TRACE32 software based traces (e.g. FDX orLogger). For details, refer to “OS-aware Tracing” (glossary.pdf).Based on the recordings made by the Trace (if available), the debugger is able to evaluate the CPU load.The CPU load is calculated by comparing the time spent in all tasks against the time spent in the idle task.The measurement is done by using the GROUP command to group all idle tasks and calculating the time spent in all other tasks.Example: T wo idle tasks named “IdleT ask1” and “IdleT ask2”:; Create a group called "idle" with the idle tasksGROUP.CreateTASK "idle" "IdleTask1"GROUP.CreateTASK "idle" "IdleTask2"; Unmark “idle” and mark all others in redGROUP.COLOR "idle" NONEGROUP.COLOR "other" RED; Merge idle tasks and other tasksGROUP.MERGE "idle"GROUP.MERGE "other"T o evaluate the contents of the trace buffer, use these commands:Trace.STATistic.TASK Display CPU load statistic evaluationTrace.PROfileChart.TASK Display CPU load as colored graph The start of the recording time, when the calculation doesn’t know which task is running, is calculated as “(unknown)”.When CPU load analysis is no longer needed, or if a detailed Task Runtime Statistic is needed, disable the grouping of the tasks with:;commentsGROUP.SEParate "idle"GROUP.SEParate "other"PXROS Specific Menu for TracingThe menu entries specific to tracing are already described in the menu for debug features.PXROS CommandsTASK.ListmbXDisplay mailboxesThis command is just an alias for Task.ListObj.MailBoX. See there for a description.TASK.ListObjectList objectsList PXROS objects. See detailed descriptions below.Format:TASK.ListmbX <mbx_id >Format:TASK.ListObject.[<object>]<object >:MeSsaGe | DeLaY | OPool | MemClass | MailBoXTASK.ListObj.DeLaYDisplay delay objectsDisplays a table of the delay objects in the system.TASK.ListObj.MailBoXDisplay mailboxesWithout any argument, this command displays all system and private mailboxes.With a mailbox a mailbox id as an argument, it shows the specified mailbox with it's pending messages and waiting tasks.Format:TASK.ListObj.DeLaYFormat:TASK.ListObj.MailBoX <mbx_id >TASK.ListObj.MemClass Display memory classes Format:TASK.ListObj.MemClassDisplays a table of the memory classes.The 'type' field contains the memory class type. If this is fixed, the 'blksize' field contains the block size.'fbytes' and 'fblks' contain the free bytes and free blocks in that mc.TASK.ListObj.MeSsaGe Display message objects Format:TASK.ListObj.MeSsaGeDisplays a table of the message objects in the system.The 'data' field shows the pointer to the message data.The 'size' field specifies the message size, while 'buff' is the siye of the entire data area.The 'type' is either 'Req' for 'PxMsgRequest' or Env for 'PxMsgEnvelop'.TASK.ListObj.OPoolDisplay object poolsDisplays a table of the object pools.The 'wait' column contains the number of waiting tasks.TASK.ListTaskDisplay task tableWithout any argument this command displays a list of tasks. For an explanation of the mode bits check the PXmon manual.With an ID or a task name as an argument, you get a detailed description of that task.Format:TASK.ListObj.OpoolFormat:TASK.ListTask <task >。
关于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 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调试技巧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 异常控制系统文档说明书

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。
Intel Processor Trace用户手册说明书

Intel® Processor T race Release 09.2023Intel® Processor TraceTRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ......................................................................................................................ICD In-Circuit Debugger ................................................................................................................Processor Architecture Manuals ..............................................................................................x86 ............................................................................................................................................Intel® Processor Trace (1)Configuration (4)Selective Tracing (optional)4 Tracing to Memory6 Memory Buffer Size6Example Script (7)CPU specific IPT Commands (8)IPT Intel® Processor Trace (IPT)8 IPT.CLEAR Clear memory for new core configuration8 IPT.CLOCK CPU core clock8 pressReturn Compression of near return addresses8 IPT.CR3Filtering by CR39 IPT.CycleAccurate Enable cycle accurate tracing9 IPT.CycleCountThreshold Cycle count for cycle accurate tracing9 IPT.DataTrace Enable data tracing10 IPT.DataTraceFUP Trace IP when data trace packet is generated10 IPT.EXPORTBASE IPT output region10 IPT.IgnoreGERR Ignore FIFO full errors11 IPT.LessPackets Do not create IPT packets on certain circumstances11 IPT.MiniTimeCounter Enable 'MiniTimeCounter' packets11 IPT.OFF Switch IPT off12 IPT.ON Switch IPT on12 IPT.PortRoute Selection of trace HW12 IPT.Register Show IPT registers12 IPT.PacketCount Synchronization period13 IPT.RESet Reset IPT settings13 IPT.state Display IPT settings14 IPT.SuperTimeSync Enable 'SuperTimeSync' packets14 IPT.SyncPeriod Synchronization period15IPT.TImeMode Timestamp mode15 IPT.TimeStampCLOCK Timestamp frequency15 IPT.TraceCORE Trace selected cores only15 IPT.TraceID Assign STP ID(s) to core(s)16 IPT.TraceOS Filtering by current privilege level 016 IPT.TraceUSER Filtering by current privilege levels 1-317 IPT.TSC Enable timestamp counter packets17Connectors (18)Intel® MIPI60 Connector18 MIPI60-P Connector19Intel® Processor TraceVersion 10-Oct-2023ConfigurationSelective Tracing (optional)The following command is available to selectively enable or disable the IPT trace by means of the Instruction Pointer (IP):Without any option, this command works as described in Break.Set . The /Program option is mandatory!The IPT infrastructure allows for up to two IP filter breakpoints, which can be of different or same kind. Please refer to the schematic below:Break.Set<range > [/<option >] /ProgramFilter by IP<option>DescriptionTraceEnable Enables the trace whenever the IP is within the specified range.ExcludeDisables the trace whenever the IP is within the specified range. Must be preceded by a /TraceEnable.T wo register bits control the generation of trace data: T raceEnable and T raceActive. Both must be set to ‘1’ in order to enable the trace (AND operation). They can either be accessed by the IP address comparators or by the CPU / debugger.Without any interference by the CPU, the debugger sets T raceEnable=0 and T raceActive=1 as defaults. As long as the IP executes code within the /T raceEnable range, T raceEnable will be ‘1’. Otherwise it will be ‘0’. Correspondingly T raceActive becomes ‘0’ within the /T raceEnable /Exclude range and ‘1’ otherwise.This leads to the following trace scenarios:0 TraceEnable breakpoint 1 TraceEnablebreakpoint2 TraceEnablebreakpoints0 Exclude breakpoint IPT is always on.IPT is enabled while the IP iswithin the specified/T raceEnable range.IPT is enabled whilethe IP is within one ofthe two specified/TraceEnable ranges.1 Exclude breakpoint IPT is enabled whilethe IP is outside thespecified/TraceEnable range.IPT is enabled while the IP iswithin the /T raceEnablerange.The user may manually setTraceEnable=1 (via CPU ordebugger) for the /Excludeoption to take effect.2 Exclude breakpoints IPT is enabled while the IP is outside the two specified/TraceEnable ranges.NOTE:The two ranges must not overlap, otherwise the behavior is undefined!Tracing to MemoryIn order to trace to memory, the debugger has to be informed about the data format first. This is done via Onchip.Buffer.IPT Trace data in memory is IPT.(See also Onchip.Buffer.LBR and Onchip.Buffer.BTS).After that the base address in RAM must be specified to which the trace data will be dumped. Make sure the buffer is reserved memory and will not be written by any application code on the target!Onchip.Buffer.BASE<base>Memory base address for trace data.Default: 0x0The size of the buffer is configured via Onchip.Buffer.SIZE.NOTE:Only make use of this command when IPT is disabled (IPT.OFF)!Memory Buffer SizeWhen in onchip mode, this command defines the size of the trace buffer in bytes. Also seeOnchip.Buffer.BASE. The size must be in range 0x0 - 0x1000000.Onchip.Buffer.SIZE<size>Total buffer size in bytes.Default: 0x0NOTE:Only make use of this command when IPT is disabled (IPT.OFF)!Example ScriptThis example script assumes that the target is stopped and the Lauterbach sieve demo has been loaded.; Trace core with STP master ID = 0x80IPT.TraceID 0x80IPT.ON; Optionally: Determine traceport configuration automatically.Analyzer.AutoArm ONAnalyzer.AutoFocusTrace.RESetTrace.InitBreak.RESet; Only trace function 'sieve' in the demo.Break.Set var.range(sieve) /TraceEnable; Alternatively: Trace all code except 'sieve' function.;Break.Set var.range(sieve) /TraceEnable /ExlcudeGo;...Break; Display trace results.Trace.ListCPU specific IPT CommandsIPT Intel® Processor T race (IPT) The Intel® Processor T race (IPT) works similar to the LBR and BTS feature of Ix86 based cores (see “CPU specific Onchip Trace Commands” (debugger_x86.pdf). It compresses flowtrace information in a more efficient way to be exported by an external trace port.IPT is implemented on selected architectures only and therefore the following commands are not available to all Ix86 based cores.IPT.CLEAR Clear memory for new core configuration Format:IPT.CLEARClears and sets up onchip memory after core configuration has been changed via Core.Number orCore.Assign. Only needed if Trace.Method is Onchip.IPT.CLOCK CPU core clock Format:IPT.CLOCK <frequency>Clock frequency of the CPU(s). This value will be used to compute execution times in cycle accurate tracing mode.pressReturn Compression of near return addresses Format:pressReturn [ON | OFF]Default: OFF.If ON, use LIP compression instead of an T arget IP packet to indicate the return address of a near call.IPT.CR3Filtering by CR3 Format:IPT.CR3<address>Default: EmptyEnables tracing if CR3 (page table pointer) matches the specified address value. In order to disable selective tracing, <address> must be left empty: IPT.CR3IPT.CycleAccurate Enable cycle accurate tracing Format:IPT.CycleAccurate [ON | OFF]Default: OFF.If ON, every instruction in the trace will have its own cycle count or a share of accumulated cycle counts (see IPT.CycleCountThreshold). Otherwise the current cycle count will only be output periodically, which helps to reduce bandwidth.IPT.CycleCountThreshold Cycle count for cycle accurate tracing Format:IPT.CycleCountThreshold <number>Default: 0.Cycle accurate trace packets will only be emitted after <number> cycles. Cycle accurate traceing must be enabled by IPT.CycleAccurate ON.IPT.DataTrace Enable data tracing Format:IPT.DataTrace [/<def>]<def>:ON | OFF |Address | ReadAddress | WriteAddress |Data | ReadData | WriteData |Read | WriteEnable data tracing.IPT.DataTraceFUP T race IP when data trace packet is generated Format:IPT.DataTraceFUP [ON | OFF]If enabled, aditionally add the current IP to the trace. This setting only has an effect if IPT.DataTrace is enabled.IPT.EXPORTBASE IPT output region Format:IPT.EXPORTBASE <base_address><limit_mask>Default: 0xFDC00000 0x7F<base_address>Base address at which IPT packets will be written to.<limit_mask>Size in bytes of the output region.The lowest 5 (RTIT) or 6 (IPT) bits are forced to ‘1’.IPT.IgnoreGERRIgnore FIFO full errorsDefault: OFF .GERR errors usually are emitted to indicate a crammed FIFO. Setting this option to OFF will suppress any fifo overflow errors in the Trace.List window.IPT.LessPacketsDo not create IPT packets on certain circumstancesDefault: OFF .If enabled, certain packets will only be generate when the following criteria are met: IPT.MiniTimeCounterEnable "MiniTimeCounter" packetsDefault: OFF .Enables the generation of MiniTimeCounter (MTC) packets.Format:IPT.IgnoreGERR [ON | OFF ]Format:IPT.LessPackets [ON | OFF ]SuperTimeSync MiniTimeCounter ContextEn=1 and FilterEn=1Periodic Cycle Counter FilterEn=1Cycle Counter incrementFilterEn=1Format:IPT.MiniTimeCounter [ON | OFF ]IPT.OFF Switch IPT off Format:IPT.OFFDisables IPT tracing.IPT.ON Switch IPT on Format:IPT.ONEnables IPT tracing.IPT.PortRoute Selection of trace HW Format:IPT.PortRoute [AUTO | Analyzer | CAnalyzer]Default: AUTO.Used to configure Lauterbach trace HW. Only required if PowerT race(Analyzer) and Combiprobe(CAnalyzer) are both attached to the debugger.IPT.Register Show IPT registers Format:IPT.RegisterDisplays IPT registers in a new PER.view window.IPT.PacketCount Synchronization period Format:IPT.PacketCount <value><value>:20474095819116383Default: 8191Used to define the minimum packet byte count after which a PSB (Packet Stream Boundary) is output. PSBs help an external decoder to synchronize with the IPT trace by inserting a unique pattern into the stream. IPT.RESet Reset IPT settings Format:IPT.RESetAll IPT settings are reset to their defaults.IPT.stateDisplay IPT settingsOpens the IPT configuration window:IPT.SuperTimeSyncEnable "SuperTimeSync" packetsDefault: OFF .Enables the generation of SuperTimeSync (STS) packets. Format:IPT.stateA For descriptions of the commands in the IPT.state window, please refer to the IPT.* commands in this chapter. Example : For information about the ON radio option, see IPT.ON .Format:IPT.SuperTimeSync [OFF | 14-7 | 16-9 | 18-11 | 20-13]OFF No packets will be generated.14-7Bits 14:7 of the HW timestamp counter will be exported.16-9Bits 16:9 of the HW timestamp counter will be exported.18-11Bits 18:11 of the HW timestamp counter will be exported.20-13Bits 20:13 of the HW timestamp counter will be exported.AIPT.SyncPeriod Synchronization period Format:IPT.SyncPeriod <value>Deprecated. Use IPT.PacketCount.IPT.TImeMode Timestamp mode Format:IPT.TImeMode <mode><mode>:OFF | External | ExternalInterpolated |MiniTimeCounterTimeStampCounterCycleAccurateCycleAccurate+ExternalCycleAccurate+ExternalTrackCycleAccurate+TimeStampCounterSee ETM.TImeMode.IPT.TimeStampCLOCK Timestamp frequency Format:IPT.TimeStampCLOCK <frequency>Timing information in the Trace.List window will be displayed in SI units instead of cycles.IPT.TraceCORE T race selected cores only Format:IPT.TraceCORE <core1><core2>Default: All onAll core traces except the stated one(s) will be switched off. In case of off-chip traces this command helps to reduce bandwidth.IPT.TraceID Assign STP ID(s) to core(s) Format:IPT.TraceID<value> | <bitmask>If Intel® PT information is wrapped in STP, TRACE32 needs to know which master/channel IDs are used.<value><value> is a 32-bit number. The first 16 bits represent the master ID, thelast 16 bits represent the channel ID<bitmask>bitmask representation of <value>Example 1: Each core has its own master ID.IPT.Trace 0x00800000; master ID 0x80 is used to export PT trace; information for core 0IPT.Trace 0x008x0000; master ID 0x80, 0x81, 0x82 … are used to export; PT trace information; master ID 0x80 represents core 0; the other master IDs consecutively represent; core 1 to core 15Example 2: Each core has its own channel ID, all cores use the same master ID.IPT.Trace 0x0080000x; master ID 0x80 is used to export PT trace; information; channel ID 0 represents core 0; the other channel IDs consecutively represent; core 1 to core 15IPT.TraceOS Filtering by current privilege level 0 Format:IPT.TraceOS [ON | OFF]Default: ON.Enables or disables tracing when CPU is in Current Privilege Level 0.IPT.TraceUSER Filtering by current privilege levels 1-3 Format:IPT.TraceUSER [ON | OFF]Default: ON.Enables or disables tracing when CPU is in Current Privilege Levels 1-3.IPT.TSC Enable timestamp counter packets Format:IPT.TSC [ON | OFF]Default: OFF.Enables or disables Timestamp Counter (TSC) packets.ConnectorsIntel® MIPI60 ConnectorT arget pinout specified by Intel®.Signal Pin Pin SignalVREF_DEBUG12TMSTCK034TDOTDI56No ConnectHOOK[6]=Reset In7810 kOhm to GNDTRST_N910PREQ_NPRDY_N1112VTREF_TRACEPTI_0_CLK1314PTI_1_CLKPOD_PRESENT1_N1516GNDPOD_PRESENT2_N1718PTI_1_DAT A[0]PTI_0_DATA[0]1920PTI_1_DAT A[1]PTI_0_DATA[1]2122PTI_1_DAT A[2]PTI_0_DATA[2]2324PTI_1_DAT A[3]PTI_0_DATA[3]2526PTI_1_DAT A[4]/PTI_2_DATA[0]PTI_0_DATA[4]2728PTI_1_DAT A[5]/PTI_2_DATA[1]PTI_0_DATA[5]2930PTI_1_DAT A[6]/PTI_2_DATA[2]PTI_0_DATA[6]3132PTI_1_DAT A[7]/PTI_2_DATA[3]PTI_0_DATA[7]3334HOOK[7]=Reset OutPTI_0_DATA[8]/PTI_3_DATA[0]3536HOOK[3]=Boot StallPTI_0_DATA[9]/PTI_3_DATA[1]3738HOOK[2]=CPU Boot StallPTI_0_DATA[10]/PTI_3_DATA[2]3940HOOK[1]=Power ButtonPTI_0_DATA[11]/PTI_3_DATA[3]4142HOOK[0]=PWRGOODPTI_0_DATA[12]/PTI_3_DATA[4]4344HOOK[5]PTI_0_DATA[13]/PTI_3_DATA[5]4546HOOK[4]PTI_0_DATA[14]/PTI_3_DATA[6]4748I2C_SCLPTI_0_DATA[15]/PTI_3_DATA[7]4950I2C_SDATCK15152GNDTRIG_INOUT5354DBG_UART_TXTRIG_IN5556DBG_UART_RXGND5758GNDPTI_3_CLK5960PTI_2_CLKMIPI60-P ConnectorNot all pins of the Intel® MIPI60 connector are connected to the Prepro. for Intel® PT AUTOFOCUS MIPI60-P. The connected pins are displayed with their name on a gray background in the picture below.Signal Pin Pin SignalVREF_DEBUG12TMSTCK034TDOTDI56No ConnectNo Connect78No ConnectTRST_N910PREQ_NPRDY_N1112VREF_TRACEPTI_0_CLK1314No ConnectNo Connect1516No ConnectNo Connect1718No ConnectPTI_0_DATA[0]1920No ConnectPTI_0_DATA[1]2122No ConnectPTI_0_DATA[2]2324No ConnectPTI_0_DATA[3]2526No ConnectPTI_0_DATA[4]2728No ConnectPTI_0_DATA[5]2930No ConnectPTI_0_DATA[6]3132No ConnectPTI_0_DATA[7]3334No ConnectPTI_0_DATA[8]3536No ConnectPTI_0_DATA[9]3738No ConnectPTI_0_DATA[10]3940No ConnectPTI_0_DATA[11]4142No ConnectPTI_0_DATA[12]4344No ConnectPTI_0_DATA[13]4546No ConnectPTI_0_DATA[14]4748No ConnectPTI_0_DATA[15]4950No ConnectNo Connect5152No ConnectNo Connect5354No ConnectNo Connect5556No ConnectNo Connect5758No ConnectNo Connect5960No Connect。
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系统:OSEK实时任务调试器及功能介绍说明书

R TO S -O S E KT e c h n i c a l I n f o r m a t i o n13.03.19RTOS-OSEKRTOS Debugger for Freescale OSEK■Real time, non-intrusive display of OSEK system resources■OSEK specific display of analyzer listing■Statistic evaluation and graphic display of task run times■Statistic evaluation and graphic display of service run times■Task related evaluation of function run times ■Task stack coverage■PRACTICE functions for OS data ■OSEK related pull-down menuThe TRACE32 System includes a multitask debugger to provide symbolic debugging in real time operating sys-tems. Our software pack-age contains a ready-to-run con-figuration for the OSEK/VDX conform Real Time Kernel OSEK from Freescale.Based on the ORTI (OSEK Runtime Interface) all informa-tions of the OSEK RTOS and its configuration can be explored. This leaflet will guide you through the additional implemented features in TRACE32, to do an effective debugging on OSEK systems.PowerPC 55568HC12Multitask Debugging on TRACE32 with Motorola OSEKReal time, non-intrusive display of Motorola OSEK sys-tem resourcesThe TRACE32 multitask debugger for OSEK provides special display func-tions. The system resources such as task list, messages, counters, alarms, stacks and resources can be displayed. In addition, by using the emulatorsdual-port memory, the display of all these regions can be viewed non-intru-sively in real time. The tables are updated permanently (“On The Fly”),without affecting the application at all.Task list window, message window and alarm windowConfiguration of OSEK operating system windowMotorola OSEK specific display of analyzer listingStatistic evaluation and graphic display of task run timesThe analyzer can calculate statistic tables of task run times and task switches. A graphical diagram shows which task was active at a specific time, giving a clearview of the behaviour of the system.Analyzer listing, task selective recording, display of taskswitches and assembler mne-monicsThe data recorded in the ana-lyzer can be displayed and interpreted specific to the oper-ating system. T ask switchesare displayed symbolicallyStatistics and flow of tasksStatistic evaluation and graphic display of service run timesThe statistic and graphic evaluation of service calls and service run times can be done . This is necessary, if one ser-vice need much time and is called very often the performance of the operatingsystem goes down..Statistics and flow of servicesTask related evaluation of function run timesThe statistic and graphic evaluation of function calls and function run times can be done dependant to the actual running task. This is necessary, if dif-ferent tasks call one single function at the same time, or if a task switchoccurs in between the function.Analyzer listing, function call hierarchy and process switchesStatistics on function hierarchy, process relatedTask Stack CoverageIn real time systems it is quite impor-tant to know, how much stack space each task consumes. For this purpose a special window shows the current and the maximum usage of each seperate task.PRACTICE functions for OS data The support includes extended PRAC-TICE functions for process specificdata. E.g. the function “TASK.CON-FIG(magic)” returns the address of theso called magic value.Process stack coverage windowMotorola OSEK related pull-down menuBecause the menu bar of theTRACE32 user interface can be fully customized, you can create a new pull down menu, including operating sys-tem specific commands. We deliver OSEK support with an example for such specific menues, which providesfast access to the OSEK features.TRACE32 with OSEK menuContactInternational RepresentativeArgentinaAnacom Eletronica Ltda.Mr. Rafael SoriceRua Nazareth, 807, BarcelonaBR-09551-200 São Caetano do Sul, SP Phone: +55 11 3422 4200FAX: +55 11 3422 4242EMAIL:******************.br AustraliaEmbedded Logic Solutions P/LMr. Ramzi KattanSuite 2, Level 3144 Marsden StreetParramatta NSW 2150Phone: +61 2 9687 1880FAX: +61 2 9687 1881EMAIL:*****************.au AustriaLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:******************** BelgiumTritec 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, SP Phone: +55 11 3422 4200FAX: +55 11 3422 4242EMAIL:******************.br CanadaLauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752 Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:********************** China BeijingLauterbach Technologies Co., LtdMr. Linglin HeBeijing OfficeA3,South Lishi Road, XiCheng District Beijing 100037, P.R. ChinaPhone: +86 10 68023502FAX: +86 10 68023523EMAIL:************************* China ShenzhenLauterbach Technologies Co., Ltd1406/E Xihaimingzhu BuildingNo.1 Taoyuan Road, Nanshan District Shenzhen 518052, P.R. China Phone: +86 755 8621 0671FAX: +86 755 8621 0675EMAIL:**************************China SuzhouLauterbach Technologies Co., Ltd Mr. Linglin HeHengyu Square, Rm 709No. 188, Xing Hai StreetSuzhou, 215021 P.R. of China Phone: +86 512 6265 8030FAX: +86 512 6265 8032EMAIL:********************** Czech. RepublicLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:******************** DenmarkNohau Danmark A/SMr. Flemming JensenHørkær 26, Plan 4DK-2730 HerlevPhone: +45 44 52 16 50FAX: +45 44 52 26 55EMAIL:*************EgyptLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:******************** FinlandNohau Solutions FinlandMr. Martti ViljainenTekniikantie 14FI-02150 EspooPhone: +358 40 546 0142FAX: +358 9 2517 8101EMAIL:**************FranceLauterbach S.A.R.L.Mr. Jean-Pierre ParadisoEuroparc - Le Hameau B135 Chemin Des BassinsF-94035 Créteil CedexPhone: +33 1 49 56 20 30FAX: +33 1 49 56 20 39EMAIL:********************** GermanyLauterbach GmbHSales Team GermanyAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:******************** GreeceLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:******************** HungaryLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +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 RoadIndia - Bangalore 560055Phone: +91 80 67648888FAX: +91 80 23475615EMAIL:************************* India-ChennaiElectro Systems Associates Pvt. Ltd. Mr. D. KannanNo.109 /59A , Ground FloorIV Avenue, Ashok NagarIndia - Chennai - 600 083 Tamilnadu Phone: +91 044-24715750FAX: ++91 44 24715750EMAIL:********************India-DelhiElectro Systems Associates Pvt. Ltd. Mr. R.K. BhandariNo. 705, 7th Floor, Laxmi Deep ShivajinagarIndia - Delhi - 110 092Phone: +91 11-22549351FAX:EMAIL:******************India-HyderabadElectro Systems Associates Pvt. Ltd. Mr. C.V.M. Sri Ram MurthyShop No. 14, "Global Enclave" Bhagyanagar Colony, Kukat pallyIndia - Hyderabad 500 072Phone: +91 40-23063346FAX: +91 40-23063346EMAIL:**********************India-KolkataElectro Systems Associates Pvt. Ltd. Mr. Arun RoyIndia - KolkataPhone: +91 98305 78843FAX:EMAIL:********************India-PuneElectro Systems Associates Pvt. Ltd. Mr. R K BhandariShriram Complex,1126/1, Model Colony ShivajinagarIndia - Pune - 411 016Phone: +91 20 - 30462035 / 25663FAX: +91 20-25677202EMAIL:*****************IrelandLauterbach Ltd.Mr. Richard Copeman11 Basepoint Enterprise Centre Stroudley RoadBasingstoke, Hants RG24 8UPPhone: 0044-118 328 3334FAX:EMAIL:**********************IsraelItec Ltd.Mr. Mauri GottliebP.O.Box 10002IL-Tel Aviv 61100Phone: +972 3 6491202FAX: +972 3 6497661EMAIL:***************.ilItalyLauterbach SrlMr. Maurizio MenegottoVia Enzo Ferrieri 12I-20153 MilanoPhone: +39 02 45490282FAX: +39 02 45490428EMAIL:**********************JapanLauterbach Japan, Ltd.Mr. Kenji Furukawa3-8-8 ShinyokohamaKouhoku-ku, Nisso 16th BuildingY okohama-shi, Japan 222-0033 Phone: +81 45 477 4511FAX: +81 45 477 4519EMAIL:******************.jp LuxembourgTritec 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:*******************.sg MexicoLauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752 Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:********************** NetherlandsTritec Benelux B.V.Mr. Robbert de VoogtStationspark 550NL-3364 DA SliedrechtPhone: +31 184 41 41 31FAX: +31 184 42 36 11EMAIL:******************New ZealandEmbedded Logic Solutions P/LMr. Ramzi KattanSuite 2, Level 3144 Marsden StreetParramatta NSW 2150Phone: +61 2 9687 1880FAX: +61 2 9687 1881EMAIL:*****************.au NorwayNohau 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. Jeleniogorska 654-056 WroclawPhone: +48 71 362 6356FAX: +48 71 362 6357EMAIL:****************.pl PortugalCaptura Electronica,SCCLMr. Juan Martinezc/Duero, 40E-08031 BarcelonaPhone: +34 93 429 5730FAX: +34 93 407 0778EMAIL:******************* RomaniaLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 130FAX: +49 8102 9876 187EMAIL:********************RussiaRTSoftMr. Alexey IsaevNikitinskaya 3RUS-105037 MoscowPhone: +7 495 742 6828FAX: +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, PangyoHancom MDS Inc.Mr. Dongwook Jun3FL. Hancom Tower49, Daewangpangyo-ro 644, Bundang-gu Seongnam-si, Gyeonggi-do, 463-400, ROK Phone: +82-31-627-3000FAX: +82-31-627-3100EMAIL:*********************SpainCaptura Electronica,SCCLMr. Juan Martinezc/Duero, 40E-08031 BarcelonaPhone: +34 93 429 5730FAX: +34 93 407 0778EMAIL:*******************SwedenNohau Solutions ABMr. Jörgen NilssonDerbyvägen 6DSE-21235 MalmoePhone: +46 40 592 206FAX: +46 40 592 229EMAIL:*********************** SwitzerlandJDT Jberg DatenTechnikMr. 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, Taiwan, R.O.C. Phone: +886 2 26983456FAX: +886 2 26983535EMAIL:**********************.tw TunisiaLauterbach Consulting S.A.R.L.Mr. Khaled JmalRoute El Ain Km 3.5TN-3062 SfaxPhone: +216-31361061FAX: +216-74611723EMAIL:********************** Turkey-1Tektronik Muh. ve Tic. A.S.Mr. Hakan Y avuzCyberPlaza B-Blok, 702BBilkent06800 AnkaraPhone: +90 312 437 3000FAX: +90 312 437 1616EMAIL:******************.tr Turkey-2G3TEK Embedded Technologies Ltd. Mr. Celal AygunIlkyerlesim Mah. 445.Sok. No: 4806370 Batikent/AnkaraPhone: +90 312 3324769FAX: +90 312 3324769EMAIL:**************UKLauterbach GmbHMr. Richard CopemanAltlaufstr. 40D-85635 Höhenkirchen-Siegertsbrunn Phone: +49 8102 9876 190FAX: +49 8102 9876 187EMAIL:******************** USA EastLauterbach Inc.Mr. Udo Zoettler4 Mount Royal Ave.USA-Marlborough, MA 01752 Phone: +1 508 303 6812FAX: +1 508 303 6813EMAIL:********************** USA WestLauterbach Inc.Mr. Bob Kupyn1111 Main Street, Suite 620USA-Vancouver, WA. 98660 Phone: +1 503 524 2222FAX: +1 503 524 2223EMAIL:************************11 Additional InformationLauterbach GmbHAltlaufstr. 40D-85635 Höhenkirchen-SiegertsbrunnTel. ++49 8102 9876-0 FAX -999*******************uterbach.deLauterbach Inc.4 Mount Royal Ave.Marlboro MA 01752Phone (508) 303 6812 FAX (508) 303 6813 ********************** Lauterbach Ltd.11 Basepoint Enterprise Ctre Stroudley Road Basingstoke, Hants RG24 8UPPhone ++44-1256-333-690 FAX -661**********************http:/Lauterbach S.A.R.L.135 Chemin Des BassinsF-94035 Créteil CedexPhone ++33-149-562-030FAX ++33-149-562-039**********************http:/uterbach.fr Lauterbach Japan, Ltd.3-9-5 Shinyokohama Kouhoku-kuY okohama-shi Japan 222-0033Phone ++81-45-477-4511 FAX -4519*********************uterbach.co.jp Lauterbach s.r.l.Lauterbach s.r.l.Via Enzo Ferrieri 12I-20153 MilanoPhone ++39 02 45490282FAX ++39 02 45490428*********************uterbach.itSuzhou Lauterbach Consulting Co.,Ltd.Room 1605, Xing Hai International Square No.200, Xing Hai StreetSuzhou, 215021 PR of ChinaPhone: 0086-512 6265 8030FAX: 0086-512 6265 8032*********************DisclaimerThe information presented is intended to give overview information only.Changes and technical enhancements or modifications can be made with-out notice.。
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 用户手册说明书

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 在线帮助说明书

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 PowerView用户手册说明书

(a)
(b)
4. Click [ok] to execute the modified command. 5. Click Single Step on the TRACE32 toolbar. Changed registers are highlighted immediach
Debugger Tutorial | 6
Set Up the Debug Environment
In order to set up your debugger, you need some knowledge about your CPU and your target configuration.
Debugger Tutorial
Release 09.2023
MANUAL
How long does it take? 60 minutes
©1989-2023 Lauterbach
Debugger Tutorial | 5
Set up the TRACE32 Environment
After installing the TRACE32 on your host PC, a default environment is set up. This configuration can be adapted to your debugging environment. By default the configuration file config.t32 in the system directory (e.g. C:\T32 or /opt/t32) is used. The option -c allows you to define your own location and name for the configuration file.
trace32 cmm 语法

trace32 cmm 语法Trace32 CMM(Component Measurement Microcontroller)是一个基于组件的测量控制器,用于对电子组件进行自动测试和测量。
它使用一种类似于C语言的编程语言来编写测试程序。
以下是Trace32 CMM的一些基本语法:1. 注释:使用"//"或"/* */"来添加注释。
c// 这是一条注释/* 这是一个多行注释 */2. 变量声明:使用"var"关键字来声明变量。
cvar ledPin: uint; // 声明一个LED引脚变量var buttonPin: input; // 声明一个按钮引脚变量3. 赋值语句:使用"="运算符来给变量赋值。
cledPin = 1; // 将ledPin变量赋值为1buttonPin = input; // 将buttonPin变量赋值为输入引脚类型4. 条件语句:使用"if"关键字来执行条件语句。
cif (buttonPin == 0) then // 如果按钮按下{// 执行一些操作}5. 循环语句:使用"for"或"while"关键字来执行循环语句。
cfor i = 0 to 10 do // 从0到10循环执行以下语句块{// 执行一些操作}6. 函数声明:使用"function"关键字来声明函数。
cfunction myFunction(param1: int; param2: string): int; // 声明一个返回整型值的函数,接受两个参数,一个是整型,另一个是字符串类型7. 函数调用:使用函数名和参数列表来调用函数。
cresult = myFunction(10, "hello"); // 调用myFunction函数,并传递参数10和"hello",将返回值存储在result变量中。
Trace32_基础配置与调试

Confidential Documents
17
临时文件夹设置
2013-10-16
Lauterbach Academy
Confidential Documents
18
调试环境字体大小
2013-10-16
Lauterbach Academy
Confidential Documents
19
显示语言的选择
Confidential Documents
9
输入license key
2013-10-16
Lauterbach Academy
Confidential Documents
10
选择主机OS
2013-10-16
Lauterbach Academy
Confidential Documents
11
选择目标平台CPU类型
2013-10-16
Lauterbach Academy
Confidential Documents
56
Go
执行应用程序,直到碰到用户设置的 断点才停下来。
2013-10-16
Lauterbach Academy
Confidential Documents
28
各类转换接口
Adaption for Arm Adaption for CEVA-X Preprocessor Adaption for ARM ETM Preprocessor MIPI-60 ARM Converter ARM-20 to/from ARM-14 Debugger Adaption for Intel® Atom™/x86 JTAG Connector for PowerPC440
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软件更新手册说明书

!!!-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与目标设备的连接。
具体步骤如下:1. 连接目标设备的调试接口和开发计算机的引导接口。
这样,我们就可以通过Trace32连接到目标设备。
2. 启动Trace32,并选择"Connect"选项。
然后,选择适配器和目标设备的连接方式。
3.配置连接选项,包括目标设备的型号和调试接口。
4. 完成连接配置后,点击"Connect"按钮,Trace32将尝试与目标设备建立连接。
二、调试基本操作Trace32提供了一系列的调试工具和选项,可以帮助开发人员定位和修复软件错误。
下面是一些常见的调试操作:2. 设置断点。
Trace32允许我们在软件的特定位置设置断点,以便在执行到断点位置时暂停软件运行。
我们可以通过命令行或图形界面设置断点,以及设置条件断点和硬件断点。
3.单步调试。
当软件执行到断点或者处于暂停状态时,我们可以使用单步调试功能,逐条指令地执行软件。
这样,我们可以更加详细地了解软件的执行过程,并分析软件的状态和变量值。
4. 查看寄存器和变量值。
Trace32允许我们查看目标设备上的寄存器和变量的值。
我们可以通过Trace32的寄存器窗口或变量窗口查看这些值,并在调试过程中对这些值进行修改。
5. 追踪函数调用和函数返回。
Trace32可以追踪函数的调用和返回过程,以帮助开发人员理解软件的执行流程和函数调用关系。
6. 监视程序性能。
Trace32可以监视程序的性能指标,如执行时间、内存占用等。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
打开后的程序列表窗口可以有下面几种形式。 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. 用命令设置软件断点
五、 观察/修改存储器 从主菜单区点击“View->Dump…” ,打开存储器观察窗口,如下图所示。 Pic17. 存储器地址输入框
在地址输入框中输入要观察的地址,地址也可以用符号方式输入。输入地址之后点击 “OK”按钮,打开存储器显示窗口,如下图所示。 Pic18. 存储器显示窗口
用鼠标双击某一个存储单元的内容,在命令行就会出现存储器数据修改命令提示,用户 只要填入要修改的数据回车即可。如下图所示。 Pic19. 存储器修改命令提示
Trace32 软件使用
(亦可见 TRACE32-使用.pdf 与 icd_tutorial.pdf)
一、 首先安装软件 Trace32。 二、 启动软件,Trace32 ICD ARM USc1. 调试界面
红圈中的“system down”指示目标板已经供电,如果目标板电源电压低或没有的话,红 圈的区域会显示“POWER DOWN” 。TRACE-ICP 通过 JTAG 接口的 1 脚检测目标 板电压,电压范围应该在 1.8 到 3.3 伏之间。 如 Pic1 中红色字体所指示的那样, 调 试界面分成五个区域, 从上到下依次是主菜单区、快捷按钮区、工作区、行命令输入 区、行命令软件区、状态显示区。 主菜单区是各种菜单命令的入口区域。 快捷按钮区 是各种常用命令的快捷使用按钮。 用户可以自定义主菜单和快捷按钮。 工作区是各种 对话框窗口的显示区域。 行命令输入区是各种命令通过手动输入执行的区域。 行命令 软键区是协助用户输入行命令的区域, 它提供所有行命令的软键输入方法。 状态显示 区指示当前的调试状态。 2.2 JTAG 连接设置 该设置的作用是告诉调试界面目标板 JTAG 链路的设置情况, 以便能够正确连 接,
也可以通过在程序列表窗口的程序指令或源码旁边的空白处双击鼠标左键, 直 接在看到的程序上设置软件断点。如下图所示。 Pic31. 在程序列表窗口中设置软件断点
在 Pic31 中红色圆圈中的标示就是断点标示。另外,用户还可以在程序列表窗口中点击 鼠标右键,打开辅助对话框,选择 Breakpoints->Program。如下图所示。 Pic32. 通过鼠标右键设置软件断点
对于前面描述的第一种情况,多个器件串联在同一个 JTAG 链上,用户需要在图二十 三所示的对话框中选择“MultiCore” ,打开 MultiCore 对话窗口,如下图所示。 Pic3. MultiCore 对话框
最上方的红框中的部分描述多个器件在一个 JTAG 链上的位置。所谓“JTAG 串联” , 就是一个器件的 TDI 和另一个器件的 TDO 相连,没有连接的 TDI 与 JTAG 口的 TDI 连接,没有连接的 TDO 与 JTAG 口的 TDO 连接。图二十四中的红框中的图形 形象地描述了这种连接。在图形中, “core”表示被调试的处理器,如 ARM926EJ-S, “IRPOST”表示连接在 JTAG TDI 和“core”的 TDI 之间的器件的 JTAG IR 寄存器 长度的和,在“IRPOST”下方的编辑框内要填入这个和的值, “DRPOST”表示连接 在 JTAG TDI 和“core”的 TDI 之间的器件的数目,在“DRPOST”下方的编辑框内 填入这个数目值,“IRPRE”表示连接在 JTAG TDO 和“core”的 TDO 之间的器件的 JTAG IR 寄存器长度的和,在“IRPRE”下方的编辑框内要填入这个和的值,“DRPRE” 表示连接在 JTAG TDO 和“core”的 TDO 之间的器件的数目,在“DRPRE”下方的 编辑框内填入这个数目值。填入上面四个值,就完成了 JTAG MultCore 的设置。
如果选择“Attach”按钮并且目标处理器正在运行的话,在界面的状态显示区会有一个 绿色的“Running”条显示,如下图所示。
Pic8. Attach 连接成功
可以通过点击红圈中的按钮停止程序执行, 以便观察程序当前的处理器执行状态。 三、 运行脚本文件
从主菜单区点击“File->Run Batchfile…”打开脚本文件选择对话框。如下图所视。 Pic9. 脚本文件执行菜单
对前面描述的第二种情况,JTAG 时钟的选择,可以通过 System Settings 对话框上的 JtagClock 列表框来实现,如下图所示。
Pic4. JtagClock 列表框
红框中的部分就是 JtagClock 列表框,通过这个列表框用户可以选择 JTAG 时钟是 TCK 或 RTCK,选择 TCK 的时候,顺便选择它的频率,5MHz 或 10MHz 或 25MHz,也可以 手动在编辑框中输入频率值,如 1MHz。
如果在设置软件断点之前执行了 map.bonchip <range>命令, 并且所设置的软件断点在
<range>所指的地址范围内,那么,通过双击鼠标左键和单击鼠标右键设置软件断点的 方法所设置的断点将是 onchip 硬件断点。如果用户在 CPU 不能进行正确写操作的地 址上设置软件断点,将会出现下图所示的错误提示。 Pic33. 软件断点错误提示
符号表对话框如下图所示。 Pic22. 符号表对话框
在符号表对话框中可以通过单选钮“Symbols”选择要观察函数或是变量等符号。 在符 号表对话框中双击变量符号会打开变量观察对话框, 双击函数名会打开程序列表窗口。
八、 打开程序列表窗口 点击“View->List Source”打开程序列表窗口,如下图所示。 Pic23. 打开程序列表窗口
从主菜单区点击“CPU->Peripherals” ,打开设备寄存器窗口,如下图所示。 Pic14. 设备寄存器观察菜单
Pic15. 设备寄存器窗口
如上图所示的设备寄存器窗口在调试不同的处理器时是不同的。 如果用户要修改某个 寄存器的值, 双击该寄存器的值, 在行命令输入区就会出现相应的设备寄存器修改命 令,在命令后面输入要修改的值回车即可。如下图所示。 Pic16. 设备寄存器修改命令
对前面描述的第三种情况,通过 JTAG 与目标连接时,是否要先复位目标板,用户可以 通过下图中红框中的单选按钮进行选择。
Pic5. 系统复位选择
红框中的“EnReset”单选钮如果在前面打勾(选择),表示在 TRACE-ICP 做 JTAG 连 接时会做系统复位。 通过前面三种情况,用户完成了在 JTAG 连接动作之前的设置工作。接下来,用户就 可以连接目标了。这个连接通过下图中的红框中的“Up”或“Attach”单选钮来完成。 Pic6. JTAG 连接
Pic10. 脚本文件选择对话框
在图三十一所示的对话框中选择要执行的脚本文件,用户可以选择任意目录下的脚本文 件。脚本文件的内容主要以调试命令为主。有关脚本文件的编写,请参考软件安装目录 的“pdf”目录下的文件“practice_user.pdf”。脚本文件的 一般功能是自动执行 JTAG 设 置、目标处理器设备寄存器设置、下载要调试的应用程序(支持直接写入 FLASH)、设
选择红框中的“Up”单选钮,JTAG 通讯连接之后,目标处理器会停止执行,选择红框 中的“Attach”单选钮,JTAG 通讯连接之后,目标处理器处于它在 JTAG 通讯之前的 状态,原来是运行的,那么,它现在仍然保持运行状态,这就是我们前面描述的第四种 情况,如果用户在选择“Up”或“Attach”单选钮之后,在“Up”前面的小园框中有一 个绿色圆点,表明 JTAG 通讯已经连接成功。如下图所示。 Pic7. UP 连接成功
六、 下载程序 使用 data.load 命令实现程序下载的功能,如下图所示。 Pic20. 下载程序 上图中,“elf”指示所下载的程序的文件格式,“/v”指示程序下载完成之后进行校验。
七、 观察符号表 如下图所示,点击“View->Symbols->Browse”打开符号表对话框。 Pic21. 打开符号表对话框