zephyr/samples/subsys/ipc/ipc_service/multi_endpoint
Benjamin Cabé 0d25e30de6 samples: subsys: use zephyr:code-sample directive
Adds missing code-sample directive to the remaining samples in
`samples/subsys` that didn't use it yet in preparation for upcoming
changes to the Zephyr documentation that will be leveraging the provided
description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:13:17 -04:00
..
boards samples: remove redundant CONFIG_MBOX_NRFX_IPC=y 2024-08-16 11:20:08 +01:00
remote samples: remove redundant CONFIG_MBOX_NRFX_IPC=y 2024-08-16 11:20:08 +01:00
src
CMakeLists.txt samples: ipc: ipc_service: Fix usage of board name checking 2024-03-22 10:06:04 +01:00
Kconfig.sysbuild hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
prj.conf
README.rst samples: subsys: use zephyr:code-sample directive 2024-09-05 17:13:17 -04:00
sample.yaml samples: subsys: ipc: ipc_service: check console output 2024-06-14 19:14:38 +02:00
sysbuild.cmake

.. zephyr:code-sample:: ipc_multi_endpoint
   :name: IPC service: Multi-endpoint
   :relevant-api: ipc

   Use the IPC Service with multiple endpoints.

This application demonstrates how to use IPC Service with multiple endpoints.
By default, it uses the ``icmsg_me`` backend.
You can also configure it to use the ``icbmsg`` backend.

Building the application for nrf5340dk/nrf5340/cpuapp
*****************************************************

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/ipc/ipc_service/multi_endpoint
   :board: nrf5340dk/nrf5340/cpuapp
   :goals: debug

Open a serial terminal (for example Minicom or PuTTY) and connect the board with the following settings:

* Speed: 115200
* Data: 8 bits
* Parity: None
* Stop bits: 1

After resetting the board, the following message will appear on the corresponding
serial port:

.. code-block:: console

   *** Booting Zephyr OS build v3.4.0-rc1-108-gccfbac8b0721 ***
   IPC-service HOST [INST 0 - ENDP A] demo started
   IPC-service HOST [INST 0 - ENDP B] demo started
   IPC-service HOST [INST 1] demo started
   HOST [0A]: 1
   HOST [0A]: 3
   HOST [0B]: 1
   HOST [1]: 1
   ...
   HOST [0A]: 99
   IPC-service HOST [INST 0 - ENDP A] demo ended.
   HOST [0B]: 99
   IPC-service HOST [INST 0 - ENDP B] demo ended.
   HOST [1]: 99
   IPC-service HOST [INST 1] demo ended.

.. code-block:: console

   *** Booting Zephyr OS build v3.4.0-rc1-108-gccfbac8b0721 ***
   IPC-service REMOTE [INST 0 - ENDP A] demo started
   IPC-service REMOTE [INST 0 - ENDP B] demo started
   IPC-service REMOTE [INST 1] demo started
   REMOTE [0A]: 0
   REMOTE [0A]: 2
   ...
   REMOTE [0A]: 98
   IPC-service REMOTE [INST 0 - ENDP A] demo ended.
   REMOTE [0B]: 98
   IPC-service REMOTE [INST 0 - ENDP B] demo ended.
   REMOTE [1]: 98
   IPC-service REMOTE [INST 1] demo ended.


Changing the backend
********************

To change the backend to ``icbmsg``, switch the devicetree
overlay files as follows:

.. code-block:: console

   west build -b nrf5340dk/nrf5340/cpuapp --sysbuild -- \
   -DDTC_OVERLAY_FILE=boards/nrf5340dk_nrf5340_cpuapp_icbmsg.overlay \
   -Dremote_DTC_OVERLAY_FILE=boards/nrf5340dk_nrf5340_cpunet_icbmsg.overlay