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

Zephyr 3.7.0 · Samples · IPC · icmsg

IPC service: icmsg backend

Host·remote endpoint의 전송, network core 재시작, 재bind 과정을 실제 log로 추적합니다.

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

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

Part 1

요약·해설

Sysbuild command, serial 설정, host·remote exact output과 byte 흐름을 보존합니다.

Board

nrf5340dk/nrf5340/cpuapp

Backend

icmsg

Flow

Bind · Send · Reset · Rebind

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 33F3D26EBBEBB49A68B590D3ECFE7641CC12BCA18FE6A53A8B5B5560B5C02022
.. zephyr:code-sample:: ipc-icmsg
   :name: IPC service: icmsg backend
   :relevant-api: ipc

   Send messages between two cores using the IPC service and icmsg backend.

Overview
********

This application demonstrates how to use IPC Service and the icmsg backend with
Zephyr. It is designed to demonstrate how to integrate it with Zephyr both
from a build perspective and code.

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

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/ipc/ipc_service/icmsg
   :board: nrf5340dk/nrf5340/cpuapp
   :goals: debug
   :west-args: --sysbuild

Open a serial terminal (minicom, putty, etc.) and connect the board with the
following settings:

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

Reset the board and the following message will appear on the corresponding
serial port, one is host another is remote:

.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
   [00:00:00.415,985] <inf> host: IPC-service HOST demo started
   [00:00:00.417,816] <inf> host: Ep bounded
   [00:00:00.417,877] <inf> host: Perform sends for 1000 [ms]
   [00:00:01.417,114] <inf> host: Sent 488385 [Bytes] over 1000 [ms]
   [00:00:01.417,175] <inf> host: Wait 500ms. Let net core finish its sends
   [00:00:01.917,266] <inf> host: Stop network core
   [00:00:01.917,297] <inf> host: Reset IPC service
   [00:00:01.917,327] <inf> host: Run network core
   [00:00:01.924,865] <inf> host: Ep bounded
   [00:00:01.924,896] <inf> host: Perform sends for 1000 [ms]
   [00:00:02.924,194] <inf> host: Sent 489340 [Bytes] over 1000 [ms]
   [00:00:02.924,224] <inf> host: IPC-service HOST demo ended


.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
   [00:00:00.006,256] <inf> remote: IPC-service REMOTE demo started
   [00:00:00.006,378] <inf> remote: Ep bounded
   [00:00:00.006,439] <inf> remote: Perform sends for 1000 [ms]
   [00:00:00.833,160] <inf> sync_rtc: Updated timestamp to synchronized RTC by 1)
   [00:00:01.417,572] <inf> remote: Sent 235527 [Bytes] over 1000 [ms]
   [00:00:01.417,602] <inf> remote: IPC-service REMOTE demo ended
   *** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
   [00:00:00.006,256] <inf> remote: IPC-service REMOTE demo started
   [00:00:00.006,347] <inf> remote: Ep bounded
   [00:00:00.006,378] <inf> remote: Perform sends for 1000 [ms]
   [00:00:01.006,164] <inf> remote: Sent 236797 [Bytes] over 1000 [ms]
   [00:00:01.006,195] <inf> remote: IPC-service REMOTE demo ended

Part 3

한국어 전문 번역

개요

Zephyr에서 IPC Service와 icmsg backend를 사용해 두 core 사이에 message를 보내는 application입니다. Build 구성과 source code 양쪽에서 IPC service를 Zephyr에 통합하는 방법을 보여 줍니다.

nrf5340dk/nrf5340/cpuapp용 application 빌드

nRF5340 DK application core target을 --sysbuild와 함께 build합니다. Sysbuild가 host와 remote image 구성을 함께 조정합니다.

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

Minicom이나 PuTTY 같은 serial terminal을 열고 board에 연결합니다. 설정은 speed 115200, data 8 bits, parity None, stop bits 1입니다.

Board를 reset하면 서로 대응하는 serial port에 host와 remote log가 각각 나타납니다. Host는 endpoint가 bind된 뒤 1,000 ms 동안 488385 byte를 보내고, network core가 전송을 마치도록 500 ms 기다립니다. 이어 network core를 정지하고 IPC service를 reset한 뒤 core를 다시 실행해 endpoint를 재bind하고 489340 byte를 보냅니다.

*** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
[00:00:00.415,985] <inf> host: IPC-service HOST demo started
[00:00:00.417,816] <inf> host: Ep bounded
[00:00:00.417,877] <inf> host: Perform sends for 1000 [ms]
[00:00:01.417,114] <inf> host: Sent 488385 [Bytes] over 1000 [ms]
[00:00:01.417,175] <inf> host: Wait 500ms. Let net core finish its sends
[00:00:01.917,266] <inf> host: Stop network core
[00:00:01.917,297] <inf> host: Reset IPC service
[00:00:01.917,327] <inf> host: Run network core
[00:00:01.924,865] <inf> host: Ep bounded
[00:00:01.924,896] <inf> host: Perform sends for 1000 [ms]
[00:00:02.924,194] <inf> host: Sent 489340 [Bytes] over 1000 [ms]
[00:00:02.924,224] <inf> host: IPC-service HOST demo ended

Remote 쪽도 endpoint bind 뒤 1,000 ms 동안 235527 byte를 보냅니다. Host가 network core를 stop·run하므로 remote image가 다시 boot하고, 두 번째 실행에서는 236797 byte를 보낸 뒤 종료합니다. Timestamp와 byte 수는 공식 example run의 값이므로 실제 실행에서는 달라질 수 있습니다.

*** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
[00:00:00.006,256] <inf> remote: IPC-service REMOTE demo started
[00:00:00.006,378] <inf> remote: Ep bounded
[00:00:00.006,439] <inf> remote: Perform sends for 1000 [ms]
[00:00:00.833,160] <inf> sync_rtc: Updated timestamp to synchronized RTC by 1)
[00:00:01.417,572] <inf> remote: Sent 235527 [Bytes] over 1000 [ms]
[00:00:01.417,602] <inf> remote: IPC-service REMOTE demo ended
*** Booting Zephyr OS build zephyr-v3.2.0-323-g468d4ae383c1  ***
[00:00:00.006,256] <inf> remote: IPC-service REMOTE demo started
[00:00:00.006,347] <inf> remote: Ep bounded
[00:00:00.006,378] <inf> remote: Perform sends for 1000 [ms]
[00:00:01.006,164] <inf> remote: Sent 236797 [Bytes] over 1000 [ms]
[00:00:01.006,195] <inf> remote: IPC-service REMOTE demo ended

Source

출처

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