cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot view the value of peripheral registers in CubeIDE Expressions window

lugama
Associate II

Why can't I view the value of peripheral registers in the Expressions window during debugging?

Snipaste_2024-10-22_16-21-46.png

After I delete a C file, there are only some unused functions in the file, and then I can view the values of peripheral registers,

Snipaste_2024-10-22_16-26-40.png

Prompt information from CubeIDE:

Multiple errors reported.

1) Failed to execute MI command:
-var-create - * GPIOC
Error message from debugger back end:
-var-create: unable to create variable object

2) Unable to create variable object

3) Failed to execute MI command:
-data-evaluate-expression GPIOC
Error message from debugger back end:
No symbol "GPIOC" in current context.

4) Failed to execute MI command:
-var-create - * GPIOC
Error message from debugger back end:
-var-create: unable to create variable object

5 REPLIES 5
AVerm.4
Associate III

You need to apply breakpoints at functions related to peripheral register. Once the controller halts then you can see the register values and even modify them in SFR window.

Thanks for your reply. It seems that this is not the case. I cannot see the value of the ADC1 register even at the breakpoint in the MX_ADC1_Init() function. On the contrary, after I delete the C file, I can view the value of all the peripheral registers used in my project after starting debugging.

Hello @lugama ,

 

First let me thank you for posting and welcome to the ST Community.

In order to reproduce your request, I suggest please that you provide your Ioc.File.

 

Thanks.

Mahmoud

 

Hi, Mahound

I think this issue may not be related to the IOC file.

My way to reproduce this problem is:

1 add a file named Board.c to the project
2 start debugging to reproduce this problem

//Board.c
#include "main.h"

void BoardInit(void)
{
}
//end of file


add Board.c                      --> Reproduce
call BoardInit() in main()   --> Not reproduce
rename Board.c to test.c  --> Not reproduce
delete Board.c                  --> Not reproduce

It seems that file names like Bxxx. c can reproduce this issue

Hello,Mahound

SFR veiw is always OK, but why the Expression view sometimes not OK?

My CubeIDE version:
Version: 1.16.0
Build: 21983_20240628_1741 (UTC)
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.11+9
Java version: 17.0.11