samples/subsys/ipc/ipc_service/multi_endpoint/README.html · samples/subsys/ipc/ipc_service/multi_endpoint/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · IPC Service

IPC Service multi-endpoint

두 IPC instance와 세 endpoint의 홀짝 message 흐름을 분리해 확인합니다.

Official pathsamples/subsys/ipc/ipc_service/multi_endpoint/README.html
Source filesamples/subsys/ipc/ipc_service/multi_endpoint/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Host·remote exact log와 application/remote overlay 전환 command를 보존합니다.

Default

icmsg_me

Alternative

icbmsg

Endpoints

0A · 0B · 1

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 92BF719B9C0D5EF8BA198F8E7E879C89100A1CA2E520B5D4689BD9A1C479F494
.. _ipc_multi_endpoint_sample:

IPC Service - Multi-endpoint Sample Application
###############################################

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

Part 3

한국어 전문 번역

nrf5340dk/nrf5340/cpuapp용 application 빌드

여러 endpoint와 IPC instance를 동시에 사용하는 IPC Service application입니다. 기본 backend는 icmsg_me이며, devicetree overlay를 바꾸면 icbmsg도 사용할 수 있습니다. 다음 command로 nRF5340 DK application core용 image를 build하고 debug합니다.

# From the root of the zephyr repository
west build -b nrf5340dk/nrf5340/cpuapp samples/subsys/ipc/ipc_service/multi_endpoint
west debug

Serial terminal은 speed 115200, data 8 bits, parity None, stop bits 1로 연결합니다. Reset 뒤 host는 instance 0의 endpoint A와 endpoint B, 그리고 instance 1을 시작하며 홀수 message를 받습니다. Endpoint마다 99까지 진행한 뒤 각각 종료합니다.

*** 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.

Remote는 같은 세 endpoint를 시작하고 0부터 98까지 짝수 message를 받습니다. Log의 [0A]·[0B]는 instance 0의 두 endpoint, [1]은 instance 1을 구분합니다.

*** 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.

Backend 변경

Backend를 icbmsg로 바꾸려면 application core와 remote network core에 각각 대응하는 devicetree overlay를 지정합니다. remote_DTC_OVERLAY_FILE은 sysbuild의 remote image에 적용됩니다.

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

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.