shivaleela patangi
shivaleela patangi

Reputation: 3

how to export a variable values from TRACE32

My question is how to export a variable value which I have seen in watch window? I need to append the values of that variable in Excel format, I'm using the TRACE32 software.

Upvotes: 0

Views: 8953

Answers (2)

Holger
Holger

Reputation: 4183

You can export variables to a CSV file as displayed in the Var.WATCH window with command Var.EXPORT. Each variable will get its own line in the CSV. To ensure that only the data and not also the command Var.EXPORT gets part of the result use the command WinPOS ,,,,,0 before Var.EXPORT.

E.g. to export the scalar variables x and y to a CSV file including the type information you can use the commands:

WinPOS ,,,,,0
Var.EXPORT myfile.csv %Hex %Type x y

Upvotes: 2

dev15
dev15

Reputation: 750

You can write / append to a file using OPEN, WRITE and CLOSE. Every Spreadsheet program can read CSV and it's easy to write:

OPEN #1 <file name> /Create
WRITE #1 "," Var.VALUE(<variable name>)
CLOSE #1

Writing to a Microsoft Excel file, e.g. XLSX is much more complicated, there are libraries for this in other languages, but I don't think there's anything in TRACE32.

If you want to write it manually you can look into adding a custom button (MENU.AddTool), otherwise you'll need to specify your condition(s).

Upvotes: 0

Related Questions