Using Cortex-M4 SDK to communicate with Cortex-A7 Android BSP on i.MX 7ULP-EVK

Document created by Vanessa Maegima Employee on Sep 28, 2018
Version 1Show Document
  • View in full screen mode

This document shows how to run the multicore communication examples from MCUXpresso SDK while running the Android BSP on Cortex-A7 on i.MX 7ULP-EVK.

Though this document is focused on the multicore demos, similar procedures can be applied to run any other demo in the SDK.


1. Source code

This document is based on the following releases:


BoardAndroid BSPMCUXpresso SDK
imx7ulp-evkAndroid O8.1.0 for i.MX 7ULP GASDK2.4 for i.MX 7ULP GA

Download releases at i.MX Software.


2. Building the Cortex-M4 SDK

There are at least two multicore demos in the SDK package, rpmsg_lite_pingpong_rtos and rpmsg_lite_str_echo_rtos. They are located at:


Build the rpmsg_lite_str_echo_rtos demo according to the SDK Getting Started Guide. Remember to also follow the Chapter 6, Step 4 of the document to generate the ram bootable image (sdk20-app.img).


3. Building the Android BSP


3.1. RPMsg kernel module

Before building the BSP, add the following line to the file (<android_build_dir>/device/fsl/evk_7ulp/

   $(KERNEL_OUT)/drivers/net/wireless/qcacld-2.0/wlan.ko \
+ $(KERNEL_OUT)/drivers/rpmsg/imx_rpmsg_tty.ko


3.2. Cortex-M4 image

Copy the SDK image file (sdk20-app.img) to the following directory in the Android source code:

$ cp <SDK_2.4.0_EVK-MCIMX7ULP_dir>/tools/imgutil/evkmcimx7ulp/sdk20-app.img \


Change the file accordingly:

# Copy prebuilt M4 demo image:
- vendor/nxp/fsl-proprietary/mcu-sdk/7ulp/imx7ulp_m4_demo.img:imx7ulp_m4_demo.img
+ vendor/nxp/fsl-proprietary/mcu-sdk/7ulp/sdk20-app.img:imx7ulp_m4_demo.img


After these changes, build and flash Android as described in the BSP User's Guide.


4. Enabling the multicore communication

While booting, the SoC automatically loads the Cortex-M4 image.

After complete booting, install the imx_rpmsg_tty.ko module to create the multicore communication channel:

$ su
$ insmod vendor/lib/modules/imx_rpmsg_tty.ko


To send messages from Cortex-A7 to Cortex-M4, use the /dev/ttyRPMSG* channel:

$ echo "MESSAGE" > /dev/ttyRPMSG*

/dev/ttyRPMSG* refers to the RPMsg device created on the board, so change the number accordingly.


Cortex-M4 will echo all messages received from Cortex-A7.


This is a simple example on how to communicate different cores on i.MX using Android but it can be used as a starting point for Android multicore applications.

2 people found this helpful