Part Number: TM4C1294KCPDT
Tool/software: TI C/C++ Compiler
Hello!
I have complex project originally designed in C++ for TM4C123F MCU, and also ported to TM4C1294 MCU. Now I faced very veird issue:
When I run the code I see one of my object behaves like VMT is corrupt, so when I debug call to a function of this object I see the call falls into another function.
Here is the details of the project:
1. I have application independent kernel library, built as static library, where abstract base class JCApp declared, and this class has virtual functions:
class JCApp: public EvtTarget, public GUI
{
...
public:
virtual void DefaultConfig() {}
virtual void Init() = 0;
...
};
2. I have application library, buill as static library, where application class derived from JCApp declared:
class ASMApp: public JCApp
{
...
void DefaultConfig();
...
public:
...
void Init();
...
}
3. In a framework project I have some other object, creating and accessing ASMApp object inside a constructor:
SummaryApp::SummaryApp(bool Selected)
{
...
for(i = 0; i < nApps; i++)
{
...
Apps[i] = new ASMApp(true);
}
...
if((NewSign != Conf.AppSigns) || (NewSize != Conf.AppTotSize))
{
for(i = 0; i < nApps; i++)
{
Apps[i]->DefaultConfig();
}
...
}
...
}
During debug, I step on line "Apps[i]->DefaultConfig();" and when I step into, I unexpectly fall into Init() function.
I tryed to replace this call to "Apps[i]->Init();" and when I fall into some other function of ASMApp.
So, it looks like VMT is corrupt.
The same code on TM4C123F MCU works fine. The toolchain in both pports is ti-cgt-arm_20.2.0.LTS
Could anyone help with this issue? Thank you!