Part 1
요약·해설
6개 build/debug block과 5개 master·remote output을 exact text로 보존합니다.
RPMsg Service over OpenAMP
nRF · MPS2 · Musca · STM32
Master odd · Remote even
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
62B69C0E506505B2E4CB3BD5CEB4AA1C39FCCC866C8BE8576BD6032465BB8BC5
.. zephyr:code-sample:: rpmsg-service
:name: RPMsg service
:relevant-api: rpmsg_service_api
Send messages between cores using RPMsg service.
Overview
********
RPMsg Service is an abstraction created over OpenAMP that makes initialization
and endpoints creation process easier.
This application demonstrates how to use RPMsg Service in Zephyr. It is designed
to demonstrate how to integrate RPMsg Service with Zephyr both from a build
perspective and code. Note that the remote and primary image core images can be
flashed independently, but sysbuild must be used in order to flash them in one
step.
Building the application for nrf5340dk/nrf5340/cpuapp
*****************************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: nrf5340dk/nrf5340/cpuapp
:goals: debug
Building the application for mps2/an521/cpu0
********************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: mps2/an521/cpu0
:goals: debug
Building the application for v2m_musca_b1/musca_b1
**************************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: v2m_musca_b1/musca_b1
:goals: debug
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 master another is remote:
.. code-block:: console
**** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
.. code-block:: console
**** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
Starting application thread!
RPMsg Service [remote] demo started
Remote core received a message: 0
Remote core received a message: 2
Remote core received a message: 4
...
Remote core received a message: 98
RPMsg Service demo ended.
Building the application for bl5340_dvk/nrf5340/cpuapp
******************************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: bl5340_dvk/nrf5340/cpuapp
:goals: debug
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: bl5340_dvk/nrf5340/cpunet
:goals: debug
Open a serial terminal (for example Minicom or PuTTY) and connect to the board
with the following settings on both serial ports:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
When you reset the development kit after having flashed both the application
and network core images, the following messages (one for master and one for
remote) will appear on the corresponding serial ports:
.. code-block:: console
*** Booting Zephyr OS build v2.7.0-rc1-103-ge19875c88916 ***
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
.. code-block:: console
*** Booting Zephyr OS build v2.7.0-rc1-103-ge19875c88916 ***
Starting application thread!
RPMsg Service [remote] demo started
Remote core received a message: 0
Remote core received a message: 2
Remote core received a message: 4
...
Remote core received a message: 98
RPMsg Service demo ended.
Building the application for stm32h747i_disco/stm32h7xx
*******************************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/rpmsg_service
:board: stm32h747i_disco/stm32h7xx/m7
:goals: debug
The serial output should now look like this:
.. code-block:: console
*** Booting Zephyr OS build 15736b7415be ***
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
Part 3
한국어 전문 번역
개요
RPMsg Service는 OpenAMP 위에 만든 abstraction으로 초기화와 endpoint 생성 과정을 단순화합니다. 이 application은 build와 code 양쪽에서 RPMsg Service를 Zephyr에 통합하는 방법을 보여 줍니다.
Remote core image와 primary core image는 독립적으로 flash할 수 있습니다. 두 image를 한 단계에서 함께 flash하려면 sysbuild를 사용해야 합니다.
nrf5340dk/nrf5340/cpuapp용 빌드
# From the root of the zephyr repository
west build -b nrf5340dk/nrf5340/cpuapp samples/subsys/ipc/rpmsg_service
west debug
mps2/an521/cpu0용 빌드
# From the root of the zephyr repository
west build -b mps2/an521/cpu0 samples/subsys/ipc/rpmsg_service
west debug
v2m_musca_b1/musca_b1용 빌드
# From the root of the zephyr repository
west build -b v2m_musca_b1/musca_b1 samples/subsys/ipc/rpmsg_service
west debug
Serial terminal은 speed 115200, data 8 bits, parity None, stop bits 1로 설정합니다. Reset 뒤 master는 1부터 99까지 홀수 message를, remote는 0부터 98까지 짝수 message를 받습니다.
**** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
**** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
Starting application thread!
RPMsg Service [remote] demo started
Remote core received a message: 0
Remote core received a message: 2
Remote core received a message: 4
...
Remote core received a message: 98
RPMsg Service demo ended.
bl5340_dvk/nrf5340/cpuapp용 빌드
BL5340 DK에서는 application core와 network core image를 각각 build하고 debug합니다.
# From the root of the zephyr repository
west build -b bl5340_dvk/nrf5340/cpuapp samples/subsys/ipc/rpmsg_service
west debug
# From the root of the zephyr repository
west build -b bl5340_dvk/nrf5340/cpunet samples/subsys/ipc/rpmsg_service
west debug
두 serial port 모두 115200 baud, 8 data bits, parity None, 1 stop bit로 연결합니다. 두 core image를 모두 flash한 뒤 development kit를 reset하면 master와 remote log가 대응 port에 나타납니다.
*** Booting Zephyr OS build v2.7.0-rc1-103-ge19875c88916 ***
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
*** Booting Zephyr OS build v2.7.0-rc1-103-ge19875c88916 ***
Starting application thread!
RPMsg Service [remote] demo started
Remote core received a message: 0
Remote core received a message: 2
Remote core received a message: 4
...
Remote core received a message: 98
RPMsg Service demo ended.
stm32h747i_disco/stm32h7xx용 빌드
STM32H747I Discovery의 M7 core target은 다음과 같이 build하고 debug합니다.
# From the root of the zephyr repository
west build -b stm32h747i_disco/stm32h7xx/m7 samples/subsys/ipc/rpmsg_service
west debug
Serial output에서는 master가 1부터 99까지의 홀수 message를 받은 뒤 demo를 종료합니다.
*** Booting Zephyr OS build 15736b7415be ***
Starting application thread!
RPMsg Service [master] demo started
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 99
RPMsg Service demo ended.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.