Skip to main content

Configure and Start TRACE32 from Python - News / Debug - Lauterbach Support

Mar 22 2023

Configure and Start TRACE32 from Python

Since 2020, Python programs can control TRACE32 via the lauterbach-trace32-rcl module (pyrcl). Up to now, TRACE32 must be started using a config file, which requires familiarization with the TRACE32 configuration file syntax or the use of the configuration tool t32start.exe. Now Lauterbach offers a new
lauterbach-trace32-pystart module (pystart) which allows the configuration and start of TRACE32 directly from Python. See example below.

Beta testers can install pystart by using `pip install --upgrade lauterbach-trace32-pystart`. The documentation is available for download below under “Attachments”.

For feedback and questions, please contact support@lauterbach.com (include "pystart" in the subject).

Supported host OSes: Windows, Linux, MacOSX.

Example for starting TRACE32 PowerView for TriCore using a Python script:


import lauterbach.trace32.pystart as pystart

import sys

debugger_node_name = sys.argv[1]

pystart.defaults.system_path = r"C:\T32"

powerview = pystart.PowerView(pystart.UDPConnection(debugger_node_name), "t32mtc")
powerview.title = f"TRACE32 PowerView for TriCore 0 at PowerDebug Pro {debugger_node_name}"
powerview.id = "T32_tc0"

powerview.start()
powerview.wait()

Example for starting TRACE32 PowerView for TriCore using a config file and the command line:

; classic TRACE32 configuration file

OS=
ID=T32_tc0
SYS=C:\T32

PBI=
NET
NODE=${1}

SCREEN=
HEADER=TRACE32 PowerView for TriCore 0 PowerDebug Pro ${1}
; host OS command line
t32mtc.exe debugger_node_name


Helpful Unhelpful

5 of 5 people found this page helpful

Comment (1)

Wilson Mark (ETAS-VOS/XEO-ARC9)
This is excellent! I really appreciate the work Lauterbach has done for adding Python support.

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image