I understand that the question is off topic, and the problem is probably not in the platformio, but maybe someone has encountered it. I receive data via st-link2 to the stm32CubeMonitor program. For the test, I created a ++variable, but it does not change its value either. The ST-link reacts to the start of monitoring, the red LED starts blinking, apparently for some reason I do not receive data.
The addresses of these variables may change on every compile, and especially in optimized vs. debug builds. If you start debugging, by default, it will compile the firmware with build_type = debug and -Og, while after a regular upload, it will compile it with -Os. The addresses of these target variables may be completely different in those two builds. You should debug-print the address of these variables and update them in that GUI accordingly. Or, add build_type = debug in the platformio.ini so that thereβs no difference between release and debug uploads any more, start debugging, note the address of the variables in the Debug Console through GDB commands (p &varname) and update the values accordingly.
Thank you! I really did just that! But one more correction for future users (this is really a very convenient, and most importantly, real time, tool). For some reason, the manuals do not pay attention to the value of the Access point parameter, but only after setting it to 0 did I get the data.
So, if someone, like me, is tired of displaying variables through the monitor, here is a ready-made recipe. In the platform.ini only needs to add build_flags = -gdb and build_type = debug. This debug_tool = st link is only needed when debugging inside the IDE.
[env:demo_f030f4]
platform = ststm32
board = demo_f030f4
framework = stm32cube
upload_protocol = stlink
lib_archive = no
build_type = debug
build_flags = -ggdb
After that, just select your st-link in the Cube Monitor settings, specify the elf file, select variables for monitoring and you are the owner of your own Interslellar!
1