2

I have total 100 variables which are continuously updated in Trace32 during runtime. I wanted to export all the 100 variables to text file continuously during runtime. I have used below mentioned commands to export watch window variables to a text file, but only few watch variables are exported to the text file.

1) PRinTer.OPEN "~~~/varwatch.txt" ASCIIE
2) WinPRT <window name>
3) PRinTer.CLOSE

How can we export complete Trace32 watch window data to the text file during runtime?

Please refer the link: Access watch variables from trace32 scripting language

Holger
  • 3,920
  • 1
  • 13
  • 35
Raju
  • 21
  • 2

1 Answers1

1

Open the watch window super wide and use WinPRT <window name> /ALL.

Without the option /ALL only the visible part of your watch window will be printed (to file).

To open the window super wide use WinPOS ,,1000. before the command Var.Watch.

By the way: By using the command WinPOS you can specify the "window name" of your watch window.

Putting all together you get.:

WinPOS ,,1000.,,,,myWatchWindow
Var.Watch
Var.AddWatch %Decimal x y z
Var.AddWatch %Open 1 myStruct
PRinTer.OPEN "~~~/varwatch.txt" ASCIIE
WinPRT myWatchWindow
PRinTer.CLOSE
WinCLEAR myWatchWindow
Holger
  • 3,920
  • 1
  • 13
  • 35
  • Sir, Thanks a lot. I will try this solution. Also I tried the below option and it worked for me. ''We need to right click on variable->format-> Choose E-> Set as default-> Ok'' this enables memory access to updated variable values while the ECU is running. Then used below commands to store the watch window data to .txt file, 1)PRinTer.OPEN "~~~/varwatch.txt" ASCIIE 2)WinPRT var.watch /ALL 3)PRinTer.CLOSE – Raju Sep 29 '22 at 11:44