1.. zephyr:code-sample:: openamp
2   :name: OpenAMP
3   :relevant-api: ipm_interface
4
5   Send messages between two cores using OpenAMP.
6
7Overview
8********
9
10This application demonstrates how to use OpenAMP with Zephyr. It is designed to
11demonstrate how to integrate OpenAMP with Zephyr both from a build perspective
12and code. Note that the remote and primary core images can be flashed
13independently, but sysbuild must be used in order to build the images.
14
15Building the application for lpcxpresso54114_m4
16***********************************************
17
18.. zephyr-app-commands::
19   :zephyr-app: samples/subsys/ipc/openamp
20   :board: lpcxpresso54114/lpc54114/m4
21   :goals: debug
22   :west-args: --sysbuild
23
24Building the application for lpcxpresso55s69/lpc55s69/cpu0
25**********************************************************
26
27.. zephyr-app-commands::
28   :zephyr-app: samples/subsys/ipc/openamp
29   :board: lpcxpresso55s69/lpc55s69/cpu0
30   :goals: debug
31   :west-args: --sysbuild
32
33Building the application for mps2/an521/cpu0
34********************************************
35
36.. zephyr-app-commands::
37   :zephyr-app: samples/subsys/ipc/openamp
38   :board: mps2/an521/cpu0
39   :goals: debug
40   :west-args: --sysbuild
41
42Building the application for v2m_musca_b1/musca_b1
43**************************************************
44
45.. zephyr-app-commands::
46   :zephyr-app: samples/subsys/ipc/openamp
47   :board: v2m_musca_b1/musca_b1
48   :goals: debug
49   :west-args: --sysbuild
50
51Building the application for mimxrt1170_evk_cm7
52***********************************************
53
54.. zephyr-app-commands::
55   :zephyr-app: samples/subsys/ipc/openamp
56   :board: mimxrt1170_evk_cm7
57   :goals: debug
58   :west-args: --sysbuild
59
60Open a serial terminal (minicom, putty, etc.) and connect the board with the
61following settings:
62
63- Speed: 115200
64- Data: 8 bits
65- Parity: None
66- Stop bits: 1
67
68Reset the board and the following message will appear on the corresponding
69serial port, one is master another is remote:
70
71.. code-block:: console
72
73   **** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
74   Starting application thread!
75
76   OpenAMP[master] demo started
77   Master core received a message: 1
78   Master core received a message: 3
79   Master core received a message: 5
80   ...
81   Master core received a message: 99
82   OpenAMP demo ended.
83
84
85.. code-block:: console
86
87   **** Booting Zephyr OS build zephyr-v1.14.0-2064-g888fc98fddaa ****
88   Starting application thread!
89
90   OpenAMP[remote] demo started
91   Remote core received a message: 0
92   Remote core received a message: 2
93   Remote core received a message: 4
94   ...
95   Remote core received a message: 98
96   OpenAMP demo ended.
97