2021-07-14 05:51 AM
I have a project which use STM32H743ZI, and i have a data structure
#define APP_MODULE_MAJOR (INT8U)0x01 /*!< Major version of the APP module */
#define APP_MODULE_MINOR (INT8U)0x01 /*!< Minor version of the APP module */
#define APP_MODULE_CUSTOM (INT8U)0x01 /*!< Custom version of the APP module */
static const INT8S APP_s8ModuleNameString[] = "APP";
static const INT8S APP_s8ModuleDescriptionString[] = "APP";
const STD_strModuleInfoType APP_objstrModuleInfoType =
{
.objstrVersion = {APP_MODULE_MAJOR, APP_MODULE_MINOR, APP_MODULE_CUSTOM},
.u32ModuleID = APP_MODULE_ID,
.ps8ModuleNameString = APP_s8ModuleNameString,
.ps8ModuleDescriptionString = APP_s8ModuleDescriptionString
};/*<! APP module information instance */
and when trying to watch any of its members, i'm getting error in watcher
Failed to execute MI command:
-data-evaluate-expression *((APP_objstrModuleInfoType).ps8ModuleDescriptionString)
Error message from debugger back end:
Missing ELF symbol "APP_objstrModuleInfoType".
i checked the optimization setting and there is no optimization, so why Am I getting this error?
2021-07-14 06:04 AM
Why do you want to watch const expressions. The compiler will not write to them. And the compiler will reuse constant values.
2021-07-14 06:16 AM
Actually, it is a long story but I wanted to make it simple.
Anyway, the story is that I'm trying to parse the ELF file to display the information. and for some reason this data structure members' addresses are set to zero. and I want to get the stored value in the u32ModuleID which currently has address zero (it is wrong address).
so when i wanted to check what is wrong, i found that even the STMCubeIDE can't watch the same structure. so i want to know why this data structure members' addresses are set to zero
2021-07-14 12:12 PM
The Issue that the structure is optimized even the optimization level is none, Any ideas?