2024-10-22 02:19 AM - last edited on 2024-10-22 02:44 AM by Andrew Neil
Why can't I view the value of peripheral registers in the Expressions window during debugging?
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,
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
2024-10-22 02:22 AM
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.
2024-10-22 02:37 AM
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.
2024-10-23 02:28 AM
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
2024-10-23 08:50 AM
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
2024-10-25 03:56 AM