cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE: Memory debug. In debug, the hexa values seen in the memory (shown by cubeIDE) don't match with the value of my variable !

LLr.1
Senior

Like you can see here:

0693W00000KZYNJQA5.pngThe LED is On so I have in aRxBuffer 13 10... (I see these values with an oscillo also..) but we can see it in the memory window...

The memory window is broken ?

Thank you

4 REPLIES 4
mattias norlander
ST Employee

Unable to re-produce, works for me.

Can you extract some minimal reproducible example? Preferably stripping any HW dependency like UART. Makes it easier to test run. Which debug probe and gdb-server are you using?

The Memory view comes with the Eclipse/CDT platform. I dont think there is a bug on that layer... Could you also enter the aRXBuffer in Expression view and examine the data there?

Could be interesting to have a look at the GDB traces log also!

LLr.1
Senior

The code is the UART Polling example of the CubeWL (with some modifications to send AT Command throught UART and receive some data in return). Precisely, I have the impression that there is a link with UART. Indeeed, I can see successfully other variables. I use the NUCLEO WL55JC.

"Could you also enter the aRXBuffer in Expression view and examine the data there?" -> Ok, I will do it

"Could be interesting to have a look at the GDB traces log also!" -> Sorry but how to do that ?

Best regard

Enable GDB traces:

0693W00000KawUaQAJ.pngThen during debug you will get log output in the "Debugger console" view that you can submit here.

If I do the same I get this output from GDB when it reads the variable aBuffer:

289,455 (gdb) 
358,741 58-var-create --thread 1 --frame 0 - * aBuffer
358,752 58^done,name="var1",numchild="10",value="[10]",type="uint8_t [10]",has_more="0"
358,752 (gdb) 
358,759 59-var-create --thread 1 --frame 0 - * &(aBuffer)
358,767 59^done,name="var2",numchild="1",value="0x20000028 <aBuffer>",type="uint8_t (*)[10]",has_mor\
e="0"
358,767 (gdb)

This is let's call it "raw output" read from target before Eclipse starts rendering this with different views. So if you catch the data at this level then we can conclude whether we what we read from target is incorrect or if it is only Eclipse that is rendering information incorrectly.

Hello,

I think the problem is here because that is my GDB traces :

0693W00000KcTTNQA3.pngThank you and best regards