My application is splitted into several static libraries which at the end are linked together.
One of the libraries is a PORT library which contains source code for interrupts handlers. If the source code of my isr.cpp looks like below, the sys_tick_handler definition is in fact optimized out, and whenever the sys_tick interrupt occurs, the null_handler is called. I have created the simple workaround to fix this, by declaring in isr.h some kind of dummy function, and then defining it in the isr.cpp file. Then I need to call this dummy function in my main. It helps, because after all, the sys_tick interrupts are invoking the handler from isr.cpp. But I'm not proud of it, it is just workaround as I said - so I'm wondering how I could fix it without doing such hacks.
Here is the code of isr.cpp
extern "C" {
void sys_tick_handler(void)
{
}
}
Workaround isr.h
void func();
Workaround isr.cpp
void func() {}
extern "C" {
void sys_tick_handler(void)
{
}
}