逻辑分析仪与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 基本原理
Trace32基本原理Trace32是一款用于调试和分析嵌入式系统的实时追踪工具。
它提供了强大的功能,可以帮助开发人员在嵌入式系统中定位和解决各种问题。
本文将详细介绍Trace32的基本原理,包括调试器的结构、调试会话的建立和调试过程中的基本操作。
1. 调试器的结构Trace32调试器的整体结构由多个模块组成,包括调试程序、调试接口、调试硬件和调试API。
下面将依次介绍每个模块的功能和原理。
1.1 调试程序:Trace32调试程序是一个运行在宿主主机上的软件,负责控制调试会话的建立、维护和管理。
它提供了用户界面和命令行接口,可以通过图形界面或命令行输入指令来控制调试会话。
1.2 调试接口:Trace32调试接口是连接目标系统和调试程序的桥梁,用于传输调试指令和数据。
它可以通过串口、以太网、USB等方式与目标系统进行通信。
调试接口还负责解析和执行调试指令,并将调试结果返回给调试程序。
1.3 调试硬件:Trace32调试硬件是一种嵌入在目标系统中的硬件模块,用于实时监控和跟踪目标系统的运行状态。
它可以通过调试接口与调试程序进行通信,并提供实时调试数据的获取和传输功能。
1.4 调试API:Trace32调试API是一组用于访问和控制Trace32调试器的接口和函数。
开发人员可以使用这些API来编写自定义的调试脚本和工具,实现自动化的调试和分析过程。
2. 调试会话的建立为了开始调试一个目标系统,首先需要建立一个调试会话。
调试会话是Trace32与目标系统之间的通信通道,通过这个通道可以传输和接收调试指令和数据。
建立调试会话的过程一般包括以下几个步骤:2.1 配置调试硬件:首先需要连接和配置Trace32调试硬件与目标系统的连接方式。
可以通过串口、以太网、USB等方式连接调试硬件,并设置相应的通信参数。
2.2 加载调试程序:在宿主主机上启动Trace32调试程序,并加载与目标系统对应的调试程序。
调试程序将根据目标系统的体系结构和硬件情况,自动适配对应的调试接口和硬件。
学会使用调试工具解决嵌入式系统问题
学会使用调试工具解决嵌入式系统问题随着嵌入式系统的广泛应用和复杂性的提高,调试嵌入式系统问题变得愈发重要。
调试工具是解决嵌入式系统问题的得力助手,能够帮助开发人员快速定位和解决问题。
本文将介绍如何学会使用调试工具解决嵌入式系统问题。
一、调试工具的分类常见的嵌入式系统调试工具主要分为硬件调试工具和软件调试工具两大类。
1.硬件调试工具硬件调试工具一般用于嵌入式系统的硬件调试,如逻辑分析仪、示波器、仿真器等。
这些工具可用于监测信号波形、捕获和分析数据,帮助开发人员分析硬件问题。
2.软件调试工具软件调试工具用于嵌入式系统的软件调试,主要包括调试器、仿真器、代码覆盖工具、性能分析工具等。
这些工具可以帮助开发人员监控程序的运行状态,定位程序错误和性能瓶颈。
二、常用的软件调试工具1.调试器调试器是一种常见的软件调试工具,用于控制程序的执行和监控程序的状态。
调试器通常提供设置断点、单步执行、变量查看和修改、程序运行状态监控等功能。
常见的嵌入式系统调试器有GDB、JTAG调试器等。
2.仿真器仿真器是一种利用软件模拟硬件运行的工具,能够跳过硬件开发阶段,快速验证和调试嵌入式系统的软件。
通过仿真器,开发人员可以在开发主机上运行嵌入式软件,并进行调试和测试。
3.代码覆盖工具代码覆盖工具用于评估测试用例的覆盖率,帮助开发人员找到未覆盖的代码区域。
通过代码覆盖工具可以分析测试用例对程序的覆盖情况,从而帮助开发人员改进测试用例设计和调试程序。
4.性能分析工具性能分析工具可以帮助开发人员评估程序的性能状况,找出性能瓶颈。
常见的性能分析工具有时间分析器、函数调用图分析工具等。
这些工具能够帮助开发人员找到程序中的性能瓶颈,进而进行优化。
三、学会使用调试工具的步骤1.确定问题所在在使用调试工具之前,首先需要明确问题所在。
通过观察嵌入式系统的现象、记录日志和分析程序代码,尽可能准确定位问题。
2.选择合适的调试工具根据问题的性质选择合适的调试工具。
TRACE32调试技巧
TRACE32调试技巧TRACE32是一款功能强大的软件调试工具,广泛应用于嵌入式系统的调试和测试。
它提供了丰富的调试功能和强大的分析能力,可以帮助开发人员快速定位故障和优化系统性能。
下面将介绍一些TRACE32的调试技巧,帮助开发人员更好地使用这个工具。
1.使用实时跟踪功能:TRACE32支持实时跟踪功能,可以实时收集目标系统的执行信息。
通过实时跟踪,开发人员可以查看程序的执行路径、函数调用关系、指令执行时间等信息,帮助快速定位程序错误和优化系统性能。
2.设置断点和触发条件:TRACE32支持设置断点和触发条件,可以在软件运行过程中暂停程序执行。
开发人员可以根据需要设置断点,然后在断点处查看当前程序状态和变量值,帮助分析程序执行流程和调试错误。
3.使用慢速模式:TRACE32支持慢速模式,在这种模式下,可以减慢目标系统的执行速度,帮助开发人员更好地观察和分析程序的执行情况。
慢速模式可以有效地帮助调试时间较短的代码片段,并且可以避免程序执行过快导致的观察困难。
4.使用非侵入式调试功能:TRACE32支持非侵入式调试功能,可以在不停止目标系统的情况下进行调试。
这对于那些不能中断执行的实时系统非常有用,可以帮助开发人员在不中断系统运行的情况下进行调试和分析。
5.使用时间相关分析功能:TRACE32还提供了强大的时间相关分析功能,可以帮助开发人员分析程序的响应时间、任务调度时间等性能指标。
通过时间相关分析,开发人员可以发现程序中的时间瓶颈,并做出相应的优化措施。
6.使用多核调试功能:TRACE32支持多核调试功能,可以帮助开发人员调试多核处理器上的并行程序。
通过多核调试,开发人员可以查看每个核心上的程序执行情况,帮助分析并行程序的运行状态和调试错误。
7.使用快速调试功能:TRACE32拥有快速调试功能,可以加快调试过程。
通过快速调试,开发人员可以在源代码级别进行调试,而无需重新编译和烧写目标系统。
8.使用数据跟踪功能:TRACE32支持数据跟踪功能,可以帮助开发人员收集指定变量的值和修改历史。
TRACE32系列仿真器介绍
TRACE32系列仿真器介绍TRACE32系列仿真器是由German Lauterbach公司开发的一套用于嵌入式系统开发和调试的工具,旨在帮助开发人员进行快速、高效的开发和调试工作。
TRACE32系列仿真器包含多种型号,适用于不同的平台和处理器架构,如ARM,PowerPC,MIPS等。
1.统一的调试界面:TRACE32提供了一个统一的调试界面,可以同时支持多种不同的处理器架构。
这使得开发人员能够使用一套工具进行不同架构的调试工作,而不需要切换到不同的开发环境。
2.高级调试功能:TRACE32提供了丰富的高级调试功能,如断点调试、单步执行、观察变量、内存查看等。
开发人员可以利用这些功能快速定位和解决问题,提高调试效率。
3.多核调试支持:TRACE32支持多核处理器调试,可以同时跟踪和调试多个核心。
开发人员可以实时查看和分析不同核心的状态和交互情况。
4.实时追踪:TRACE32提供了实时追踪功能,可以记录系统运行时的任务切换、中断、函数调用等信息。
这有助于开发人员了解系统的运行状态,定位问题和调优性能。
5.嵌入式硬件调试:TRACE32支持对嵌入式硬件进行调试,如片上系统(SoC)和外围设备。
开发人员可以通过TRACE32对硬件进行控制和监控,以便更好地了解和优化系统设计。
6.脚本自动化:TRACE32可以通过脚本进行自动化测试和调试。
开发人员可以编写脚本来执行一系列调试操作,从而提高测试效率和减少人工操作的错误。
7.高性能仿真:TRACE32具有高性能的仿真能力,可以快速加载和运行大型程序。
这使得开发人员能够更快地进行代码调试和性能分析,提高开发效率。
总之,TRACE32系列仿真器是一套功能强大的工具,可帮助开发人员进行嵌入式系统的开发和调试工作。
无论是单核还是多核,无论是硬件还是软件,TRACE32都提供了丰富的调试功能和便于使用的界面,让开发人员能够更轻松地进行调试工作,提高效率。
嵌入式系统 调试方法
嵌入式系统调试方法
嵌入式系统调试方法可以根据不同的调试目标和调试需求采用不同的方法。
以下列举了一些常见的嵌入式系统调试方法:
1. 基于软件的调试方法:
- 使用断点:在代码中插入断点,停止程序运行并观察变量值,跟踪程序执行流程。
- 打印调试信息:通过在代码中插入打印语句,将程序的状态信息打印输出到终端或日志文件中。
- 使用调试工具:使用专业的调试工具,如GDB、JTAG等,通过连接到嵌入式系统的调试接口,对系统进行调试和观察。
2. 基于硬件的调试方法:
- 使用示波器:通过连接示波器到嵌入式系统的输入输出接口,观察信号波形,以了解系统在运行时的状态和行为。
- 使用逻辑分析仪:通过连接逻辑分析仪到嵌入式系统的总线上,可以观察和分析总线通信、时序等情况。
- 使用仿真器/调试器:通过连接仿真器/调试器到嵌入式系统的调试接口,可以对系统进行单步调试、观察内存和寄存器状态等。
3. 试错法和排除法:
- 通过对系统的部分功能进行临时修改或替换,以确认问题所在。
- 逐步排除可能的原因,通过修改代码或配置参数,逐步缩小问题范围。
4. 远程调试方法:
- 使用远程调试工具:通过网络连接,将调试信息传输到远程电脑进行调试。
- 使用远程监控系统:通过网络连接,远程监控嵌入式系统的运行状态,收集和分析系统的日志和运行数据。
综合使用上述方法,可以帮助开发人员在嵌入式系统开发过程中有效地定位和解决问题。
嵌入式系统开发与调试技巧总结
嵌入式系统开发与调试技巧总结嵌入式系统是一种特殊的计算机系统,通常被嵌入到其他设备或系统中,用于控制和管理设备的硬件和软件。
在嵌入式系统的开发和调试过程中,技巧的运用至关重要,可以帮助开发者更高效地完成任务并解决可能出现的问题。
本文将总结一些常用的嵌入式系统开发与调试技巧,以帮助开发人员更好地理解和应用这些技巧。
1. 硬件设计与调试技巧硬件设计是嵌入式系统开发中的重要环节,其中包括电路设计、PCB 设计等。
在硬件调试过程中,以下技巧可以帮助开发者解决可能出现的问题:- 使用示波器和逻辑分析仪来观察信号和时序,以确保电路工作正常。
- 逐步测试和调试硬件模块,排除故障点。
- 使用仿真软件进行虚拟调试,以验证电路设计的正确性。
2. 软件开发与调试技巧软件开发是嵌入式系统开发中的另一个重要环节。
以下是一些可以帮助开发者提高软件开发和调试效率的技巧:- 使用调试器和调试软件进行开发和调试,如 gdb 调试器。
- 使用断点和监视器来检测和跟踪程序中的错误。
- 使用日志输出来记录程序运行的关键信息,以便调试和分析问题。
- 编写良好的测试用例,覆盖各种场景和边界条件,以确保程序的正确性。
3. 性能优化技巧在嵌入式系统开发中,性能优化是一个很重要的课题。
以下是一些常用的性能优化技巧:- 优化算法和数据结构,减少计算和访问时间。
- 使用硬件加速器和并行处理来提高系统性能。
- 避免不必要的内存分配和释放,以减少内存碎片和提高系统响应速度。
- 特殊情况下,使用汇编语言进行编程,提高程序的执行效率。
4. 故障排除技巧在嵌入式系统的开发与调试过程中,可能会遇到各种各样的问题。
以下是一些常见的故障排除技巧:- 使用调试工具和日志输出,定位和分析问题,并确认故障发生的具体位置。
- 分析模块之间的接口和通信问题,查找可能的故障点。
- 使用远程调试工具和固件更新技术,远程诊断和修复问题。
总结:嵌入式系统开发与调试技巧是嵌入式开发人员必备的知识和技能。
TRACE32 调试器使用指南 TRACE32 Trace Tutorial说明书
T race T utorial Release 02.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Debugger Getting Started ..............................................................................................Trace Tutorial (1)History (3)About the Tutorial (3)What is Trace? (3)Trace Use Cases4Trace Methods (5)Simulator Demo (6)Trace Configuration (7)Trace Recording (8)Displaying the Trace Results (10)Trace List10 Displaying Function Run-Times13 Graphical Charts13 Numerical Statistics and Function Tree14 Duration Analysis15 Distance Analysis16 Variable Display17 Track Option18Searching Trace Results (19)Trace Save and Load (20)Version 10-Feb-2023 History18-Jun-21New manual.About the TutorialThis tutorial is an introduction to the trace functionality in TRACE32. It shows how to perform a tracerecording and how to display the recorded trace information.For simplicity, we use in this tutorial a TRACE32 Instruction Set Simulator, which offers a full tracesimulation. The steps and features described in this document are however valid for all TRACE32 products with trace support.The tutorial assumes that the TRACE32 software is already installed. Please refer to “TRACE32Installation Guide” (installation.pdf) for information about the installation process.Please refer to “ICD Tutorial” (icd_tutorial.pdf) for an introduction to debugging in TRACE32 PowerView. What is Trace?T race is the continuous recording of runtime information for later analysis. In this tutorial, we use the term trace synonymously with core trace. A core trace generates information about program execution on a core,i.e. program flow and data trace. The TRACE32 Instruction Set Simulator used in this tutorial supports a fulltrace simulation including the full program flow as well as all read and write data accesses to the memory. A real core may not support all types of trace information. Please refer to your Processor Architecture Manual for more information.Trace Use CasesT race is mainly used in the following cases:1.Understand the program execution in detail in order to find complex runtime errors more quickly.2.Analysis of the code performance of the target code3.Verification of real-time requirements4.Code-coverage measurementsTrace MethodsTRACE32 supports various trace methods. The trace method can be selected in the Trace configuration window, which can be opened from the menu Trace > Configuration…If a trace method is not supported by the current hardware/software setup, it is greyed out in the trace configuration window. NONE means that no trace method is selected.We use in this tutorial the trace method Analyzer. Please refer to the description of the commandTrace.METHOD for more information about the different trace methods.Simulator DemoWe use in this tutorial a TRACE32 Simulator for Arm. The described steps are however valid for the TRACE32 Simulator for other core architectures.T o load a demo on the simulator, follow these steps:1.Start the script search dialog from the menu File > Search for scripts…2.Enter in the search field “compiler demo”3.Select a demo from the list with a double click, a PSTEP window will appear. Press the“Continue” button.We will use here the demo “GNU C Example for SRAM”.Trace ConfigurationIn order to set up the trace, follow these steps:1.Open the menu Trace > Configuration… The trace method Analyzer [A] should be selected perdefault. If this is not the case, select this trace method2.Clear the contents of the trace buffer by pressing the Init button [B].3.Select the trace operation mode [C].In mode Fifo , new trace records will overwrite older records. The trace buffer includes thus always the last trace cycles before stopping the recording.In Mode Stack , the recording is stopped if the trace buffer is full. The trace buffer always includes in this case the first cycles after starting the recording.Mode Leash is similar to mode Stack , the program execution is however stopped when the trace buffer is nearly full.TRACE32 supports other trace modes. Some of these modes depend on the core architecture. Please refer to the documentation of the command Trace.Mode for more information. We will keep here the default trace mode selection, which is Fifo .4.The SIZE field [D] indicates the size of the trace buffer. As we are using a TRACE32 Simulator, the trace buffer is reserved by the TRACE32 PowerView application on the host. It is thuspossible to increase the size of this buffer. If a TRACE32 trace hardware is used with a real chip, the size of the trace buffer is limited by the size of the memory available on the trace tool.In order to have a longer trace recording, we will set the trace buffer size to 10000000.BACDThe same configuration steps can be performed using the following PRACTICE script:Trace RecordingPress the Go button to start the program execution.The trace recording is automatically started with the program execution. The state in the Trace window changes from OFF to Arm [A]. The used field displays the fill state of the trace buffer [B].In order to stop the trace recording, stop the program execution with the Break button. The state in the trace window changes to OFF .Trace.METHOD Analyzer Trace.InitTrace.Mode FifoTrace.SIZE 10000000.BACThe trace recording is automatically started and stopped when starting and stopping the program execution because of the AutoArm[C] setting in the Trace window, which is per default enabled. The trace recording can also be started/stopped manually while the program execution is running using the radio buttons Armand OFF of the Trace window [A].Displaying the Trace ResultsTRACE32 offers different view for displaying the trace results. This document shows some examples.Please note that the trace results can only be displayed if the trace state in the Trace window is OFF. It is not possible to display the trace results while recording.The caption of a TRACE32 window includes the TRACE32 command that can be executed in the TRACE32 command line or in a PRACTICE script to open this window, e.g. here Trace.ListTrace ListA list view of the trace results can be opened from the menu T race > List > Default. The same window canbe opened from the Trace configuration window by pressing the List button.The Trace.List window displays the recorded trace packets together with the corresponding assembler and source code.In our case, trace packets are program fetches (cycle fetch) or data accesses (e.g. wr-long and rd-long for 32bit write and read accesses). Each trace packet has a record number displayed in the record column. The record number is a negative index for Fifo mode.As we are using a Simulator, each assembly instruction has an own trace packet. This is not the case with a real hardware trace.The displayed information can be reduced using the Less button. By pressing Less three times, only the high-level source code is displayed. This can be reverted using the More button.A double click on a line with an assembly instruction or high-level source code opens a List window showing the corresponding line in the code.Using the TRACE32 menu Trace > List > Tracing with Source , you get a Trace.List and a List /Track window. When doing a simple click on a line in the Trace.List window, the List window will automaticallydisplay the corresponding code line.The timing information (see ti.back column) is generated in this case by the TRACE32 Instruction Set Simulator. With a real core trace, timestamps are either generated by the TRACE32 trace hardware or by the onchip trace module.Double clickSimpleclickDisplaying Function Run-TimesTRACE32 supports nested and flat function run-time analysis based on the trace results. Please refer to the video “Flat vs. Nesting Function Runtime Analysis” for an introduction to function run-time analysis inTRACE32:/tut_profiling.htmlGraphical ChartsBy selecting the menu Trace > Chart > Symbols, you can get a graphical chart that shows the distribution of program execution time at different symbols. The displayed results are based on a flat analysis:The corresponding nesting analysis can be displayed using the menu Perf > Function Runtime > Show as Timing.The In and Out buttons can be used to zoom in/out. Alternatively, you can select a position in the window and then use the mouse wheel to zoom in/out.Numerical Statistics and Function TreeThe menu entry Perf > Function Runtime >Show Numerical displays numerical statistics for each function with various information as total run-time, minimum, maximum and average run-times, ratio, and number of function calls.ABParents [A] displays for example a caller tree for the selected function. By doing a right mouse click on func1 and selecting Parents, we see the run-times of the functions func2 and func9, which have called func1 in thetrace recording.Children [B] displays the run-times of the functions called by the selected function, for example here the function subst called by the function encode.A function call tree view of all function recorded in the trace can be displayed using the menu entries Perf >Function Runtime > Show as Tree or Perf > Function Runtime > Show Detailed Tree.Duration AnalysisBy doing a right mouse click on a function in the numerical statistics window (Trace.STATistic.Func) then selecting Duration Analysis, you get an analysis of the function run-times between function entry and exit including the time spent in called subroutines, e.g. here for the function subst (P:0x114C corresponds to the start address of the subst function):The time interval can be changed using the Zoom buttons.Distance AnalysisBy doing a right mouse click on a function in the numerical statistics window (Trace.STATistic.Func) then selecting Distance Analysis, you can get run-times between two consecutive calls of the selected function,e.g. here for the function subst (P:0x114C corresponds to the start address of the subst function):Variable DisplayThe Trace.ListVar command allows to list recorded variables in the trace. If the command is used without parameters all recorded variables are displayed:Y ou can optionally add one or multiple variables as parameters.Example: display all accesses to the variables plot1 and plot2The Draw button can then be used to plot the displayed variables graphically against time. This corresponds to the following TRACE32 command:Please refer for more information about the Trace.DRAW command to “Application Note forTrace.DRAW” (app_trace_draw.pdf).Trace.ListVar Trace.ListVar %DEFault plot1 plot2Trace.DRAW.Var %DEFault plot1 plot2Track OptionThe /Track options allows to track windows that display the trace results. Y ou just need to add the /Track option after the command that opens a trace window, e.g.Trace.List /TrackThe cursor will then follow the movement in other trace windows, e.g. Trace.Chart.Func. Default is time tracking. If no time information is available, tracking to record number is performed.TRACE32 windows that displays the trace results graphically, e.g. Trace.Chart.Func, additionally accept the /ZoomTrack option. If the tracking is performed with another graphical window, the same zoom factor is used in this case.Trace.Chart.Func /ZoomTrackSearching Trace ResultsThe Find button allows to search for specific information in the trace results.Example 1: find the first call of function func21.Enter “func2” under address / expression2.Select Program under cycle3.Press the Find First button. The next entries to func2 in the trace can then be found using theNext buttonExample 2: Find all write accesses to the variable mstatic1 with the value 0x01.Enter “mstatic1” under address / expression2.Select Write under cycle3.Enter 0x0 under Data4.Press the Find All buttonPlease refer to “Application Note for Trace.Find” (app_trace_find.pdf) for more information about Trace.Find.Trace Save and LoadThe recorded trace can be stored in a file using the command Trace.SAVE , e.g.The saved file can then be loaded in TRACE32 PowerView using the command Trace.LOADThe TRACE32 trace display windows will show in this case a LOAD message in the low left cornerPlease note that TRACE32 additionally allows to export/import the trace results in different formats. Refer to the documentation of the command groups Trace.EXPORT and Trace.IMPORT for more information. Trace.SAVE file.adTrace.LOAD file.ad。
逻辑分析仪的原理及其应用
逻辑分析仪的原理及其应用1. 简介逻辑分析仪是一种专业的电子测试与测量设备,常用于逻辑信号的分析和调试。
它可以通过监视和分析信号的状态变化,帮助工程师定位和解决电子设备中的故障和问题。
本文将介绍逻辑分析仪的工作原理及其常见应用。
2. 工作原理逻辑分析仪的工作原理基于数字电路的运作方式。
它可以同时采样多个逻辑信号,并将其转换成数字形式进行分析。
逻辑分析仪通常包含以下主要组件:2.1 采样部分逻辑分析仪通过一组输入引脚来采样逻辑信号。
这些引脚可以连接到被测试设备的电路上,并将逻辑信号转换成数字电平。
通常,逻辑分析仪提供多个输入引脚,以便同时采样多个信号。
2.2 时钟为了进行精确的采样和分析,逻辑分析仪需要一个稳定的时钟信号。
该时钟信号用于控制采样过程和数据的同步性。
2.3 数字转换器逻辑分析仪使用数字转换器将模拟信号转换成数字形式。
这个过程称为模数转换。
数字转换器的精确性和分辨率直接影响到逻辑分析仪的性能。
2.4 内存逻辑分析仪使用内存来存储被采样的信号。
内存的大小决定了逻辑分析仪可以存储的信号量。
较大的内存可以存储更多的信号,提供更长时间的采样。
2.5 控制单元逻辑分析仪的控制单元通过与用户界面的交互来控制采样过程和数据分析。
它可以根据用户的设定来捕捉和分析特定的逻辑信号。
3. 应用领域逻辑分析仪在各个电子领域中有广泛的应用。
以下是几个常见的应用领域:3.1 数字电路设计与验证逻辑分析仪可以对数字电路进行快速和准确的验证。
它可以监测和分析不同信号路径上的时序关系,帮助工程师查找潜在的故障和设计错误。
3.2 嵌入式系统调试在嵌入式系统开发过程中,逻辑分析仪可以帮助工程师调试和分析系统中的逻辑问题。
它可以监视和分析各个部分之间的通信和数据传输,帮助工程师定位问题并进行修复。
3.3 协议分析逻辑分析仪可以用于协议分析,例如串行通信协议和总线协议。
它可以监视通信过程,捕捉和分析数据包的交互,并提供详细的时序和数据分析。
TRACE32调试培训 深入掌握嵌入式系统调试技能
并行调试是一种有效的多核调试策略,通过同时监控多个线程的执行情况,可以更快地定 位问题,提高调试效率。
3 同步和异步调试方法
同步和异步是两种常用的多核调试方法,同步方法需要开发者手动控制线程的执行顺序, 而异步方法则可以让线程自主运行,根据实际需求选择合适的调试方法,可以提高调试的 效率和准确性。
通过实际的数据监控和变量 查看操作,展示TRACE32如 何帮助开发者快速定位问题 ,提高调试效率。
03 连接操作步骤详解
硬件连接要求
连接硬件准备
在进行TRACE32调试培训前 ,请确保所有需要的硬件设 备齐全并处于良好的工作状 态。
电脑系统要求
电脑应具备足够的运行内存 和硬盘空间,推荐使用 Windows系统,并安装有支 持TRACE32的软件开发工具 包。
。
参加TRACE32调试培训后,参训者将能够快速定
位和解决嵌入式系统中的问题,提高故障排除的
速度和准确性。同时,他们还将具备独立完成项
目调试的能力,为个人职业发展和团队工作提供
有力支持。
TRACE32简介
TRACE32的发展历 程
TRACE32是一款由德国Keil 公司开发的,具有强大功能 和广泛应用的微处理器开发 工具。它自1985年问世以来 ,不断更新升级,以满足日 益增长的嵌入式系统开发需 求。
TRACE32是一种强大的嵌入 式系统调试工具,它支持多 种处理器和操作系统,可以 实时追踪程序的运行状态, 帮助我们快速定位问题。
在TRACE32中,我们可以通 过设置断点、查看寄存器值 、单步执行等方式来调试程 序,这些基本操作是每个调 试工程师必须掌握的技能。
除了基本操作,TRACE32还 有许多高级功能,如内存分 析、性能分析等,这些功能 可以帮助我们更深入地理解 程序的运行机制,提高我们 的调试效率。
trace32 基本原理
trace32 基本原理Trace32是一款基于软件和硬件的调试工具,广泛应用于嵌入式系统开发中。
它能够帮助开发人员定位和解决软件和硬件问题,提高开发效率和产品质量。
Trace32的基本原理是通过连接目标系统的调试接口,与目标系统进行通信。
它可以读取目标系统的寄存器状态、内存内容、程序计数器等信息,并能够控制目标系统的执行过程。
在使用Trace32进行调试时,首先需要将它与目标系统进行连接。
通常情况下,目标系统的调试接口是通过JTAG或SWD等标准接口来实现的。
Trace32通过该接口与目标系统建立连接,并能够读取和修改目标系统的寄存器和内存内容。
在调试过程中,Trace32可以提供丰富的调试功能。
例如,它可以在目标系统上设置断点,当程序执行到断点处时暂停执行,以便开发人员检查当前的程序状态。
此外,Trace32还可以提供单步执行功能,允许开发人员逐条指令地执行程序,并观察执行结果。
Trace32还支持对目标系统的性能分析。
它可以记录目标系统的执行时间、函数调用次数等信息,并生成相应的统计报告。
这些统计报告可以帮助开发人员找出程序的性能瓶颈,并进行优化。
除了基本的调试功能,Trace32还提供了一系列高级功能。
例如,它可以与操作系统内核进行集成,提供对操作系统的调试支持。
它还支持多核处理器的调试,能够同时调试多个核心的程序。
Trace32是一款功能强大的调试工具,可以帮助开发人员定位和解决软件和硬件问题。
它通过与目标系统的调试接口进行通信,提供了丰富的调试功能。
无论是单核还是多核系统,无论是裸机程序还是操作系统,Trace32都能够提供有效的支持。
它的使用可以大大提高开发效率和产品质量,是嵌入式系统开发中不可或缺的工具之一。
trace32 基本原理
trace32 基本原理Trace32是一种用于嵌入式系统调试和跟踪的工具,它基于硬件和软件的结合,提供了丰富的功能和工具,以帮助开发人员在调试和优化嵌入式系统时更加高效和准确。
本文将介绍Trace32的基本原理和其在嵌入式系统开发中的应用。
Trace32的基本原理是通过在目标系统中插入调试模块,跟踪目标系统的运行信息,并将这些信息传输到主机上进行分析和调试。
这些调试模块通常是通过JTAG或SWD接口与目标系统连接,并通过调试软件来控制和管理。
Trace32具有强大的实时追踪和分析功能,可以捕获目标系统的指令执行、数据读写、中断响应等信息,并以可视化的方式展示给开发人员。
Trace32的主要功能包括:1. 实时追踪:Trace32可以实时捕获目标系统的运行信息,并在主机上进行实时展示和分析。
开发人员可以实时监视目标系统的状态和性能指标,以及各个模块之间的交互和通信情况。
这对于调试和优化复杂的嵌入式系统非常有帮助。
2. 事件跟踪:Trace32可以捕获目标系统中发生的事件,如中断、异常、系统调用等。
开发人员可以通过事件跟踪功能,了解目标系统在不同场景下的行为和响应,并进行相应的调试和优化。
3. 数据跟踪:Trace32可以跟踪目标系统中的数据读写操作,包括寄存器、内存和外设的读写。
开发人员可以通过数据跟踪功能,了解目标系统中数据的变化和流动,以及数据读写操作的时序和效率。
4. 性能分析:Trace32可以对目标系统的性能进行分析和评估。
开发人员可以通过性能分析功能,了解目标系统的瓶颈和优化空间,从而提升系统的性能和响应能力。
Trace32在嵌入式系统开发中的应用非常广泛。
它可以帮助开发人员解决各种调试和优化问题,提高开发效率和系统性能。
例如,在调试阶段,开发人员可以利用Trace32实时追踪功能,监视目标系统的运行状态,定位和解决软件和硬件的问题。
在性能优化阶段,开发人员可以利用Trace32的性能分析功能,找出系统的瓶颈和瓶颈原因,并针对性地进行优化和改进。
Trace32:嵌入式能耗软件的优化新技术
Trace32:嵌入式能耗软件的优化新技术
技术驱动
开发由电池供电的设备,尤其是对设备的待机或操作时间要求比较严格的系统,例如移动电话,降低系统整体的能耗变得越来越重要。
因此采取全面的措施来降低电池能量的消耗是设计电池供电设备的重要部分。
事实上,只有通过软件全程的控制各个消耗电池能量的组件,充分地发挥其硬件的节能属性,才能达到最佳的节能效果。
能耗是电流、电压和时间的乘积,控制软件对这几个参数都有很大的影响。
因此,需要经常不断地尝试确定这三个参数在不同的操作模式下的最佳配置,以达到最佳的节能目的。
软件工程师需要可以测量、记录和分析控制软件的程序和数据流程,以及电流和电压梯度;同时以一种简单的方式把所有的记录信息相互关联起来的测试装置。
2007 年,作为业界领先的嵌入式软件能耗分析工具生产厂商,劳特巴赫公司推出一种易用解决方案,解决了上述的所有问题。
技术要求
为了可以定位出每行代码的能耗量,需要收集如下的数据信息:
-控制软件的程序流,可以采用具有实时跟踪能力的调试器来采集。
-程序运行时的电流和电压梯度,可以采用带有模拟/数字探头的逻辑分
析仪进行测量。
有了这些数据,主要的任务是如何才能把程序流、电流和电压梯度的信息关联起来。
但是,使用来自不同设备生产厂商的设备,即使可以把相关信息关联起来,实际操作仍然十分复杂,综合数据的分析和统计同样也是相当困难。
劳特巴赫嵌入式软件能耗分析技术的创新核心就是提供上述问题的解决。
trace32 基本原理
trace32 基本原理Trace32是一款非常强大的调试工具,能够为嵌入式系统调试提供丰富的支持。
那么,Trace32是如何实现这些功能的呢?下面我们来分析一下Trace32的基本原理。
一、Trace32的基本组成部分Trace32由两个主要组成部分组成:第一部分是宿主机软件,主要是调试器;第二部分是目标系统模块,主要是调试接口。
1.宿主机软件:Trace32调试器运行在宿主机上,包含了各种调试工具和特性,主要负责对目标系统进行控制和监视。
2.目标系统模块:目标系统模块主要是负责将目标系统的状态信息传输给宿主机,包括CPU寄存器、内存,以及外设的状态信息。
二、Trace32的工作原理Trace32的工作原理可以分为以下几个部分:1.调试连接建立:连接建立是Trace32的第一步,在连接建立过程中,调试器会扫描目标系统的CPU状态和内存状态,以确定目标系统的当前状态。
2.数据采集:采集数据是Trace32的核心功能之一,通过Trace32能够采集目标系统的各种信息,包括内存、外设和CPU等。
3.数据传输:Trace32采集到的数据需要传输给宿主机,以便分析和调试。
可以通过Trace32提供的各种接口和协议来实现数据传输。
4.数据分析和调试:Trace32在传输数据的同时,提供了丰富的分析和调试工具,包括数据跟踪、事件控制、信号分析等,以帮助开发人员快速发现并解决系统问题。
三、Trace32的特性和优点除了基本原理,Trace32还具有以下特性和优点:1.支持多种处理器架构:Trace32支持多种处理器架构,如ARM,MIPS 等。
2.快速的操作速度:Trace32具有快速的操作速度,能够实时监视和控制目标系统,以及快速数据传输和分析。
3.非常丰富的调试工具:Trace32提供了丰富的调试工具和特性,包括数据跟踪、事件控制、信号分析等等,以帮助开发人员快速发现和解决系统问题。
4.简单易用的用户界面:Trace32具有简单易用的用户界面,能够帮助开发人员快速上手并快速调试。
逻辑分析仪进行嵌入式系统软件调试
逻辑分析仪进行嵌入式系统软件调试张楷泰克科技(中国)有限公司摘要:随着嵌入式系统的速度的显著提高,系统设计越来越复杂,对软件调试提出了新的挑战。
传统的调试技术,仿真工具无法满足高速嵌入式系统的调试要求。
本文介绍了一种综合式软件调试技术和方法,通过使用逻辑分析仪软件调试功能,结合嵌入式系统开发时使用的编译器,仿真器,调试器,进行高速嵌入式系统的功能验证,代码诊断,软件优化,分析子程序模块的执行效率。
最后针对PPC8260处理器的软件调试提供了综合的软件调试方法。
关键词:嵌入式系统,在线仿真器,调试器,逻辑分析仪,实时跟踪1.引言在嵌入式技术飞速发展的今天,嵌入式产品已经出现在社会的各个领域,包括航空、航天、通信、军事、仪表、工业控制及家庭消费等。
全球每年要消耗掉30亿颗嵌入式微处理器,嵌入式系统带来的工业年产值已经超过了1万亿美元。
嵌入式系统软件的调试技术一直是一种困难而富有挑战性的技术,现在的微处理器在速度和复杂程度上都发展得很快,在一个典型的嵌入式系统里面不仅有高性能微处理器、存储器和各种不同的总线,还有实时操作系统,复杂的应用程序等。
这给嵌入式软件,固件设计人员在设计过程中带来了极大难度,对调试工具的开发带来了很大的冲击。
高速而又复杂的微处理器加上更长的软件使得开发一个新系统十分困难,一些传统的仿真工具无法满足全部调试要求。
本文针对高速嵌入式系统的软件调试中出现的典型问题,提供了采用调试器集成逻辑分析仪进行软件调试的新方法。
2.嵌入式系统软件调试中的典型问题在调试嵌入式目标系统时,软件设计人员常常会遇到四类问题。
2.1逻辑问题逻辑设计、编码错误或设计假设不正确都属于逻辑问题。
这些问题常常很容易被硬件仿真器或软件调试程序发现并解决。
逻辑问题通常占设计人员遇到的所有调试问题的80%,但是,解决这些问题通常仅需要占用20%的调试时间。
查找逻辑问题比较简单,进行相关的修改则比较容易。
其余20%的问题是由其它三类问题构成的,为查找和修改这些问题,可能会占用80%的调试时间。
如何利用逻辑分析仪功能解决嵌入式系统设计中的难题
保险公司劳动合同甲方(保险公司):乙方(员工):根据《中华人民共和国劳动法》、《中华人民共和国劳动合同法》及相关法律法规的规定,甲乙双方本着平等自愿、公平公正的原则,经友好协商,就乙方向甲方提供劳动力的相关事宜,达成如下协议:一、合同期限1. 本劳动合同期限为____年,自____年____月____日起至____年____月____日止。
2. 劳动合同期满后,如甲乙双方均无异议,可以续签劳动合同。
二、工作内容1. 乙方在甲方从事保险业务销售、客户服务、理赔等岗位工作。
2. 乙方应遵守甲方的规章制度,认真履行工作职责,完成甲方安排的工作任务。
三、劳动报酬1. 乙方的工资由基本工资、绩效奖金、提成等组成。
具体工资待遇按照甲方的薪酬制度执行。
2. 乙方依法享受带薪年假、法定节假日休息等福利待遇。
3. 乙方因病、工伤、产假、计划生育等特殊情况需请假时,按照甲方的规定享受相应的待遇。
四、工作时间1. 乙方实行标准工时制度,每日工作时间不超过8小时,每周工作时间不超过40小时。
2. 乙方应遵守甲方的考勤制度,按时上下班,有事提前请假。
五、保密条款1. 乙方在甲方工作期间及离职后一年内,不得泄露甲方的商业秘密、客户资料等敏感信息。
2. 乙方违反保密条款的,应承担相应的法律责任。
六、培训与发展1. 甲方为乙方提供必要的培训,提高乙方的工作技能和业务水平。
2. 甲方鼓励乙方参加各类专业培训和考试,提升个人素质。
七、社会保险和福利待遇1. 甲方按照国家和地方的规定,为乙方缴纳养老保险、医疗保险、失业保险、工伤保险和生育保险。
2. 乙方享有法定的福利待遇,包括但不限于带薪年假、产假、陪产假等。
八、解除和终止劳动合同的条件1. 甲乙双方协商一致,可以解除或终止劳动合同。
2. 乙方提前30天书面通知甲方,可以解除劳动合同。
3. 乙方在试用期内,提前3天通知甲方,可以解除劳动合同。
4. 乙方严重违反甲方规章制度,甲方可以立即解除劳动合同。
Xilinx ISE与TRACE32的集成说明(Xilinx ISE集成),Lauterbach出品
Integration for Xilinx ISE Release 09.2023TRACE32 Online HelpTRACE32 DirectoryTRACE32 IndexTRACE32 Documents ...................................................................................................................... 3rd-Party Tool Integrations .......................................................................................................... Integration for Xilinx ISE (1)Introduction (3)Getting Started (4)Usage on 64-bit Machines (5)Configuring TRACE32 (6)Configuring Xilinx ISE 11 and ISE 12 (7)Configuring Xilinx ISE 13 and ISE 14 (8)Using Xilinx iMPACT via the TRACE32 Debug Interface (9)Using Xilinx ChipScope via the TRACE32 Debug Interface (10)Compatibility (11)Troubleshooting (12)Contacting Support (14)Version 10-Oct-2023 IntroductionIn some scenarios it is necessary to use different tools via the same JT AG connector. One such scenario is using Xilinx iMP ACT and ChipScope for configuration and error detection in an FPGA together withLauterbach TRACE32 for debugging the software.T o avoid switching between different cables on the JT AG port, one can use the Lauterbach debuggerhardware with Xilinx tools. This requires configuring the Lauterbach debugger and the Xilinx tools. This article describes the necessary configuration steps.NOTE:Currently the use of Xilinx tools via TRACE32 debugger hardware is only supportedon Windows hosts. Please see section “Compatibility” for details regarding thesupported versions of Xilinx ISE.Getting StartedFor using Xilinx tools via the Lauterbach TRACE32 debug interface some configuration of TRACE32 and the Xilinx tools is required. The configuration consists of the following steps:•Install the Microsoft Visual C++ 2008 SP1 Redistributable Package which is available from Microsoft free of charge. It is important to use the SP1 version, otherwise the Xilinx tools (e.g.iMPACT, ChipScope) will fail to load the plug-in’s DLL.•Configure TRACE32 to allow 3rd-party tools to use it as JT AG back-end by adapting the config.t32 file or changing the settings in the T32Start tool.•Configure Xilinx ISE so that Lauterbach debug interface hardware is known to the Xilinx tools.This includes copying the plug-in DLL and an accompanying XML file to a predefined location.For starting a session in which the Xilinx tools use the TRACE32 debug interface proceed as follows:•First start an instance of TRACE32 PowerView and connect it to target. A running process of TRACE32 is required to service requests by the Xilinx tools to access the target’s JT AG port.•Start the Xilinx tool you want to use (e.g. iMPACT or ChipScope) and configure it by selecting the “Lauterbach cable” that was registered with the ISE installation.Details on these steps are found in the following sections of this document.For considerations on the use on 64bit hosts, refer to section “Usage on 64 bit machines”.For information about common problems, refer to section “Troubleshooting”Usage on 64-bit MachinesWhen using TRACE32 as JT AG back-end, the Xilinx tool’s version (32 bit vs. 64 bit) must match that of the TRACE32 plug-in DLL used. Therefore when using e.g. ChipScope 64bit, also the 64 bit version of the TRACE32 plug-in needs to be installed. The Xilinx tools will look for the plug-in in the location appropriate according to their version. Note that both versions of the TRACE32 plug-in can be installed in parallel because they reside in different locations.Up to and including ISE13, Lauterbach only provides a 32 bit version of the plug-in. The 32 bit version is fully functional also on 64bit machines (e.g. Win7 64 bit) but needs to be used with 32 bit Xilinx tools. Thewarning printed by the 32 bit tools running on a 64 bit host can be safely ignored.Starting with ISE14, Lauterbach provides both 32 bit and 64 bit versions of the plug-in DLL.Note, however, that the TRACE32 PowerView GUI (e.g. t32marm.exe) is not required to match the plug-in version.Configuring TRACE32There are two distinct ways to configure TRACE32 as JT AG-back-end for 3rd-party tools. Both activate the so-called TRACE32 Remote API, i.e. the feature to invoke certain functions inside TRACE32 by remote processes that bind to TRACE32 via a socket interface. T o enable the feature•either configure the T32Start toolcore->interfaces->APIPort yes 20000•or manually add the following block to the config.t32 file:<- mandatory blank line!RCL=NETASSISTPORT=20000PACKLEN=1024<- mandatory blank line!The example assumes PORT 20000 for communication with TRACE32 but any other free UDP port can be used as well. The same port number must be used in the configuration of TRACE32 and the Xilinx tools.For using Lauterbach TRACE32 debugger hardware as back-end for iMP ACT and ChipScope, it is necessary to configure Xilinx ISE so it recognizes the “Lauterbach cable”. When invoking a specific tool, it is also necessary to explicitly choose the “Lauterbach cable” for target access.For the purpose of this description, it is assumed that Xilinx ISE is installed on a MS Windows machine at c:/Xilinx/12.1/. Paths have to be adapted to your much machine. The configuration of ISE is done by•Installing the Microsoft Visual C++ 2008 SP1 Redistributable Package which is available from Microsoft free of charge. It is important to use the SP1 version, otherwise the Xilinx tools will fail to load the plug-ins DLL.•Downloading the plug-in fromhttps:///support/static/XilinxCsePlugin_11_12.zip•Extracting the ZIP file to c:/xilinx/12.1/ISE_DS/ISE/lib/nt/plugins/This will create the following directory structure:$ cd c:/Xilinx/12.1/ISE_DS/ISE/lib/nt/plugins/~/Xilinx/12.1/ISE_DS/ISE/lib/nt/plugins $ find ../Lauterbach./Lauterbach/lauterbacht32plugin./Lauterbach/lauterbacht32plugin/lauterbacht32plugin.dll./Lauterbach/lauterbacht32plugin/lauterbacht32plugin.xmlT est the installation by first invoking TRACE32, connecting it to a target board and powering it up. Then Invoke ChipScope and check if it correctly detects the target’s JT AG chain.On a Windows machine with an installation of ISE13 or ISE14, the plug-in is installed by the following steps:•Install the Microsoft Visual C++ 2008 SP1 Redistributable Package, which is available from Microsoft free of charge. It is important to use the SP1 version, otherwise the Xilinx tools will fail to load the plug-in’s DLL.•Download the plug-in fromhttps:///support/static/XilinxCsePlugin_13.zip orhttps:///support/static/XilinxCsePlugin_14.zip•Extract the ZIP-archive and copy the contents to one of the following locations, depending on whether it shall be available to all users or only to specific users:%ALLUSERSPROFILE%\.cse\<platform>\<ise version>\plugins\%USERPROFILE%\.cse\<platform>\<ise version>\plugins\The parameter platform is set as follows<platform> = nt for 32bit installations of Windows 7 or Windows XP= nt64 for 64bit installations of Windows 7 or Windows XPFor the first plug-in you install, you may have to create some of the directories.Example: In an installation for ISE14.1, the DLL and the XML files are found at the following locations:// 32bit%PLUGINS32BIT%=C:\ProgramData\.cse\nt\14.1\plugins%PLUGINS32BIT%\Lauterbach\Trace32CsePlugin_14\Trace32CsePlugin_14.dll%PLUGINS32BIT%\Lauterbach\Trace32CsePlugin_14\Trace32CsePlugin_14.xml// 64 bit%PLUGINS64BIT%=C:\ProgramData\.cse\nt64\14.1\plugins%PLUGINS64BIT%\Lauterbach\Trace32CsePlugin_14\Trace32CsePlugin_14.dll%PLUGINS64BIT%\Lauterbach\Trace32CsePlugin_14\Trace32CsePlugin_14.xml ATTENTION:On machines that are configured for non-english language, there may be multiple directories that are “tempting” to put the plug-ins into e.g.c:\Documents and Settings\All Users\ (English)c:\Dokumente und Einstellungen\All Users (German)Be sure to use one of the valid directories. These can by obtained byexecuting the following commands in a command shell:echo %USERPROFILE%echo %ALLUSERSPROFILE%Using Xilinx iMPACT via the TRACE32 Debug InterfaceBefore using Xilinx iMP ACT via the TRACE32 debug interface, be sure to configure TRACE32 and the ISE installation as described in the sections “Configuring TRACE32”, “Configuring Xilinx ISE 11 and ISE 12” and “Configuring Xilinx ISE 13 and ISE 14”.Then perform the following steps in this order:1.Start TRACE32 because a running instance of TRACE32 is required for target access.2.Start iMPACT. Cancel the “Welcome to iMPACT” dialog and double-click on “Boundary Scan”.Only after doing this , the menu Output will show the menu items required for selecting the TRACE32 debug interface.3.ChooseOutput menu -> Cable Setup and configure the “Cable Plug-in” box withlauterbach_t32 port=20000 and click OK .4.Test the plug-in by doing a scan of the target’s scan chain (by right-clicking into the window).5.Test iMPACT with the command File -> Initialize Chain. iMPACT should detect the JTAG chain ofthe target.In case of problems, please refer to section “Troubleshooting ”.NOTE:The port number 20000 must coincide with the configuration of the TRACE32remote API interface.Using Xilinx ChipScope via the TRACE32 Debug Interface Before using Xilinx ChipScope via the TRACE32 debug interface, be sure to configure TRACE32 and Xilinx ISE, so it recognizes TRACE32 as a valid option for a “debug cable”. For details, see sections “Configuring TRACE32” and “Configuring Xilinx ISE 11 and ISE 12” and “Configuring Xilinx ISE 13 and ISE 14”.Then perform the following steps in this order:1.Start TRACE32 because a running instance of TRACE32 is required for target access.2.Start ChipScope.3.Enable the use of a Chipscope plug-in for connecting to a custom JTAG cable through the menuitem JTAG Chain -> Open Plug-in. Select the TRACE32 debug interface with the plug-inparameterslauterbach_t32 port=20000.This assumes, that TRACE32 also was configured for port 20000.After doing this configuration, ChipScope should auto-detect the scan chain of the target.In case of problems, please refer to section “Troubleshooting”.CompatibilityAs of 12/2012 the use of TRACE32 as JT AG back-end for Xilinx tools is only supported for the Windows platform (Windows XP , Windows 7).All versions of TRACE32 from 2011 or later are compatible with this feature.Xilinx ISE 11 is the first version to introduce the plug-in mechanism for using 3rd-party JT AG hardware.•Xilinx ISE 11 and Xilinx ISE12 use the same plug-in. •Xilinx ISE13 requires a specific plug-in and the location for installing the plug-in changed. •Xilinx ISE14 requires a specific plug-in. Lauterbach provides both 32 bit and 64 bit versions of theCSE plug-in.The following table gives detailed information on the versions of ISE and the required plug-ins:Note on 64 bitmachines:The version of the plug-in (32 bit vs. 64 bit) must match the version of the tools (Chipscope, Xilinx) used.Up to and including ISE13, Lauterbach only provides a 32bit version of the plug-in.However, the 32bit version is fully functional also on 64bit machines (e.g. Win764bit) but needs to be used with 32bit Xilinx tools. The warning printed by thetools can be safely ignored.Starting with ISE14, Lauterbach provides both 32bit and 64bit versions of the plug-in DLL.ISEversionPlug-in Name Status 14T race32CsePlugin_14The plug-in is known to work up to ISE14.632bit and 64bit versions are available.13XilinxCsePlugin13The plug-in is known to work up to ISE 13.1.12XilinxCsePlugin11_12The plug-in is known to work up to ISE 12.4.11XilinxCsePlugin11_12ChipScope Pro is known to work with all ISE 11.x versions.iMP ACT does not support the plug-in mechanism.<= 10No plug-in mechanism for 3rd-party debug interfaces.Troubleshooting•Some typical status and error messages given by ChipScope when attempting to open TRACE32 as debug cable:•The TRACE32 PowerView GUI was not running:COMMAND: open_target lauterbach_t32 port=20000INFO: Started ChipScope host (localhost:50001)INFO: Successfully opened connection to server: localhost:50001(localhost/127.0.0.1)ERROR: Failed to open lauterbach_t32. See message(s) above.•The TRACE32 PowerView GUI was running, but the dongle was not connected to a target or the target was powered off:COMMAND: open_target lauterbach_t32 port=20000INFO: Started ChipScope host (localhost:50001)INFO: Successfully opened connection to server: localhost:50001(localhost/127.0.0.1)ERROR: No devices detected while scanning the JTAG chainERROR: Failed detecting JTAG device chainERROR: Opened lauterbach_t32 but failed to detect JTAG Chain....•Successfully opened TRACE32 as debug cable:COMMAND: open_target lauterbach_t32 port=20000INFO: Started ChipScope host (localhost:50001)INFO: Successfully opened connection to server: localhost:50001(localhost/127.0.0.1)INFO: Successfully opened lauterbach_t32INFO: Cable: CSE Plug-in, Port: , Speed:INFO: Found 0 Core Units in the JTAG device Chain.INFO: If cores were expected to be found, see Answer Record 19337.•Be sure you installed the Microsoft Visual C++ 2008 SP1 Redistributable Package which is available from Microsoft free of charge. It is important to use the SP1 version, otherwise iMPACTwill fail to load the plug-ins DLL.•iMPACT reports “WARNING: iMPACT:923 - Can not find cable, check cable setup!”: Be sure to correctly configure TRACE32 and ISE as described in this document.Be sure that an instance of TRACE32 is already running, when starting the Xilinx tools.When using multiple installations of ISE or TRACE32 be sure to configure the correct installation.•iMPACT does not detect error conditions:When working via the TRACE32 debug interface, iMPACT may ignore error conditions (like nopower on the target). Also see “iMPACT does not correctly recognize the scan chain”.•iMPACT does not correctly recognize the scan chain:Because iMPACT ignores error conditions when working over the TRACE32 debug interface, it may detect the scan incorrectly as shown in the example. The left picture shows a valid scan chain detection (the target was powered up). The right picture shows the result of a scan chain detection on the same target, but with the target powered down.•iMPACT always crashes on startup:With EDK12.1 sometimes ISE creates an invalid project file. If you enabled the optionEdit -> Preferences -> “Automatically load the most recent project file when iMPACT starts”,iMPACT will crash at each startup, attempting to interpret the damaged file. The only way to get iMPACT to work again is to delete the ISE project file. It has the extension “.ipf” and should be located at $TOOLDIR/ISE_DS/auto_project.ipf.After starting iMPACT successfully, disable the option to auto-load the previous project file.Contacting SupportUse the Lauterbach Support Center: https://•To contact your local TRACE32 support team directly.•To register and submit a support ticket to the TRACE32 global center.•To log in and manage your support tickets.•To benefit from the TRACE32 knowledgebase (FAQs, technical articles, tutorial videos) and ourtips & tricks around debugging.Or send an email in the traditional way to **********************.Be sure to include detailed system information about your TRACE32 configuration.1.To generate a system information report, choose TRACE32 >Help > Support > Systeminfo .2.Preferred: click Save to File , and send the system information as an attachment to your e-mail.3.Click Save to Clipboard , and then paste the system information into your e-mail.NOTE:Please help to speed up processing of your support request. By filling out thesystem information form completely and with correct data, you minimize thenumber of additional questions and clarification request e-mails we need toresolve your problem.。
TRACE32系列仿真器介绍
EPROM Simulator Module
深圳旋极
ICD配置方案
例 4: BDM/JTAG调试器,带ROM仿真器(USB口)
BDM/JTAG Debugger with USB Interface
EPROM Simulator Module
网址:
深圳旋极
TRACE32为何与众不同
一、All in One,模块化。丰与俭,巧规划。
模块化结构。可按用户要求裁剪,配置 多种仪器的综合体:
– 通用仿真器 – 逻辑/状态/时序分析仪 – 通用计数器/定时器 – 模式/脉冲信号源 – 模拟调试器 – 软件测试 – FLASH编程
深圳旋极
Trace32的使用
Support for a wide range of on-chip debug interfaces Easy high-level and assembler debugging Interface to all compilers Fast download RTOS awareness Interface to all hosts Display of internal and external peripherals at a logical level Flash programming Hardware breakpoints and trigger (if supported by the on-chip
Emulation Control
Fire Pod
Podbus
PC Workstation
Target
深圳旋极
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
不同的调试工具对触发功能的实现程度是不一样的。在线仿真器(ICE)绝大多数都可以实现完型的触发功能。在线调试器(ICD)对触发功能的实现程度取决于所调试的嵌入式处理器上的片上调试逻辑。在线调试器(ICD)与逻辑分析仪组合,可以宴现较完整的触发功能。
开发人员通常将触发功能与下面要讲到的跟踪功能一起使用,来捕捉导致应用程序中问题产生自原因。
开发人员开始真正的调试工作之前,还要分别对TRACE32-ICD和TLA700进行设置。当然,这些设置是在TRACE32-ICD和TLA700各自的Windows窗口中完成的。对TRACE32-ICD的设置工作主要完成对目标板上的嵌入式处理器的设备寄存器的初试化,将准备调试的应用程序下载到目标板上的嵌入式处理器的程序存储器空间,定义触
跟踪就是记录所调试的应用程序的执行过程,以便开发人员分析导致应用程序出现问题的原因。跟踪的记录方式有先进先出方式和压栈方式。先进先出方式总是记录应用程序停下来之前的最新运行过程。在先进先出方式下,如果跟踪记录缓冲填满的话,最先跟踪的记录就要丢弃,以便填充新的记录。压找方式记录跟踪开始到跟踪记录缓冲被填满这段时间内应用程序的运行过程。在压栈方式下,如果跟踪记录缓冲填满的话,新的应用程序执行过程将不被记录。跟踪还可以有选择地记录程序的执行过程,例如,只记录函数入口和出口的执行过程。当然,要进行有选择跟踪,开发人员必须对跟踪功能进行设置。
传统地,嵌入式系统的开发调试人员通常使用在线仿真器(ICE)来完成端点、触发和跟踪这三种调试手段。随着集成电路技术的不断发展,新一代的嵌入式处理器的工作频率越来越高,封装越来越表贴化。由于在线仿真器要通过仿真探头取代目标系统上的嵌入式处理器来和目标系统连接,所以,在线仿真器对新一代的嵌入式处理器而言,连接是一大问题。嵌入式处理器的设计生产厂商已经认识到这个问题。他们在新一代的嵌入式处理器增加了片上调试逻辑,而访问片上调试逻辑只须不到十根连接线,且时钟频率不高。在采用新一代的嵌入式处理器来开发目标系统的时候,越来越多的开发人员会选择在线调试器加逻辑分析仪形式的组合开发调试平台。
发输入/输出端口的方向。对TLA700的设置工作包括定义逻辑通道,用HLL源码支持功能加载分析TRAC32ICD所下载的可调试格式(IEEE695、OMFx86、ELF/Dwarf、ELF/Stabs和ASCⅡ)的文件,定义触发条件。
接下来,开发人员就可以开始调试他们的应用程序了。
开发人员用TRACE32-ICD设置断点调试程序,用TLA700设置触发条件,并由TLA700完成跟踪功能。
不同的调试工具对跟踪功能的实现方式是不一样的。在线仿真器(ICE)由于其结构的特殊性,它可以捕获到嵌入式处理器的总线周期,它的跟踪记录的最小单位就是总线周期。在线仿真器(ICE)调试软件译码这些总线周期,倒推出程序的执行过程。在线调试器(ICD)因为不能捕获嵌入式处理器的总线周期,因而决大多数没有跟踪功能。有些嵌入式处理器的片上调试逻辑能够将程序的执行过程信息压缩之后通过特定的接口送到芯片外部,供外部的调试工具使用。这样,在线调试器(ICD)可以通过增加跟踪模块捕获这些信息的方法实现跟踪功能。在线调试器(ICD)调试软件从跟踪模块记录的嵌入式处理器送出来的指令流信息,还原出应用程序的执行过程。基于ARM内核的嵌入式处理器芯片上的ETM接口就是一个这样的接口。通过这种方法实现的跟踪功能的完善程度完全取决于片上调试逻辑。
TRACE32-ICD和TLA700如何同步工作呢?这就要借助与TRACE32-ICD和TLA700的触发输入/输出端子了。
当开发人员想要用TLA700的强大的触发功能来捕捉产生某一特殊目标状态的程序时,可以将TRACE32-ICD的触发输入/输出端子定义为输入(可以是高电平或低电平触发),然后,将TLA700所定义的触发条件对应到连接TRACE32-ICD的触发输出端子。开发人员运行程序的时候,如果目标状态出现,TLA700就会产生触发信号送给TRACE32-ICD,TRACE32-ICD在收到这个触发信号之后,它就会将开发人员所调试的应用程序停下来。由于TLA700不停地跟踪记录应用程序的执行情况,这时候,将TLA700停下来,就可以看到产生触发前后应用程序的执行情况。由于TLA有很深的记录存储,开发人员可以观察到很详尽的程序执行情况。
由于逻辑分析仪具有超强的逻辑跟踪分析功能,因而它可以捕获记录嵌入式处理器的总线周期,也可以捕获记录来自象ETM这样的接口的程序执行信息,并对这些记录进行分析,译码或还原出应用程序的执行过程。逻辑分析仪通过触发接口与在线调试器(ICD)协调工作,补充在线调试器(ICD)在跟踪功能方面的不足,与在线调试器(ICD)一起为开发人员提供断点、触发和跟踪三种调试手段。
开发人员也可以将TRACE32-ICD的触发输入/输出端子定义为输出,将该信号连接到TLA700的一个触发输入端子,并设置TLA700根据该信号控制跟踪的启动或停止。这样就可以实现跟踪与程序运行同步,使开发人员能够跟踪到程序在调试过程中所有的运行情况。
TRACE32-ICD和TLA700给开发人员提供了灵活的触发设置功能,开发人员可以充分发挥聪明才智来设计复杂的触发条件,来捕捉应用程序中的问题。
断点,顾名思义就是(应用程序)停下来的地方。断点按照其实现方法分为软件断点和硬件断点。软件断点是靠程序指令陷阱来实现的。硬件断点是靠嵌入式处理器或调试工具硬件来实现的。软件断点的实现方法对于不同的嵌入式处理器和不同的调试工具而言,实现方法都是一样的,都是通过修改程序指令的方法实现的。硬件断点的实现方法对于不同的嵌入式处理器和不同的调试工具而言,实现方法是不一样的。有的嵌入式处理器具有片上调试逻辑,调试工具通过JTAG、BDM、OCDS、NEXUS等接口访问控制片上调试逻辑,通过片上调试逻辑实现硬件断点。这种硬件断点的数量是有限制的。由于不同的嵌入式处理器上的调试逻辑实现方法不同,因而它们提供的硬件断点的数量是不一样的。在线调试器(ICD)就是通过访问控制片上调试逻辑实现硬件断点的。没有片上调试逻辑的嵌入式处理器不能使用在线调试器。在线仿真器(ICE)通过基于存储器的断点技术实现硬件断点。在线仿真器实现的硬件断点的数量是没有限制的。对于没有片上调试逻辑的嵌入式处理器,可以考虑用在线仿真器(ICE)进行调试。
在嵌入式系统的开发调试中,开发人员通常会遇到四类问题:逻辑问题、软/硬件相互影响问题、软件实时问题和崩溃问题。应用程序逻辑设计或编码错误或设计假设不正确都属于逻辑错误。指令引起的存储器访问出错,应用程序在运行过程中出现在数据总线上的特定数据格式引起的串扰假信号,这些都是软/硬件相互影响问题。应用程序在单步、端点的调试中都运行正常,而只有在目标系统全速运行的时候才会出问题,这类问题就属于软件实时问题。目标系统在运行中发生系统崩溃,这类问题就是崩溃问题。逻辑问题大约占开发人员遇到的所有调试问题的80%。解决这类问题,开发人员通过在应用程序中设置断点,检查寄存器、存储器、变量等的值来解决。开发人员解决逻辑问题的时间约占解决所有调试问题的总时间20%。而解决其它三类问题所用的时间要占到解决所有调试问题的总时间的80%。这三类问题只靠设置断,点的方法,往往是比较难以解决的。由于产生这三类问题的原因通常都比较复杂,所以,开发人员必须通过触发来捕捉这些问题,然后,再通过跟踪来分析产生这些问题的原因。
嵌入式开发调试中,开发人员的调试手段包括断点、触发和跟踪三种。随着集成电路技术的发展,新一代的嵌入式处理器集成度和工作频率越来越高,芯片封装形式也越来越趋向表贴化。在线调试器(ICD)与逻辑分析仪的组合开发调试平台越来越多地成为广大的新一代嵌入式处理器的开发人员实现上述三种调试手段的首选。
开发人员使用断点功能控制所调试的应用程序的起和停。使应用程序运行到自己想要调试的程序上。通过观察在断点处的应用程序的变量以及寄存器和存储器的值检测所调试的应用程序运行是否正确。断点是开发人员经常使用的调试手段。
单步是断点的一种特殊形式,它相当于在下一条指令或程序行上设置一个断点,程序启动运行到断点停下来。
触发用于捕捉所调试的应用程序在运行中出现的某一特定目标状态。这一特定的目标状态就是通常所说的触发条件。触发条件通常是处理器的特定的地址、数据、控制总线以及内部/外部信号状态的逻辑组合。当一个触发条件不足以描述要捕捉的目标状态时,开发人员通常会使用触发序列器(Sequencer)将多个触发条件级联起来。调试工具在触发发生之后,要么停止所调试的应用程序的运行,要么增加触发记数器,要么输出一个触发信号,以便通知开发人员,所要捕捉的触发条件已发生。为了便于开发人员观察触发发生之后应用程序的执行情况,调试工具通常会提供触发滞后的功能。触发滞后就是调试工具在发生触发之后仍然使应用程序结续运行一段特定的时间之后才将应用程序停下来。
下面以Lauterbach公司的TRACE32-ICD和Tektronix公司的TLA700逻辑分析仪为例,介绍如何将发和跟踪功能。
首先介绍一下Lauterbach公司的TRACE32-ICD。
TRACE32-ICD是在线调试器。它采用模块化的设计,可以支持具有JTAG、BDM、0CDS、NEXUS等调试接口的嵌入式处理器。它可以为嵌入式处理器的开发人员提供断点及触发功能(利用片上调试逻辑)。TRACE32-ICD的调试器软件运行在Windows平台上。TRACE32-ICD通过并口、以太网口、USB口等形式与PC连接。TRACE32-ICD具有触发输入/输出端口,通过它TRACE32-ICD与逻辑分析仪连接。TRACE32-ICD与逻辑分析仪通过该连接相互触发,协调工作。
接下来,介绍一下Tektronix公司的TLA700逻辑分析仪。
TLA700逻辑分析仪除了具有传统的逻辑分析仪的逻辑采集和分析功能之外,是它采用了开放灵活的Windows平台架构,具有串口、并口及以太网等接口。这样一来,基于Windows平台的嵌入式开发调试软件就可以运行在TLA700上。嵌入式处理器的开发人员可以用TLA700搭建嵌入式开发调试平台。另外,TLA700的HLL源码支持功能可以直接分析采用IEEE695、OMFx86、COFF、ELF/Dwarf、ELF/Stabs和ASCII格式的可调试的应用程序。这也为它集成在线调试器,例如,TRACE32-ICD,补充在线调试器在跟踪功能方面的不足奠定了基础。