Skip to main content
JPerr.2
Associate II
June 30, 2022
Solved

How to configure SWV data trace comparator with an address instead of a variable name?

When I configure a SWV data trace comparator with a variable name, it's working properly. If, instead of the variable name, I use its address (extracted from the map file, so I know it's correct), it doesn't work, I mean no data is printed out in the SWV Data Trace window and SWV Trace Log doesn't show any activity related to this.

For this simple example, it would be fine to use the variable name but, for other situations, using the address is required as the IDE is not able to resolve the variable address.

I'm currently using v1.9.0, I don't know if previous versions are showing the same issue.

Any clue about that?

This topic has been closed for replies.
Markus GIRDLAND
Markus GIRDLANDBest answer
ST Employee
July 4, 2022

Ah, I did some digging in our ticket system.

It looks like this was a regression bug introduced in STM32CubeIDE 1.9.0.

I did a test on my newly installed version, STM32CubeIDE 1.10.0 (released last week) and it works.

So if you want to trace using the address you would either need to download the previous version of 1.8.0 or move to the newer version 1.10.0.

Let me know if you run into any issues in any of those versions!

4 replies

Markus GIRDLAND
ST Employee
July 4, 2022

Hello there,

Is there any other changes you make to the tracing other than changing the comparator to use the address instead of the variable name? Is it the same variable but using its address or another variable?

Your use case should be supported according to chapter 4.2.2 of the STM32CubeIDE user guide where it states:

"[Data Trace]: It is possible to trace up to four different C variable symbols, or fixed numeric areas of the memory. To do that, enable one comparator and enter the name of the variable or the memory-address to trace. The value of the traced variables can be displayed both in the Data Trace and Data Trace Timeline Graph views."

So I don't see why it shouldn't be working. I can try to recreate the use case later today to see if I get the same problem.

JPerr.2
JPerr.2Author
Associate II
July 4, 2022

Hi Markus,

There's no particular setting to the SWV:

0693W00000QKNp6QAH.pngThe screenshot above shows my attempt to use an address instead of the variable name. Now that's even worse than with my previous attempt last week, I get this error message (not when clicking the SWV settings dialog box OK button but when activating the trace record option).

0693W00000QKNrCQAX.pngFor this particular test case, the address is the one corresponding to the variable name used when it works. With the real use case, the address is pointing to a struct field.

Markus GIRDLAND
Markus GIRDLANDBest answer
ST Employee
July 4, 2022

Ah, I did some digging in our ticket system.

It looks like this was a regression bug introduced in STM32CubeIDE 1.9.0.

I did a test on my newly installed version, STM32CubeIDE 1.10.0 (released last week) and it works.

So if you want to trace using the address you would either need to download the previous version of 1.8.0 or move to the newer version 1.10.0.

Let me know if you run into any issues in any of those versions!

JPerr.2
JPerr.2Author
Associate II
July 4, 2022

I just updated to v 1.10.0 and I can confirm that using the address it's now working properly. Thank you for the advise.