我发现Lauterbach Trace32允许从命令行启动Trace32实例。
我有一个ts2文件。我正在尝试使用t32start.exe来启动和关闭Trace32实例。我大致尝试了以下方法:
t32start ts2_file_path -RUNITEM core_item_from_tree
但是,我无法使用相同的方法关闭Trace32实例。谁能告诉我他打开和关闭Trace32实例的正确方法?
有时,在目标仍在运行时,可能不得不强制关闭GUI。(可能是因为它已挂起或DAP配置失败)。
在这些情况下,重新启动GUI时将显示以下弹出窗口:
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?
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.
So to start TRACE32 you can either:
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:
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
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
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.
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).
Use t32rem as follows:
t32rem localhost port=<myport> <command>
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 ”,并将以下行放入该脚本中:
WAIT 800.ms
QUIT
然后通过命令行关闭GUI:
c:\t32\bin\windows64\t32rem.exe localhost port=20000 "DO ""c:\t32\quit.cmm"" "
(仅当路径中包含空格时,才需要在CMM文件的路径周围加双引号。)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句