Accessing my kernel rpmsg buffer from user space

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

Accessing my kernel rpmsg buffer from user space

跳至解决方案
2,438 次查看
ababatola
Contributor III

Hi,

I have been able to communicate between my imx8mp MPU and the MCU.  However, I want to access the data in the shared memory from the user space.  Is there an example for this?

I would also like to ask if the imx_rpmsg_pinpong.c device driver can be extended to handle linux Userspace I/O for the communication between the kernel space and the user space.

Thanks

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
2,380 次查看
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @ababatola ,

I hope you're doing well! Sorry for the late reply.

I'd recommend taking a look at the rpmsg_lite_str_echo_rtos multicore example found in the i.MX 8M Plus SDK. It's a simple application which allows you to send a message from the Cortex A to the Cortex M and then M4 displays what is received, and echoes back the same message as an acknowledgement. 

You can build and download the SDK from https://mcuxpresso.nxp.com/

Let me know if this works for you.

Best regards,
Hector.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,381 次查看
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @ababatola ,

I hope you're doing well! Sorry for the late reply.

I'd recommend taking a look at the rpmsg_lite_str_echo_rtos multicore example found in the i.MX 8M Plus SDK. It's a simple application which allows you to send a message from the Cortex A to the Cortex M and then M4 displays what is received, and echoes back the same message as an acknowledgement. 

You can build and download the SDK from https://mcuxpresso.nxp.com/

Let me know if this works for you.

Best regards,
Hector.

0 项奖励
回复
425 次查看
EANGJS
Contributor I
Hi,
I am also looking at the same issue. The example you provided works with the kernel module.
However, I am actually looking for a example userspace application. Could you provide a sample C program i can run on the linux side within userspace.
Thanks!
0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1745199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BB%8E%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E8%AE%BF%E9%97%AE%E6%88%91%E7%9A%84%E5%86%85%E6%A0%B8%20rpmsg%20%E7%BC%93%E5%86%B2%E5%8C%BA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1745199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E7%BB%8F%E8%83%BD%E5%A4%9F%E5%AE%9E%E7%8E%B0%E6%88%91%E7%9A%84imx8mp%20MPU%E5%92%8CMCU%E4%B9%8B%E9%97%B4%E7%9A%84%E9%80%9A%E4%BF%A1%E3%80%82%E4%BD%86%E6%98%AF%EF%BC%8C%E6%88%91%E6%83%B3%E4%BB%8E%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E8%AE%BF%E9%97%AE%E5%85%B1%E4%BA%AB%E5%86%85%E5%AD%98%E4%B8%AD%E7%9A%84%E6%95%B0%E6%8D%AE%E3%80%82%E6%9C%89%E4%BE%8B%E5%AD%90%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E8%BF%98%E6%83%B3%E9%97%AE%E4%B8%80%E4%B8%8B%20imx_rpmsg_pinpong.c%E8%AE%BE%E5%A4%87%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E5%8F%AF%E4%BB%A5%E6%89%A9%E5%B1%95%E4%BB%A5%E5%A4%84%E7%90%86%20Linux%20%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%20I%2FO%EF%BC%8C%E4%BB%8E%E8%80%8C%E5%AE%9E%E7%8E%B0%E5%86%85%E6%A0%B8%E7%A9%BA%E9%97%B4%E5%92%8C%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E4%B9%8B%E9%97%B4%E7%9A%84%E9%80%9A%E4%BF%A1%E3%80%82%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1745199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388071%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Accessing%20my%20kernel%20rpmsg%20buffer%20from%20user%20space%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388071%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CBR%20%2F%3E%E6%88%91%E4%B9%9F%E5%9C%A8%E5%85%B3%E6%B3%A8%E5%90%8C%E6%A0%B7%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82%E4%BD%A0%E6%8F%90%E4%BE%9B%E7%9A%84%E7%A4%BA%E4%BE%8B%E9%80%82%E7%94%A8%E4%BA%8E%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E3%80%82%3CBR%20%2F%3E%E4%BD%86%E6%88%91%E5%AE%9E%E9%99%85%E4%B8%8A%E6%83%B3%E6%89%BE%E4%B8%80%E4%B8%AA%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E7%A4%BA%E4%BE%8B%E3%80%82%E8%83%BD%E5%90%A6%E6%8F%90%E4%BE%9B%E4%B8%80%E4%B8%AA%E5%8F%AF%E4%BB%A5%E5%9C%A8Linux%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E8%BF%90%E8%A1%8C%E7%9A%84C%E8%AF%AD%E8%A8%80%E7%A8%8B%E5%BA%8F%E7%A4%BA%E4%BE%8B%EF%BC%9F%3CBR%20%2F%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1749773%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Accessing%20my%20kernel%20rpmsg%20buffer%20from%20user%20space%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1749773%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F215623%22%20target%3D%22_blank%22%3E%40ababatola%3C%2FA%3E%20%EF%BC%8C%3C%2FP%3E%0A%3CP%3E%E5%B8%8C%E6%9C%9B%E4%BD%A0%E4%B8%80%E5%88%87%E9%83%BD%E5%A5%BD%EF%BC%81%E6%8A%B1%E6%AD%89%E5%9B%9E%E5%A4%8D%E6%99%9A%E4%BA%86%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%88%91%E5%BB%BA%E8%AE%AE%E6%82%A8%E6%9F%A5%E7%9C%8B%20i.MX%208M%20Plus%20SDK%20%E4%B8%AD%E7%9A%84%20rpmsg_lite_str_echo_rtos%20%E5%A4%9A%E6%A0%B8%E7%A4%BA%E4%BE%8B%E3%80%82%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E7%AE%80%E5%8D%95%E7%9A%84%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%8C%E5%85%81%E8%AE%B8%E4%BD%A0%E4%BB%8E%20Cortex%20A%20%E5%90%91%20Cortex%20M%20%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%EF%BC%8C%E7%84%B6%E5%90%8E%20M4%20%E6%98%BE%E7%A4%BA%E6%8E%A5%E6%94%B6%E5%88%B0%E7%9A%84%E5%86%85%E5%AE%B9%EF%BC%8C%E5%B9%B6%E5%B0%86%E7%9B%B8%E5%90%8C%E7%9A%84%E6%B6%88%E6%81%AF%E5%9B%9E%E6%98%BE%E4%BD%9C%E4%B8%BA%E7%A1%AE%E8%AE%A4%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%82%A8%E5%8F%AF%E4%BB%A5%E4%BB%8E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmcuxpresso.nxp.com%2F%3C%2FA%3E%E7%89%88%E6%9C%AC%E5%92%8C%E4%B8%8B%E8%BD%BD%20SDK%E3%80%82%3C%2FP%3E%0A%3CP%3E%E5%A6%82%E6%9E%9C%E8%BF%99%E4%B8%AA%E6%96%B9%E6%B3%95%E5%AF%B9%E4%BD%A0%E6%9C%89%E6%95%88%EF%BC%8C%E8%AF%B7%E5%91%8A%E8%AF%89%E6%88%91%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%EF%BC%8C%3CBR%20%2F%3E%E8%B5%AB%E5%85%8B%E6%89%98%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E