2023-02-06 06:00 PM
Took me a while to find this, I hope it helps others.
Running STM32CubeIDE v1.11.2. I noticed suddenly my variables values under Live Expressions were showing garbage. After a bit of investigation, I found I had to pad my structs to be 4 byte aligned.
2023-02-08 01:15 AM
Hello @HMcKi ,
Thank you for posting this issue.
Could you please provide a minimalistic example to reproduce this problem.
Also, I wonder if you find the same issue with the expression view or it appears only in live expression.
Thank you,
Rim.
2023-02-08 01:55 PM
Not happening now sorry, will keep an eye out.
2023-02-08 04:43 PM
I have an example, in a FreeRTOS task I have a variable:
SPI_Queue_Type SPI_TxBuf;
After a successful xQueueReceive() if I hover the cursor over SPI_TxBuf the element SPI_Action has a different value to if I hover over SPI_TxBuf.SPI_Action
I can't see anything wrong, the code functions as expected but the value in "Variables" tab is also wrong.
This is part of a multi-task complex code, and is very frustrating.
BTW There is no code optimisation.
2023-11-09 05:28 AM
Hello,
I'm occasionally experiencing the same problem after some time of debugging session, where the program is interrupted, run in steps and resumed continuously. I captured the the following image when the execution was suspendend/paused; it shows that the expression variable is different from the live expression variable. When the program resumes, the live variable gets insane unstable. Stopping the debug session or restarting the ide doesn't fix the problem.
The magic fix is achieved by disconnecting the USB cable from the ST-LINK (ST-LINK/V2 ISOL with latest firmware in my case) and restating the debug session.
I hope this help.