Using erpc in a frdmmcxn947, opening the ERPC_MESSAGE_LOGGING macro reported an error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using erpc in a frdmmcxn947, opening the ERPC_MESSAGE_LOGGING macro reported an error

跳至解决方案
815 次查看
yzs
Contributor I

HI, 

I'm using erpc in a frdm board and found that opening the ERPC_MESSAGE_LOGGING macro reported an error. The attached image shows the detailed error message.image-20241221154950008.png

 

 

标签 (1)
0 项奖励
回复
1 解答
752 次查看
Celeste_Liu
NXP Employee
NXP Employee

Hello @yzs ,

You are welcome. If that reply answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

BRs,

Celeste

在原帖中查看解决方案

0 项奖励
回复
3 回复数
771 次查看
Celeste_Liu
NXP Employee
NXP Employee

Hello @yzs ,

Thanks for letting us know about this issue. 

I have indeed reproduced your issue. The `logMessage` function expects a parameter of the `MessageBuffer *` pointer type. However, the previous error message indicated that it was not possible to convert an ordinary `erpc::MessageBuffer` object into an `erpc::MessageBuffer*` pointer type. Therefore, the following workaround can be considered to solve this type mismatch problem: obtain a reference using the `getBufferRef` function and then pass the pointer by taking the address. The code modification is as follows:

In erpc_client_manager.cpp:

Celeste_Liu_0-1734934523832.png

Celeste_Liu_1-1734934533705.png

 

By modifying the above code, it can be compiled successfully.

Celeste_Liu_2-1734934552890.png

 

However, this approach may not be the optimal solution. I will submit a Jira ticket to the SW Team to further investigate this issue.

Thanks again for your post. Have a nice day~

BRs,

Celeste

0 项奖励
回复
763 次查看
yzs
Contributor I
Hello,
Thank you for answering that question.
BRs,
yzs
0 项奖励
回复
753 次查看
Celeste_Liu
NXP Employee
NXP Employee

Hello @yzs ,

You are welcome. If that reply answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

BRs,

Celeste

0 项奖励
回复