如何从t32start命令行界面启动和关闭Trace32实例? [英] How to start and close Trace32 instances from t32start command line interface?

查看:623
本文介绍了如何从t32start命令行界面启动和关闭Trace32实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现Lauterbach Trace32允许从命令行启动Trace32实例。

I have found out that Lauterbach Trace32 allows to launch Trace32 instances from the command line.

我有一个 ts2文件。我正在尝试使用t32start.exe来启动和关闭Trace32实例。我大致尝试了以下操作:

I have a ts2 file. I am trying to use the t32start.exe to start and close Trace32 instances. I have roughly tried the following:

t32start ts2_file_path -RUNITEM core_item_from_tree

但是我无法使用相同的命令关闭Trace32实例。谁能告诉我他打开和关闭Trace32实例的正确方法吗?

However I am unable to close a Trace32 instance with the same. Can anyone tell me he correct way to open and close Trace32 instances?

有时,GUI可能必须在目标仍在运行时将其强制关闭。 (可能是因为它已挂起或DAP配置失败)。

Sometimes, the GUI may have to be force closed, while the target is still running. (Perhaps because it is hung or the DAP configuration has failed).

在这些情况下,重新启动GUI时会显示以下弹出窗口:

In these cases, the following pop-up appears when restarting the GUI:

这会阻止使用Trace32,因为此后的远程访问始终会返回通信失败。是否可以通过将标志传递给trace32.exe命令或其他方式来自动重置目标(按是)?

This prevents using Trace32, since remote access thereafter always returns communication failure. Is there any way to automatically have the target to reset (Press "yes"), by passing a flag to the trace32.exe command or otherwise?

推荐答案

从命令行启动TRACE32:



T32Start是一个工具,可帮助您生成TRACE32配置文件,然后为目标启动实际的TRACE32应用程序带有临时生成的配置文件的体系结构家族。

Starting TRACE32 from command line:

T32Start is a tool which helps you to generate a TRACE32 configuration file and then launch the actual TRACE32 application for your target architecture family with that temporarily generated configuration file.

因此,要启动TRACE32,您可以:

So to start TRACE32 you can either:


  • 使用您建议的命令行通过T32Start启动TRACE32(仅适用于Windows)

  • 生成一个永久配置文件,并直接使用它启动TRACE32。 li>
  • use that command line you've suggested to start TRACE32 via T32Start (which will only work on Windows)
  • generate a permanent configuration file and start TRACE32 directly with it.

TRACE32安装的PDF子文件夹中的文档 installation.pdf告诉您如何创建配置文件。您也可以使用T32Start创建永久配置文件,如下所示:

