AMP  Version 1.0.0
Asymmetric Multiprocessing
 All Files Pages
OpenAMP

According to the Multicore Association, OpenAMP is an "open-source software framework (that) allows developers to configure and deploy multiple operating systems and applications across homogeneous or heterogeneous processors. This comprehensive framework enables developers to manage the challenges associated with inter-process communication (IPC), resource management and sharing, and process control. The framework also allows software developers to control the boot-up and shut down of individual cores on an SoC, thus allowing applications to maximize compute performance or minimize power consumption based on individual use case scenarios."

The pack file contains the following documents from the public OpenAMP documentation in the \open-amp\docs directory:

  • openamp_gs.pdf: OpenAMP Framework Getting Started Guide
  • openamp_ref.pdf: OpenAMP Framework User Reference
  • openamp_perf_meas_gd.pdf: OpenAMP Framework Performance Measurements Guide

Usage

This section describes what you need to do to enable communication via RPMSG/OpenAMP in both cores.

Linux

Using a TTY device

The board support pages available on keil.com/mdk5/ds-mdk/install explain how to add the required modules to your Linux kernel. If you want to use a TTY (serial) device to communicate with the Cortex-M processor, you need to have the IMX_RPMSG_TTY or IMX_RPMSG_PINGPONG kernel modules compiled and available.

Using the Cortex-A Ethernet interface

If you want to use the Cortex-A's Ethernet connection for Cortex-M communication, you need to install the RPMSG-neo module (a modification of the RPMSG module which allows to create an Ethernet interface in one of the endpoints of the RPMSG channel only available to the Cortex-A core) and the bridge-utils (which creates a bridge between the physical Ethernet interface and the RPMSG Ethernet interface generated by the RPMSG-neo module, enabling access for the Cortex-M core through the bridge).

RTOS/bare-metal

Create a Cortex-M project with DS-MDK as described in the Getting Started Guide.

Using a TTY device

You need to add the software component ::AMP:RPMSG in its OpenAMP variant:

comp_sel_openamp.png
Select ::AMP:RPMSG OpenAMP variant

Write your application using the OpenAMP API that is available in the OpenAMP GitHub repository.

Using the Cortex-A Ethernet interface

You need to add these software components:

  • ::AMP:RPMSG in its OpenAMP variant
  • ::CMSIS Driver:Ethernet (API):ETH_RPMSG
  • ::Network:CORE
  • ::Network:Interface:ETH
  • ::Network:Socket:TCP
  • ::Network:Socket:UDP
comp_sel_openamp_eth.png
Component selection for Ethernet communication via the Cortex-A core

Write your application using the OpenAMP API that is available in the OpenAMP GitHub repository. Section CMSIS-Drivers for Ethernet explains the details behind the ETH_RPMSG CMSIS-Driver.

CMSIS-Drivers for Ethernet

In order to provide a fully functional Ethernet interface to the Cortex-M core, you need to enable the CMSIS-Driver ETH_RPMSG in the Cortex-M project and you need to install the modules RPMSG-neo and bridge-utils in the Linux kernel.

The RPMSG-neo module creates an RPMSG channel between the Cortex-A and the Cortex-M core. Both RPMSG channel endpoints are created as an Ethernet interface. Therefore, the Cortex-A core sees an Ethernet interface which is connected to the Cortex-M core. However, this interface has no access to the outside world. In order to provide this access through the physical Ethernet connector, a bridge needs to be created (using the bridge-utils module). This bridge connects the physical Ethernet interface (normally eth0), which belongs to the Cortex-A core, with the RPMSG Ethernet interface attached to the Cortex-M core.

In this way, the bridge has access to the physical Ethernet connection and redirects the packets from/to the eth0 or the RPMSG Ethernet interfaces according to the source/destination IP address. Regarding the IP addresses, remember the following:

  1. The bridge needs to be configured with the IP address of the eth0 interface and at the same time the IP address of eth0 should be removed (set to 0.0.0.0).
  2. Once the bridge is set up, the RPMSG Ethernet interface on the Cortex-M side obtains its IP address via DHCP. Logically, this IP address is not visible when using ifconfig in the Cortex-A Linux terminal.

To enable the RPMSG Ethernet channel for the Cortex-M core, the software components ::AMP:RPMSG in its OpenAMP variant and ::Network:Interface:ETH need to be included in the project. To connect the RPMSG channel and the Network component, the ::CMSIS Driver:Ethernet (API):ETH_RPMSG is required. In accordance with the CMSIS design philosophy, the Network component uses the ETH_RPMSG CMSIS-Driver as a mean to access the Ethernet interface. In this case, the Ethernet interface is an RPMSG endpoint. However, this is transparent to the Network component since it calls the CMSIS-Driver that uses the RPMSG API to send and receive the Ethernet frames through the RPMSG channel.

Example projects

Example projects using the OpenAMP framework are already available in the device family pack of the following devices:

For proper operation, you need:

  • For TTY:
    • a Linux application running on the Cortex-A class processor called "Linux Application TTY"
    • a bare-metal or RTOS application running on the Cortex-M class processor called either "RPMSG PingPong" or "RPMSG TTY"
  • For Ethernet
    • the "UDP-TCP Socket over RPMSG" example project running on the Cortex-M class processor
openamp_examples.png

The applications are available for a wide range of supporting development boards. Please consult the documentation of the device family packs for more information on the examples.