2021-03-23 07:02 AM
Hello,
iam trying to implement more or less the same example as with the virtualUARTs with multiple Endpoints just with the rpmsg_char driver and plain endpoints without virtualUART on M4 side. Iam struggling to get multiple Endpoints to work. One is working fine and the other is created as well. But i cant send and receive data through the second endpoint. Does anyone have an example with multiple endpoints with the rpmsg_char driver?
Solved! Go to Solution.
2021-03-29 04:33 AM
Hello,
The rpmsg_char is not compatible with the rpmsg virtio neither in ST or in kernel.org distribution. So I assume that you are using a specific Linux Kernel patch coming from Xilinx, right?
Xilinx has patched the kernel to be able to use the rpmsg_char. So no guaranty that this works with several endpoints and on another platform. Seems the same for the example, only one endpoint is created (charfd is a global variable).
So you have to understand the behavior of such implementation, as mentioned in my previous mail, a good entry point is to analyze the RPMsg exchanged by enabling the dynamic debug
echo -n 'file virtio_rpmsg_bus.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file virtio_ring.c +p' > /sys/kernel/debug/dynamic_debug/control
2021-03-23 10:48 AM
Hello,
Could you detail your context, as the rpmsg_char is not supported in the ST distribution.
Do you back-port this series: https://patchwork.kernel.org/project/linux-remoteproc/list/?series=446305&state=%2A&archive=both ?
Be careful in this case to fix the Linux Local endpoint addresses to avoid that this address change, each time you open/close the /dev/rpmsgX.
On my side i tested using the OpenAMp TTY echo exemple ( so the virtualUARTs) , by disabling the rpmsg TTY on Linux side and it works well.
I would suggest you to enable the dynamic debug on Linux and enable rpmsg_virtio traces :
Theses traces print messages with source and destination addresses to help you to debug.
2021-03-29 02:44 AM
Hello,
i enabled the rpmsg_char device via Yocto and with one endpoint its working fine for me but not with two. I tried to use fixed adresses not based on RPMSG_ADR_ANY. Still it only works for one endpoint. My usage of the rpmsg_char is based on the Xilinx example https://github.com/Xilinx/meta-openamp/blob/master/recipes-openamp/rpmsg-examples/rpmsg-echo-test/echo_test.c. The M4 creates the two "Channels" virtio0.rpmsg-openamp-demo-channel.-1.0 and virtio0.rpmsg-openamp-demo-channel.-1.1. Iam actually able to acess both it but with the virtio0.rpmsg-openamp-demo-channel.-1.1 i cant exchange data.
A part of my M4 code is attached.
2021-03-29 04:33 AM
Hello,
The rpmsg_char is not compatible with the rpmsg virtio neither in ST or in kernel.org distribution. So I assume that you are using a specific Linux Kernel patch coming from Xilinx, right?
Xilinx has patched the kernel to be able to use the rpmsg_char. So no guaranty that this works with several endpoints and on another platform. Seems the same for the example, only one endpoint is created (charfd is a global variable).
So you have to understand the behavior of such implementation, as mentioned in my previous mail, a good entry point is to analyze the RPMsg exchanged by enabling the dynamic debug
echo -n 'file virtio_rpmsg_bus.c +p' > /sys/kernel/debug/dynamic_debug/control
echo -n 'file virtio_ring.c +p' > /sys/kernel/debug/dynamic_debug/control
2021-04-07 05:37 AM
More of the discussion is available here : https://github.com/OpenAMP/open-amp/discussions/279