cancel
Showing results for 
Search instead for 
Did you mean: 

Can a variable be modified by using it's name instead of it's address?

Alon_G
Associate

 

Hello Experts,

Reviving this topic as the referenced video and suggested solution zip file are not available.

https://community.st.com/t5/stm32cubemonitor-mcus/can-a-variable-be-modified-by-using-it-s-name-instead-of-it-s/td-p/87737

 

BTW I would expect such an ubiquitous feature to be already included in CubeMonitor. Perhaps my oversight but I could not find such a feature. I have a program with hundreds of variables I need to control from CubeMonitor, babysitting their addresses or spending ages updating them after every compilation is not practical.

Thank You,

-Alon.

 

5 REPLIES 5
Ozone
Principal II

I don't use and thus don't know Cubemonitor.
But the ST page says :

 - Parses debugging information from the application executable file

You probably use a release build which is usually stripped of all debug information.
I would try the debug build, or modify the elease variant to include debug information.

Thanks for your reply, I am using a debug build. The monitor works, I can see correct variables and addresses in the Basic_Flow I created. The ability to reference a variable by its name and not its address is there somewhere for sure (or at least I hope it is) but I could not find a way to do it.

As said, I don't use Cubemonitor.

I hope you are aware that automatic variables have no (persistent) address.
And in my experience, several tools have issues with global variables declared as "static".

But perhaps it's just an issue of lacking documentation ...

Perhaps, I am new to this tool so I don't know.

However since all relevant variable names AND addresses are already imported from the ELF file and present in the flow, it seems a bit weird that one is forced to use a variable address at all. This is a high level gui tool not a low level debugger isn't it?  at this level I don't care about the specific address of any variable and how it may change if my ELF file is changed.

That is what I would expect as well. As mentioned, I don't use Cubemonitor either.

Runtime monitoring is a bit tricky, so I use it rarely.
And if so, usually via semi-hosting and printf-like outputs of a few specific values.

This always has an impact on runtime behavior.