2019-10-16 02:30 AM
Hello,
I'm currently using STM32CubeIDE (version 1.1.0) to write and debug a c++ program on a NUCLEO F767ZI.
I'm trying to use the "Live Expression" but it either doesn't update the variables live (it updates them when I pause the program") or it says "Failed to evaluate expression".
What is the correct way to configure the debugger?
My current configuration is:
2019-10-16 04:15 AM
Update: it works with global variables. Is this the right behaviour or is this a bug? Will tracing local variables be available in the future?
2019-10-16 04:54 AM
You can trace local variable ONLY in the context they exist.
Otherwise they are just stack values with a whatsoever meaning.
Try to understand the C language concepts behind variable lifetime, visibility, and related memory allocation concepts.
2019-10-16 06:43 AM
Thanks, I passed programming 101.
I thought that it could maybe track variables on the stack
2019-10-16 07:18 AM
This is in programming 102 ...
Once the function defining the local variable is left, the same address / memory cell is used elsewhere, in another function, for another purpose.
Since the stack usually contains return addresses as well, messing with addresses of local (stack) variables outside it's context is a sure recipe for disaster.
2024-08-08 12:17 PM
Try view the "expressions" and not the "live expressions". This worked for me
2024-08-08 12:45 PM
nvm i misread :)