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.
So to start TRACE32 you can either:
- 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.
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:
- 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.
- Then right click on a core (the node with a Lauterbach logo) and choose "Show Start Environment..." from the context menu.
- 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.
- 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
- Repeat steps 2 to 4 for all cores of your configuration, if you have an AMP multicore setup.
- 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).
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
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.
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
Then close the GUI via the command line:
c:\t32\bin\windows64\t32rem.exe localhost port=20000 "DO ""c:\t32\quit.cmm"" "
(The doubled double-quotes around the path of the CMM file are only require if the path contains blanks.)