FAQs for TRACE32 Software
|Can I execute a PRACTICE script on a specific event e.g. program stop?|
You can use the command ON or GLOBALON for this. ON is suitable when there is still an active PRACTICE script controlling your test case. GLOBALON is suitable if you want a reaction on an event until you disable it again.
The general syntax is:
ON|GLOBALON <event> <action>Please refer to the description of the ON and GLOBALON commands respectively in the "General Commands Reference Guide O" and "General Commands Reference Guide G" for more information on the supported events and actions.
To disable the event handler use
ON|GLOBALON <event> inheritExamples:
1. Execute a PRACTICE script when the program execution is stopped:
GLOBALON PBREAK DO myscript.cmm2. Continue the PRACTICE script execution when an error happens:
ON ERROR CONTinue3. Execute the subroutine powerup_handler when target power is switched to on:
ON POWERUP GOSUB powerup_handler
|Can I set a breakpoint with a logical condition?|
The command Break.Set has an option /VarCONDition , which allows you to specify a condition under which the CPU stays stopped once it hits the corresponding breakpoint. (In the dialog for setting breakpoints you'll find also the field "Condition" for that, when you click on "advanced".)
Example: set a breakpoint on function MyFunc with the condition that the variable x==10 and y==11
Break.Set MyFunc /VarCONDition (x==10 && y==11)
As a result the CPU is stopped every time the function MyFunc is executed, but gets immediately restarted when condition "x==11 && y==11" is not met.
You can also specify a condition in the PRACTICE language by using the Break.Set option /CONDition instead of /VarCONDition
Break.Set MyFunc /CONDition (Register(R0)==0)
|How can I save the memory content in Intel HEX format? Using the command Data.SAVE.IntelHex the generated address field is incorrect.|
By default, Data.SAVE.IntelHEX uses 20-bit address size. For 32-bit addressing the option "/TYPE4" needs to be added.
Data.SAVE.IntelHex dump.hex 0xA0000000--0xA0003fff /TYPE4
|How do I start a hidden instance of TRACE32?|
There are three ways to configure TRACE32 to start as a hidden instance by adding different SCREEN= options in the configuration file (e.g. config.t32). Choose one of the configuration options:
Option 1: The main window of TRACE32 remains hidden. However, dialogs and other window of TRACE32 can still be opened. This is useful, for example, if an error occurs during a regression test.
SCREEN= INVISIBLEOption 2: The main window of TRACE32 and all other dialogs and windows of TRACE32 remain hidden - even if an error occurs.
SCREEN=OFFOption 3: The main window of TRACE32 is added to the toolbar of the host computer. It can be fully displayed in case of an error.
SCREEN= VICONPlease refer for more information refer to "TRACE32 as a Hidden Instance" in the TRACE32 Installation Guide.
|How to check the return value of a function in a PRACTICE script?|
Every function has usually a pseudo-variable called return . You can see that in window sYmbol.Browse.Var \\*\*\<myfunc>\* (where myfunc is the name of your function). Of any variable you can get its value with PRACTICE function Var.VALUE(<variable>).
So you get the return value of function myfunc() with
GO sYmbol.EXIT(myfunc) // go to return statement of myfunc PRINT Var.VALUE(return) // get the return valueIn case you would like to do a module test, then you can use the Var.set command and Var.VALUE(<varname>) PRACTICE function.
Example: to call the function int func3(int a, int b) with random arguments (e.g. 5 and 3) and get the return value, do the following:
Var.NEWLOCAL \x // create artificial variable on the PRACTICE stack Var.set \x=func3(5,3) // execute func3() with arguments 5 and 3 on your CPU PRINT Var.VALUE(\x) // get the return value
|How to integrate TRACE32 with Jenkins?|
To disable the TRACE32 GUI, find the line starting with SCREEN= in your TRACE32 configuration file (default: config.t32) and change it to SCREEN=OFF . If there is no line starting with SCREEN= add a and empty line at the end of the file and than add the line SCREEN=OFF .
Then you can either start TRACE32 PowerView with a startup script which will contains the actions you want to perform or control the TRACE32 application from an external program (e.g. Python script or C application).
The TRACE32 application can be closed using the QUIT command which can take the OS return value as argument.
|How to put a breakpoint on a specific source code line from a TRACE32 PRACTICE script?|
You can use the following syntax to set e.g. a breakpoint at line 42 of the file myfile.c located under c:\t32\myproject\ :
Break.Set \"c:\t32\myproject\myfile.c"\42or simply:
|How to remotely control TRACE32 PowerView?|
You can control TRACE32 remotely via the TRACE32 Remote API. Please refer to the document " API for Remote Control and JTAG Access" for more information.
To launch some scripts or execute some simple commands from a bash shell, you can use the command line tool t32rem from the <T32>/bin/<os> folder. This tool uses the TRACE32 Remote API to send TRACE32 commands to open TRACE32 GUIs.
To use the t32rem tool, do the following:
1. Enable the TRACE32 remote API to add the following two lines to your TRACE32 configuration file (usually "config.t32")
RCL=NETASSIST PORT=20000You have to ensure that there is an empty line before and after these lines in your configuration file.
2. Launch TRACE32 and send a command to it with t32rem like that:
t32rem localhost port=200000 <command>For command you can choose any TRACE32 command like DO file.cmm to execute a PRACTICE script.
For more complex remote control of TRACE32 (e.g. from a Python script) you should have a look at the previously mentioned "API for Remote Control and JTAG Access" and the examples at <t32>/demo/api.
|I get the error message "entry near offset ... in file ... (use DUMP)" when loading an object file using the Data.LOAD command.|
This error message can have the following reasons:
|I get the error message "Overlapping memory location" when loading an object file using the Data.LOAD command.|
This error message means that there are sections in the object file that load code or data to the same addresses which is an error in the object file. TRACE32 handles this by loading these sections in the order they appear in the object file. The command sYmbol.List.MAP can be used to check in what order the sections were loaded and which code was loaded.
|Instead of getting a significant error message, I'm getting an error in the following form: "error occured, id='...'".|
The help.t32 file available in the TRACE32 installation directory is probably too old. This file is used to decode the error codes in significant error messages.
|Is it possible to run an external program from within TRACE32 PowerView?|
Depending on what you actually want to do, one of the following commands should be suitable to run any external program or batch file:
|Is it possible to see the value of a C macro in TRACE32 PowerView?|
Macros are generally not part of the DWARF debug information in the ELF file. The debugger can thus not know their values. But you can declare your macros in TRACE32:
sYmbol.CREATE.MACRO MACRO_1 <contents>
sYmbol.CREATE.MACRO MACRO_2 <contents>
You can display the list of manually created macros with:
Sometimes, the compiler can also export the macro information into the ELF file. This is done for the GCC compiler using the command line -g3 option which exports the macro information in the ".debug_macinfo" section. If you are loading such an ELF use then the /MACRO option to import the macro information to TRACE32.
|Is it possible to stop the program execution when a CPU register is written with a specific value?|
It is not possible to stop the program execution on a CPU register read or write since this is not supported by any processor on-chip debug implementations. It is only possible to set breakpoints on program execution or memory accesses (read/write). It is thus possible to set an on-chip breakpoint on an access to a memory mapped peripheral register.
|Is it possible to use Eclipse as debugger user interface instead of TRACE32 PowerView?|
Lauterbach offers a TRACE32 integration to Eclipse based on Target Communication Framework (TCF). TRACE32 PowerView can be configured as a TCF agent. This integration is useful to access the debug functionality of TRACE32 from within an Eclipse-based interface. Simultaneous usage of TRACE32 PowerView and Eclipse is also possible.
Please note that extended TRACE32 functionality like trace views, MMU views and OS-aware debugging is not supported by this integration.
You can find more information about the TRACE32 integration to Eclipse in the application note "TRACE32 as TCF Agent"
|Suffixes as .isra, .constprop. or .part are added to several symbols. How can I access my symbols in TRACE32?|
This is due to Link Time Optimization LTO which appends strings like .isra, .constprop. or .part..
You may try to disable LTO. Otherwise, you can use the command sYmbol.ForEach to find all symbols with a special suffix.
|What loader option is required to convert CYGWIN paths to Windows paths?|
Data.LOAD.Elf <filename>.elf /CYGDRIVE
|What's the meaning of the error message: "FATAL ERROR from InterCom-driver: can not bind read socket"?|
You are using InterCom communication for TRACE32 on your PC. This was activated by a setting in the active configuration for your TRACE32-SW. Either by the InterCom setting in the T32Start configuration or inside your TRACE32 config file (default name config.t32).
The InterCom communication is typically needed if two or more TRACE32 applications shall communicate together (via UDP). This is for example needed for multicore debugging or debugging coprocessors like eTPU or PCP.
The problem is caused by using the same InterCom port address by different applications. Maybe several TRACE32 executables or other applications. You can check the used ports by command: "netstat -a" on your PC.
For TRACE32 you can avoid this problem in the configuration of T32Start by "Use Auto Increment Port: Yes". If using a config file like config.t32 you need to set a different InterCom Port manually.
|When debugging optimized code, single stepping is jumping back and forth in an unexpected order.|
When stepping through optimized code, TRACE32 sometimes seems not to execute the step correctly, the program counter (PC) remains at the same HLL line for multiple steps or is jumping back and forth in an unexpected order. The List window usually shows a drill-down box (a + sign) next to some line numbers.
This is a result of the compiler settings and compiler output. As a workaround, summarize adjacent blocks of assembler code when loading an application, e.g. with Data.LOAD.Elf my_application.elf /SingleLineAdjacent .
Please watch the following video for more information about debugging optimized code:
|Why do I get the error message "Plugged debug cable is not suitable for CPU"?|
In general you get the error message "Plugged debug cable is not suitable for CPU", when the started TRACE32 application is not supported by the debug cable plugged to your PowerDebug.
E.g. The "PowerPC-4xx Debug Cable" is not suitable for "TRACE32 for ARM" (t32marm.exe)
Please start the correct TRACE32 application or connect the correct debug cable to your PowerDebug.
As a special case, you also get the error message "Plugged debug cable is not suitable for CPU" if you use TRACE32 R.2018.02 or older and you use a new debug cable that is not yet supported by that version:
|Why does my terminal window (TERM) not work with COM port 10 or larger?|
The cause of the problem is that the function CreateFile() of Windows accepts strings "com1" - "com9" as names of devices and reject to do so for two and more digit numbers. In order to open "com10" and above we actually have to feed "\\.\com10" string to CreateFile().
TERM.METHOD COM \\.\com10 38400. 8 NONE 1STOP NONE
|Why does TRACE32 no longer start the script t32.cmm?|
TRACE32 build 99519 (August 2018) and newer start the following scripts automatically after the application start:
The file autostart.cmm will be provided by Lauterbach and should not be changed, because every software update from Lauterbach will restore the file.
Individual settings should be added in the files system-settings.cmm, user-settings.cmm and work-settings.cmm (which will not be changed by Lauterbach).
Read more on https://www.lauterbach.com/2018
Copyright © 2020 Lauterbach GmbH, Altlaufstr.40, 85635 Höhenkirchen-Siegertsbrunn, Germany
The information presented is intended to give overview information only.
Changes and technical enhancements or modifications can be made without notice. Report Errors
Last generated/modified: 10-Jan-2020