The document "installation.pdf" in the PDF sub-folder of your TRACE32 installation tells you how to create a configuration file. You can also use T32Start to create a permanent configuration file like this:


  1. 使用T32Start创建所需的配置。确保为每个具有唯一端口的核心启用高级>接口> API端口,以便以后可以从命令行关闭TRACE32。

  2. 然后右键单击核心(节点)带有Lauterbach徽标),然后从上下文菜单中选择显示启动环境...。

  3. 随即打开的窗口在右下角具有保存批处理按钮。 作业另存为...和另存为...之一。使用这两个按钮保存两个文件。假设您已将配置保存为名称​​ myconfig.t32

  4. 调整已保存的批处理作业,以便调用TRACE32的命令行指向配置文件。最后,您应该以 t32m< cpu> -c< configfile.t32> -s< startscript.cmm> ,其中< cpu> 是您要调试的CPU体系结构家族的简称(例如ARM,PPC,RISCV-您将在批处理文件中看到它)。例如。 c:\t32\bin\windows64\t3​​2marm -cc:\t32\myconfig.t32 -sc:\t32\mytestcase.cmm

  5. 如果您有AMP多核设置,请对配置的所有内核重复步骤2到4。

  6. 使用合并所有保存的批处理文件批处理文件以启动所有TRACE32实例。 (理想情况是在启动第一个TRACE32 GUI之后等待几秒钟)。

  1. Create the configuration you need with T32Start. Ensure to enable the "Advanced > Interfaces > API Port" for every core with a unique port to be able to close TRACE32 from command line later.
  2. Then right click on a core (the node with a Lauterbach logo) and choose "Show Start Environment..." from the context menu.
  3. The window, which then opens, has in the right bottom corner a button for "Save Batch Job As..." and one for "Save Config As...". Use those two buttons to save both files. Let's imagine you've saved the configuration under the name myconfig.t32.
  4. Adapt the saved batch job so that the command line calling TRACE32 points to the configuration file. In the end you should have a line in the form t32m<cpu> -c <configfile.t32> -s <startscript.cmm>, where <cpu> is the short name of the CPU architecture family you are going to debug (like ARM, PPC, RISCV - you'll see it in the batch file). E.g. c:\t32\bin\windows64\t32marm -c c:\t32\myconfig.t32 -s c:\t32\mytestcase.cmm
  5. Repeat steps 2 to 4 for all cores of your configuration, if you have an AMP multicore setup.
  6. Merge all the saved batch files an use the batch file to launch all your TRACE32 instances. (Ideally wait a few seconds afters starting the first TRACE32 GUI).






关闭TRACE32从命令行:



确保在要关闭的所有TRACE32 GUI上启用远程API。
您将在T32Start中的每个核心节点的高级>接口> API端口中找到该设置。

最后,每个TRACE32 GUI的配置文件包含以下几行:


Closing TRACE32 from command line:

Ensure to enable the remote API on all of your TRACE32 GUIs you'd like to close. You'll find that setting in T32Start for each core node at "Advanced > Interfaces > API Port"
In the end, the configuration file for each TRACE32 GUI contains the following lines:

RCL=NETASSIST
PORT=20000

该块前后必须有一个空行(而该块也可能包含以PACKLEN =开头的行)。

PORT =之后的值定义了一个UDP / IP端口,并且对于每个TRACE32 GUI都必须是唯一的。

There must be an empty line before and after that block (while the block may also contain a line starting with PACKLEN=)
The value after PORT= defines a UDP/IP port and must be unique for every TRACE32 GUI.

如果您拥有开放的具有启用的API端口的TRACE32 GUI,则可以通过TRACE32遥控器向其发送命令API。 (请参阅TRACE32安装中的api_remote.pdf。)使用远程API向TRACE32实例发送简单命令的命令行工具是t32rem.exe(您可以在以下目录的 bin / windows /子文件夹中找到它)您的TRACE32安装)。

If you have an open TRACE32 GUI with enabled API Port, you can send commands to it over the TRACE32 remote API. (See api_remote.pdf in your TRACE32 installation.) A command line tool which uses the remote API to send simple commands to a TRACE32 instance is t32rem.exe (you'll find it at the "bin/windows/" sub-folder of your TRACE32 installation).

按以下方式使用t32rem:

Use t32rem as follows:

t32rem localhost port=<myport> <command>

对于< myport> ,选择您上面使用的端口号在配置文件中 PORT = 之后。对于< command> ,请使用您要发送的任何TRAC32命令。例如。命令 QUIT 关闭TRACE32 GUI。

For <myport> choose the port number you've used above in the configuration file after PORT=. For <command> use any TRAC32 command you'd like to send. E.g. the command QUIT to close the TRACE32 GUI.

但是,如果您使用 QUIT 对于TRACE32命令,t32rem将拼命等待一段时间,以等待刚刚关闭的GUI的响应。为了避免这种情况,请创建一个测试文件 quit.cmm ,然后在该脚本中添加以下行:

However if you use QUIT for the TRACE32 command, t32rem will wait some time desperately for a response form the GUI you've just closed. To avoid that create a test file "quit.cmm" and put the following lines in that script:

WAIT 800.ms
QUIT

然后通过命令行关闭GUI:

Then close the GUI via the command line:

c:\t32\bin\windows64\t32rem.exe localhost port=20000 "DO ""c:\t32\quit.cmm"" "

(围绕路径的双引号仅当路径包含空格时才需要CMM文件。)

(The doubled double-quotes around the path of the CMM file are only require if the path contains blanks.)

这篇关于如何从t32start命令行界面启动和关闭Trace32实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