FAQs for TRACE32 Software |
![]() |
|||
![]() |
||||
|
![]() |
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> 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 open automatically 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 ",") Example: 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 Example: 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.
|
|||
![]() |
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. Example: 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. 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? | ||
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 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? | ||
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"\42or simply: Break.Set \myfile\42 |
|||
![]() |
How to remotely control TRACE32 PowerView? | ||
Ref: 0514 | |||
There are three ways to control TRACE32 PowerView remotely:
![]() ![]() ![]() ![]() |
|||
![]() |
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:
|
|||
![]() |
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. Example: 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 -nodefaultlibs3. 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. Example: 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:
|
|||
![]() |
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> sYmbol.CREATE.Done You can display the list of manually created macros with: sYmbol.List.MACRO 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:
|
|||
![]() |
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:
|
|||
![]() |
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:
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 © 2023 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: 02-Jan-2023 |