Hello,
I am trying to implement a PIT interrupt on a C++ program.
I have already inserted the extern "C" guards on the interrupt and positioned it outside a Class, but on a different .cpp file than Main function, on the same file that triggers it.
In such scenario the interrupt does not work; however if I just move the interrupt to the main.cpp file it works like a charm. As further information, I am instantiating the class (a singleton) on the main function for PIT testing.
I searched the forums but did not find any explanation about it, is this the expected behavior? Or is there anything else I am missing so I can move it to another .cpp file?
I am using SDK version 2.6.0 (2019-06-14) for the K22FN microcontroller running at 96MHz.
Thanks for your support,
Thiago
已解决! 转到解答。
I would check the linker .map file if it really is there with the unmangled name?
There must be something you have missed with placing it in a different file.
If in the different file it uses the unmangled name too, there should be no difference.
I hope this helps,
Erich
I would check the linker .map file if it really is there with the unmangled name?
There must be something you have missed with placing it in a different file.
If in the different file it uses the unmangled name too, there should be no difference.
I hope this helps,
Erich
Hi Erich,
Thanks for the tip on the map file.
Now it is working. For some reason it was not before, probably I did something wrong when "C" guarding the function that it was not being recognized as a C function.
Anyhow, to look into the map file is a good way to detect such C/C++ interaction problems.
Thanks !