Hello,
I have two sources of interrupts in my C++ code. And I am trying to register them with the SYS BIOS using the API calls as follows:
1. GPIO
EventCombiner_dispatchPlug (89, (EventCombiner_FuncPtr)Class_A::ISR_GPIO, (UArg)0, 1);
2. SRIO
EventCombiner_dispatchPlug (49, (EventCombiner_FuncPtr)Class_B::ISR_SRIO, (UArg)0, 1);
CpIntc_dispatchPlug(49, (CpIntc_FuncPtr)(Class_B::ISR_SRIO), (UArg)hSrioDriver, 1);
All this is C++ code. The interrupt subroutine for GPIO is called successfully on GPIO events.
ISR_SRIO is not invoked for SRIO events.
If I make the ISR_SRIO a pure C function defined in a C file, and wrap the srio ISR setup ( call to EventCombiner_dispatchPlug and CpIntc_dispatchPlug) in a block of extern "C", then the ISR_SRIO is called on SRIO events. So, the other SRIO configuration are proper, and it is a ISR setup issue.
Now, I need to avoid C source files. I tried the making the ISR_SRIO a non-member function, and putting it in an extern C block of a Cpp file. The operations EventCombiner_dispatchPlug and CpIntc_dispatchPlug are also in a extern C block of the Cpp file. In this case. the srio ISR is not called. Name mangling issue should have been handled by doing so, correct?
Other possiblity that I took care of is that the mangled names need to be 32 bytes or less. The name used here are not the original names in my code. But I have made sure the mangled names, as they appear in the map file, are less than 32 bytes.
Any pointers if it can be mangling issue, or something else?
One thing is. GPIO module works alright (did not have to use extern C at all), while SRIO does not if all code is C++. But GPIO setup does not use CpIntc_dispatchPlug modules as GPIO is primary interrupts (for DSP 66xx), while SRIO are secondary interrupts and need to be mapped using CpIntc_dispatchPlug.
I am using SYSBIOS 6.32.5.54, XDC tools 3.22.4.46, and Compiler 7.3.1
Thanks
Thakkar