To enable inter-core communication between Linux (running on the A-core) and Zephyr (running on the M33 core), the recommended starting point is the openamp_rsc_table sample from Zephyr.
This sample leverages:
- OpenAMP on Zephyr
- remoteproc and rpmsg on Linux
Prerequisites
Linux setup
- Linux BSP: use NXP's official BSP https://github.com/nxp-imx/linux-imx/tree/lf-6.12.y
- Device tree: use the `-rpmsg` variant, e.g. imx93-11x11-evk-rpmsg.dts
- U-Boot: run `prepare_mcore` before booting Linux
Zephyr setup (M33 core)
To run the openamp_rsc_table sample successfully, shared memory between the host and remote cores must be defined using the `zephyr,ipc_shm` property in a DTS overlay.
Next, add the MU node in nxp_imx93_m33.dtsi:
```
mu1: mu1@44220000 {
compatible = "nxp,imx-mu";
reg = <0x44220000 DT_SIZE_K(64)>;
interrupts = <21 0>;
};
```
Then, linker script update - add the resource table section in `linker.ld`:
```
#if defined(CONFIG_OPENAMP_RSC_TABLE)
SECTIONS {
SECTION_PROLOGUE(.resource_table,, SUBALIGN(8)) {
KEEP(*(.resource_table*))
} GROUP_LINK_IN(ROMABLE_REGION)
}
#endif
```
Configuration adjustments for i.MX93
The RX and TX IDs on i.MX93 differ from other boards. You must override the default values in the `.conf` overlay file:
```
CONFIG_IPM_IMX_MAX_DATA_SIZE_16=n
CONFIG_IPM_IMX_MAX_DATA_SIZE_4=y
CONFIG_OPENAMP_WITH_DCACHE=y
CONFIG_LOG=y
CONFIG_OPENAMP_RSC_TABLE_IPM_RX_ID=1
CONFIG_OPENAMP_RSC_TABLE_IPM_TX_ID=0
```
Sample PRs
Linux patch requirement
For proper operation on i.MX93, apply the following Linux patch: https://lore.kernel.org/imx/CAEnQRZDoYvK-YXLjqbXsRAWDkHrWNOoR1OCCWxs+AfNUDuPB_w@mail.gmail.com/T/
Final steps before execution
Before launching the application:
Additional Resources