zephyr/samples/drivers/ipm/ipm_mcux
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
..
boards samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00
remote samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
CMakeLists.txt samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00
Kconfig samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00
Kconfig.sysbuild samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00
prj.conf samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00
README.rst
sample.yaml yamllint: fix all yamllint truthy errors 2023-01-04 01:16:45 +09:00
sysbuild.cmake samples: drivers: ipm: update to use sysbuild 2022-11-15 14:46:02 +01:00

.. _ipm-mcux-sample:

Sample mailbox application
##########################

Overview
********

Some NXP microcontrollers from LPC family are dual-core, this
sample application uses a mailbox to send messages from one
processor core to the other.

This sample applies to the following boards:
 -  :ref:`lpcxpresso54114`, two core processors (Cortex-M4F and Cortex-M0+)
 -  :ref:`lpcxpresso55s69`, two core processors (dual Cortex-M33)

Requirements
************

- :ref:`lpcxpresso54114` board
- :ref:`lpcxpresso55s69` board

Building the application for lpcxpresso54114_m4
***********************************************

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/ipm/ipm_mcux
   :board: lpcxpresso54114_m4
   :goals: debug


Building the application for lpcxpresso55s69_cpu0
*************************************************

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/ipm/ipm_mcux
   :board: lpcxpresso55s69_cpu0
   :goals: debug

Running
*******
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:

.. code-block:: console

   ***** Booting Zephyr OS v1.11.0-764-g4e3007a *****
   Hello World from MASTER! arm
   Received: 1
   ...
   Received: 99