cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Linux RPMSG API on MP1

RLeve
Associate

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

4 REPLIES 4
IYetk
Associate III

QT framework has an API called "QTserialport" You can read the serial messages on Linux side coming from /dev/ttyRPMSGX with this api. In QT there is signal/socket mechanism.

With this mecanism you can read the messages whenever they come.

what was the baudrate you gave for the serialport configuration?

IYetk
Associate III

No baudrate. you use just like this:

QSerialPort serialPort1;

       serialPort1.setPortName("/dev/ttyRPMSG0");

       serialPort1.open(QIODevice::ReadWrite);

;

;

without QT you can also write in a file or just cat coming messages like this:

cat /dev/ttyRPMSG0 &

cat /dev/ttyRPMSG0 >> anyfile.txt &

debugging
Senior III

Not so familiar, just starting, with RPMSG but just wondering if what you are trying to achieve is simillar as what the OpenAMP_TTY_Echo example does ? I ran this fine on a custom MP157AAA3 board.