FAQs for TRACE32 Software

The embedded tools company

Search FAQs

PDF document ( 147KB / 27-Sep-2021 )

Can I execute a PRACTICE script on a specific event e.g. program stop?
Ref: 0508

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> inherit

1. Execute a PRACTICE script when the program execution is stopped:
2. Continue the PRACTICE script execution when an error happens:
3. Execute the subroutine powerup_handler when target power is switched to on:
ON POWERUP GOSUB powerup_handler

Can I open automaticly a specific section in the peripheral file with TRACE32 command ?
Ref: 0585

Yes, You need to specify the path to open this section with the command PER (sections and subsections are delimited by ",")
PER , "Nested Vectored Interrupt Controller,Interrupt Enable Registers"

Can I set a breakpoint with a logical condition?
Ref: 0507

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)

Can TRACE32 support pretty printing for C++ STL?
Ref: 0586

Yes using the commands sYmbol.AddInfo.Type and Var.OBJECT.
  • The user can define the STL container type using the sYmbol.AddInfo.Type
  • New entry "View Object in Window" is added then to the variable pull down menu
  • Var.OBJECT can display the container in a human readable form
  • Added type information could be more complicated with if/else/while expressions
  • Refer for more information to demo/etc/stl

  • How can I save the memory content in Intel HEX format? Using the command Data.SAVE.IntelHex the generated address field is incorrect.
    Ref: 0487

    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 can I send an UART break signal using the TERM command?
    Ref: 0587

    TERM.OutBREAK Supported since July 2018

    How do I start a hidden instance of TRACE32?
    Ref: 0404

    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.
    Option 2: The main window of TRACE32 and all other dialogs and windows of TRACE32 remain hidden - even if an error occurs.
    Option 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.
    Please 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?
    Ref: 0512

    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 value
    In 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?
    Ref: 0513

    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?
    Ref: 0511

    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"\42
    or simply:
    Break.Set \myfile\42

    How to remotely control TRACE32 PowerView?
    Ref: 0514

    There are three ways to control TRACE32 PowerView remotely:
    • Using the TRACE32 Remote API.
      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.
      For more complex remote control of TRACE32 (e.g. from a Python script) you should have a look at "API for Remote Control and JTAG Access" and the examples at <t32>/demo/api.
    • TRACE32 PowerView implements a GDB stub functionality. This provides an interface to any application using the GDB Remote Serial Protocol (RSP) to control TRACE32 PowerView via TCP or UDP.
    • Using the Target Communication Framework (TCF), which can be used to access the TRACE32 debug functionality from within Eclipse.
    Please refer for more information to the following documents:

    I am getting NAN as a variable value in Var.View. What does that mean?
    Ref: 0588

    You are viewing a floating point variable which gets according to IEEE 754 the value infinite, this is why you are seeing NAN.

    I get the error message "entry near offset ... in file ... (use DUMP)" when loading an object file using the Data.LOAD command.
    Ref: 0485

    This error message can have the following reasons:
    • The object file is corrupted. Please try to re-compile the file.
    • The object file has been compiled for a different architecture that the one started with TRACE32 PowerView. You get this error message e.g. if you are loading an ELF file compiled for x86 on TRACE32 PowerView for ARM.
    • The file has a format which is not supported by your TRACE32 version. This can happen e.g. if you are using a compiler version newer that the used TRACE32 software. Please try to update to latest TRACE32 release available on the web site or request an interim software update from support@lauterbach.com.
    • The object file has a format which is not yet supported by TRACE32 PowerView. Please contact the Lauterbach support and include the object file if possible.

    I get the error message "Overlapping memory location" when loading an object file using the Data.LOAD command.
    Ref: 0469

    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='...'".
    Ref: 0468

    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 add a new type definition in TRACE32 using PRACTICE commands?
    Ref: 0566

    It is not possible to add new types manually in TRACE32. As a workaround, you can declare the type inside a source file, compile it and load the resulting ELF file in TRACE32.


    1. declare the type in a C-file:
      typedef struct {
          int a;
          int b;
          int d;
      } myStruct_t;
      volatile myStruct_t *dummy;
    2. Compile the C-File, e.g.
      gcc  typedef.c  -g  -o typedef.elf  -nostartfiles -nodefaultlibs
    3. Load the ELF file in TRACE32 using the /NoCODE and /NoCLEAR options
      Data.LOAD.Elf typedef.elf /NoClear /NoCODE

    Is it possible to display multiple terminal windows in the same time with TRACE32 PowerView?
    Ref: 0589

    TRACE32 PowerView can display up to 9 seperate terminal windows at the same time.
    The method can be defined with an index using the command TERM.METHOD # ... The same index can then be used to open the terminal window.
    For channel 1 --> TERM.METHOD #1 SingleE 0x1 0x1
    For channel 2 --> TERM.METHOD #2 BufferE 0x2 0x2
    For channel 1 --> TERM.view #1#
    For channel 2 --> TERM.view #2
    (Further information could be found general_ref_t.pdf)

    Is it possible to run an external program from within TRACE32 PowerView?
    Ref: 0510

    Depending on what you actually want to do, one of the following commands should be suitable to run any external program or batch file:
    • OS.Area <cmdline> : Output in AREA window (blocking)
    • OS.Window <cmdline> : Output in "OS.Window" window (blocking) inside PowerView
    • OS.screen <cmdline> : On Windows the command gets directly executed without a shell. The output of a console application is shown in a temporary command window. On Linux the output is in the shell, which started the TRACE32 GUI (non-blocking)
    • OS.Hidden <cmdline> : No output anywhere (blocking)
    • OS.Command <cmdline> : Output in system shell, which allows redirects (non-blocking on Windows / blocking on Linux unless you add an ampersand &)
    Please refr to the "PowerView Function Reference" for more information.

    Is it possible to see the value of a C macro in TRACE32 PowerView?
    Ref: 0467

    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?
    Ref: 0509

    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?
    Ref: 0482

    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?
    Ref: 0515

    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.

    The address column of the sYmbol.Browse.sYmbol window contains "locdesc", what does this mean?
    Ref: 0579

    Each variable of a target application has some location where it is stored. Usually, the global and static variables have a fixed memory location while the local variables which exist only inside a function body are either stored in the stackframe of the corresponding function or in a general-purpose register.
    With disabled compiler optimizations each variable has only one single Location Description. If the single location description is also a simple location (like a fixed address, a general-purpose register, or a stack-frame offset) the resolved location is shown in the column "address" of the window sYmbol.Browse. In all other cases we get "locdesc" in that column.
    So, you see "locdesc" in the following cases:
    • There is more than one location for a variable. This can happen with enabled compiler optimizations. If you open the sYmbol.INFO window for such an optimized variable you can see the various locations of the variable together with a program address range. (When the program counter is inside that program address range, the related location is valid for the variable.)
    • At least one of the location descriptions can't be resolved to an address, a general-purpose register, or a stack-frame offset.

    What loader option is required to convert CYGWIN paths to Windows paths?
    Ref: 0260

    Data.LOAD.Elf <filename>.elf /CYGDRIVE

    What's the meaning of the error message: "FATAL ERROR from InterCom-driver: can not bind read socket"?
    Ref: 0320

    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.
    Ref: 0415

    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:

    When using the command "readelf -l" for an elf file, I see two addresses type: logical and physical.
    Which one is used when loading the file?
    Ref: 0590

    If the physical address is non zero, then it is used.
    If it is zero, the logical address is used.
    You can force the use of one of them using these options with the Data.LOAD command: /LOGLOAD or /PHYSLOAD
    The command sYmbol.List.MAP displays address ranges where code was saved during download.

    Why do I get the error message "Plugged debug cable is not suitable for CPU"?
    Ref: 0448

    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:
    • If your ARM debug cable has a serial number starting with "C18" or higher, it is the new "ARM Debug Cable V5" (shipped since 2018). Please ensure you use TRACE32 version R.2017.02 or higher.
    • If you use the Automotive PRO cable (LA-2707), ensure you use TRACE32 R.2018.02 or higher.
    You can download a suitable version of TRACE32 at https://www.lauterbach.com/7373

    Why does my terminal window (TERM) not work with COM port 10 or larger?
    Ref: 0290

    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?
    Ref: 0447

    TRACE32 build 99519 (August 2018) and newer start the following scripts automatically after the application start:
    1. TRACE32 first executes the file autostart.cmm from the TRACE32 system directory (usually C:\T32).
    2. autostart.cmm normally starts then the following scripts:
      • system-settings.cmm (from the TRACE32 system directory)
      • user-settings.cmm (from the user settings directory (on Windows %APPDATA%\TRACE32 or ~/.trace32 otherwise))
      • work-settings.cmm (from the current working directory)
    3. Finally TRACE32 executes additionally the file specified on the command line (or in T32Start).
    If the file autostart.cmm does not exist in the TRACE32 system directory, TRACE32 build 99519 (and later) will fallback to the previous autostart-mechanism and start t32.cmm (if no start script was specified on the command line (or in T32Start))

    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 © 2021 Lauterbach GmbH, Altlaufstr.40, 85635 Höhenkirchen-Siegertsbrunn, Germany   Impressum     Privacy Policy
    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: 27-Sep-2021