Part Number: MCU-PLUS-SDK-AM64X
I am using SDK 11.00.00.15, and I am working with the RPMessage implementation included in TI IPC.
I am trying to register multiple local endpoints with my own callback (OnRPMessage) across a range of endpoint IDs.
However, I am facing the following problem:
Even though I loop through multiple endpoint IDs, all entries in gIpcRpmsgCtrl.localEndPtObj[] end up pointing to the same RPMessage object.
As a result, the endpoints do not behave independently.
for (int i = 0 ; i < 7 ; i++)
{
RPMessage_CreateParams_init(&createPrms);
createPrms.localEndPt = i;
createPrms.recvCallback = RPMessage_User_Callback_Handler;
status = RPMessage_construct(&gIpcRpmsgCtrl.controlEndPtObj, &createPrms);
if (SystemP_SUCCESS != status)
{
break;
}
}
controlEndPtObj is the only RPMessage_Object defined in gIpcRpmsg_Ctrl in the TI SDK.Because I pass the same object (controlEndPtObj) every time:
RPMessage_construct()stores that same pointer inlocalEndPtObj[i]- therefore all entries end up identical:
localEndPtObj[4] → &controlEndPtObj
localEndPtObj[5] → &controlEndPtObj
localEndPtObj[6] → &controlEndPtObj
...
Thus multiple endpoints cannot operate independently.
Question:
Is RPMessage designed such that each local endpoint must have its own dedicated RPMessage_Object instance?
If yes:
1. Is it correct that I should allocate an array of RPMessage_Object for user-defined endpoints?
2. Is there any official or recommended way to create multiple endpoints with callbacks?
3. Is it acceptable to extend IpcRpmsg_Ctrl, like:
CRPMessage_Object userEndPtObj[RPMESSAGE_MAX_LOCAL_ENDPT];
and pass &userEndPtObj[i] to RPMessage_construct()?
4. Or does TI recommend a different design for handling multiple custom endpoints?
Best regards,
Hiroki Hoshina