OpenAMP support for m33 core on i.mx93

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OpenAMP support for m33 core on i.mx93

575 Views
tahrens
Contributor I

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?

 

0 Kudos
Reply
2 Replies

247 Views
Iulia_Prodan
NXP Employee
NXP Employee

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

  1. Linux BSP: use NXP's official BSP  https://github.com/nxp-imx/linux-imx/tree/lf-6.12.y
  2. Device tree: use the `-rpmsg` variant, e.g. imx93-11x11-evk-rpmsg.dts
  3. 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:

  • Run `prepare_mcore` in U-Boot.
  • Use the `-rpmsg` device tree blob.
  • Follow the steps in the Application Note AN5317.

Additional Resources

0 Kudos
Reply

510 Views
June_Lu
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply