How to use Linux RPMSG API on MP1
I'm currently trying to use the Linux API for RPMSG [1]. However, trying to use the example provided in the documentation does not compile (with the OpenStLinux SDK or with my host machine) even though I have the headers installed. Even the sample provided in the Linux repository does not compile [2]. I have succeeded in opening the /dev/ttyRPMSGX sockets as regular files and using the read(), write() API's. In this case we have the M4 that is passing serialized byte arrays through openAMP, and the Linux application reading the arrays and deserializing them. I sometimes see that there are some bytes missing the the array for a successful deserialization when using the read() interface.
If anyone here has succeeded in using the RPMSG interface, how did you do it?
Also does anyone have an idea why there might be some data loss when using the read() api?
[1]: https://github.com/torvalds/linux/blob/master/Documentation/rpmsg.txt
[2]: https://github.com/torvalds/linux/blob/master/samples/rpmsg/rpmsg_client_sample.c
