OpenAMP support for m33 core on i.mx93 Hey, I know this question has already been asked here Solved: Re: RPMsg support for m33 core on i.mx93 - NXP Community but I do not understand the accepted answer. In the NXP's Real-Time Edge software framework the RPSMG support is only listed for FreeRTOS. The i.mx95 A7 core, however, has already been added lately https://github.com/zephyrproject-rtos/zephyr/pull/86923 So my question is if NXP is planing to add also support for the m33. And if not what would be needed to add support manually? Re: OpenAMP support for m33 core on i.mx93 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
https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp_rsc_table/boards
https://github.com/zephyrproject-rtos/zephyr/pull/86923
https://github.com/zephyrproject-rtos/zephyr/pull/79220/commits
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:
Run `prepare_mcore` in U-Boot.
Use the `-rpmsg` device tree blob.
Follow the steps in the Application Note AN5317.
Additional Resources
i.MX Linux User Guide - https://www.nxp.com/docs/en/user-guide/UG10163.pdf
Application Note AN5317 - https://www.nxp.com/docs/en/application-note/AN5317.pdf
Details on the remoteproc, rpmsg, mailbox, and OpenAMP frameworks. It includes examples on how to create the DTS and configuration overlays. Please note that this is specifically an example for the HiFi4 core from the i.MX 8M Plus https://www.youtube.com/watch?v=JqwPljnm2_k&t=14s
DTS API, on `zephyr,ipc_shm` - https://github.com/zephyrproject-rtos/zephyr/blob/main/doc/build/dts/api/api.rst?plain=1#L421
Re: OpenAMP support for m33 core on i.mx93 All zephyr IPC support here( Linux kernel OS on the main processor and a Zephyr application on the co-processor) https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp_rsc_table/boards Confirm from the internal team, this is no plan of supporting MPU cm33 now. But I have send your requirement to the internal team, if there is any update will let you know. I am sorry for that.
View full article