samples: ipc: Update openamp rsc table documentation

This change follow the recent commit that update openamp rsc table logs.
Add the logs for both samples sample client & TTY responder,
as well as for both sides Linux & Zephyr.
Remove the serial connection to Zephyr because it is board specific.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
This commit is contained in:
Marc-Antoine Riou 2023-12-11 17:05:03 +01:00 committed by Fabio Baltieri
commit 8e1bc2b058

View file

@ -18,69 +18,89 @@ a Linux kernel OS on the main processor and a Zephyr application on
the co-processor. the co-processor.
Building the application Building the application
************************* ************************
Zephyr Zephyr
------- ======
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/openamp_rsc_table :zephyr-app: samples/subsys/ipc/openamp_rsc_table
:goals: test :goals: test
Linux Running the client sample
------ *************************
Enable SAMPLE_RPMSG_CLIENT configuration to build and install Linux setup
the rpmsg_client_sample.ko module on the target. ===========
Running the sample Enable ``SAMPLE_RPMSG_CLIENT`` configuration to build the :file:`rpmsg_client_sample.ko` module.
*******************
Zephyr console Zephyr setup
--------------- ============
Open a serial terminal (minicom, putty, etc.) and connect the board with the Open a serial terminal (minicom, putty, etc.) and connect to the board using default serial port settings.
following settings:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
Reset the board.
Linux console Linux console
--------------- =============
Open a Linux shell (minicom, ssh, etc.) and insert a module into the Linux Kernel Open a Linux shell (minicom, ssh, etc.) and insert the ``rpmsg_client_sample`` module into the Linux Kernel.
Right after, logs should be displayed to notify channel creation/destruction and incoming message.
.. code-block:: console .. code-block:: console
root@linuxshell: insmod rpmsg_client_sample.ko root@linuxshell: insmod rpmsg_client_sample.ko
[ 44.625407] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: new channel: 0x401 -> 0x400!
[ 44.631401] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: incoming msg 1 (src: 0x400)
[ 44.640614] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: incoming msg 2 (src: 0x400)
...
[ 45.152269] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: incoming msg 99 (src: 0x400)
[ 45.157678] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: incoming msg 100 (src: 0x400)
[ 45.158822] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: goodbye!
[ 45.159741] virtio_rpmsg_bus virtio0: destroying channel rpmsg-client-sample addr 0x400
[ 45.160856] rpmsg_client_sample virtio0.rpmsg-client-sample.-1.1024: rpmsg sample client driver is removed
Result on Zephyr console on boot
--------------------------------
The following message will appear on the corresponding Zephyr console: Zephyr console
==============
For each message received, its content is displayed as shown down below then sent back to Linux.
.. code-block:: console .. code-block:: console
***** Booting Zephyr OS v#.##.#-####-g########## ***** *** Booting Zephyr OS build zephyr-v#.#.#-####-g########## ***
Starting application thread! Starting application threads!
OpenAMP demo started OpenAMP[remote] Linux responder demo started
Remote core received message 1: hello world!
Remote core received message 2: hello world! OpenAMP[remote] Linux sample client responder started
Remote core received message 3: hello world!
OpenAMP[remote] Linux TTY responder started
[Linux sample client] incoming msg 1: hello world!
[Linux sample client] incoming msg 2: hello world!
... ...
Remote core received message 100: hello world! [Linux sample client] incoming msg 99: hello world!
OpenAMP demo ended. [Linux sample client] incoming msg 100: hello world!
OpenAMP Linux sample client responder ended
rpmsg TTY demo on Linux console Running the rpmsg TTY demo
------------------------------- **************************
On the Linux console send a message to Zephyr which answers with the "TTY <add>" prefix. Linux setup
===========
Enable ``RPMSG_TTY`` in the kernel configuration.
Zephyr setup
============
Open a serial terminal (minicom, putty, etc.) and connect to the board using default serial port settings.
Linux console
=============
Open a Linux shell (minicom, ssh, etc.) and print the messages coming through the rpmsg-tty endpoint created during the sample initialization.
On the Linux console, send a message to Zephyr which answers with the :samp:`TTY {<addr>}:` prefix.
<addr> corresponds to the Zephyr rpmsg-tty endpoint address: <addr> corresponds to the Zephyr rpmsg-tty endpoint address:
.. code-block:: console .. code-block:: console
@ -88,3 +108,20 @@ On the Linux console send a message to Zephyr which answers with the "TTY <add>"
$> cat /dev/ttyRPMSG0 & $> cat /dev/ttyRPMSG0 &
$> echo "Hello Zephyr" >/dev/ttyRPMSG0 $> echo "Hello Zephyr" >/dev/ttyRPMSG0
TTY 0x0401: Hello Zephyr TTY 0x0401: Hello Zephyr
Zephyr console
==============
On the Zephyr console, the received message is displayed as shown below, then sent back to Linux.
.. code-block:: console
*** Booting Zephyr OS build zephyr-v#.#.#-####-g########## ***
Starting application threads!
OpenAMP[remote] Linux responder demo started
OpenAMP[remote] Linux sample client responder started
OpenAMP[remote] Linux TTY responder started
[Linux TTY] incoming msg: Hello Zephyr