2020-03-30 01:44 AM
We are trying to achieve the same kind of variable watching Keil has but with the STM32CubeIDE. The variables do not appear in the Variables tab under the Debug view so we added dummy variables to the expression tab. The initial value of the variable shows fine and then when we resume the program after the HAL_Init breakpoint the 'Target not available.' error appears. Was anyone able to get the feature to work? Or are we supposed to use another program if we want this feature?
Thanks,
David.
2020-04-01 09:13 AM
Hello @DHama.1 , I think Live Expressions will do the job :)
2020-04-01 09:18 AM
I tried that option as well, when I insert any variable inside it I'm getting "This feature is not supported" in the value column. Is there anything special I need to do to make it work?
2020-04-08 07:18 AM
It looks like you are using OpenOCD which does not support Live expressions. You need to switch the debug probe to either ST-Link GDB server or J-Link, they both support the feature.
2020-11-30 04:35 AM
Hello Markus. Is this still true with the newest update? It says Improved OpenOCD supporting: Live expressions. But I still get the "This feature is not supported" when connecting over OpenOCD. Is there anything i need to do in addition?
2020-11-30 05:20 AM
Hi, glad you read the release note. Indeed, it is now possible from STM32CubeIde 1.5.0 to use Live variable watch with Openocd.
You must use global variable and add them in the Live variable view.
Rgds,
Laurent
2020-11-30 05:26 AM
Thanks for the quick reply! Do you mean global variables in the code, or am I missing something? Because in the code they are global. Live Expression works when using ST-link locally, but not when connecting to the remote targets (they use openocd and jtag). I do however get variables and expressions when i pause
2020-11-30 08:53 AM
Yes, in the code, variables that are declared out of main() function.
And is it working with STLink gdb server on remote targets ?
2020-11-30 09:35 AM
Which openocd did you take to do your tests ?
You must use the one in CubeIde plugins and the cfg files that goes with it to make it work.
Rgds,
Laurent
2020-12-01 02:56 AM
I use the openocd compiled from source, as it is run on a raspberry pi. Is there any way to get the cubeIDE version on a pi? When i tried with the cube-provided openocd cfg i got Error: invalid command name "st-link"