Skip to main content
LLr.1
Associate III
Feb 17, 2022 2:57 PM UTC
Question

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 !

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

This topic has been closed for replies.

4 replies

mattias norlander
ST Technical Moderator
Feb 22, 2022 2:31 PM UTC

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!

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
LLr.1
LLr.1Author
Associate III
Feb 22, 2022 2:43 PM UTC

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

mattias norlander
ST Technical Moderator
Mar 1, 2022 10:28 AM UTC

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
LLr.1
LLr.1Author
Associate III
Mar 14, 2022 9:13 AM UTC

Hello,

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

0693W00000KcTTNQA3.pngThank you and best regards