OpenAMP Echo Test Sample
Echo Test Intro
The echo test reference sample, as the name suggests, demonstrates OpenAMP Interprocessor Communications (IPC) components by providing an echo application on a remote which simply returns (echoes) packets as they are received at an RPMsg endpoint from the main controller. The main controller then verifies the returned packet for integrity.
Echo Test Components
There are two applications involved in this demonstration. The remote application runs as an echo service, which returns packets it receives on an RPMsg endpoint. The main controller application is the test application sending packets to the echo service and monitoring for their return.
The underlying OpenAMP architectural components used by these applications are
The following architecture diagram shows the components involved in the demonstration.
The top-level control flow is shown in the following message diagram.
RPMsg Echo Remote Application
The remote application, rpmsg-echo, is the core of the demonstration. It is a simple application serving a RPMsg endpoint running as the main task on the remote processor.
Echo Test Main Application
The echo_test application forms the main controller side of the demonstration. It repeatedly writes an increasing length payload of 0xA5’s up to the maximum data size (packet size minus header) to the RPMsg endpoint. Following each packet send, it reads from the same endpoint and verifies the returned packet for correctness. The application will stop and report on the first corruption found.
Echo Test Main Script
The main controller is also responsible for loading the firmware containing the RPMsg Echo Remote Application and starting the remote processor using Remoteproc.
For main controllers, like Linux, a script can be used to pipe the firmware to the exposed remoteproc system, followed by the execution of the user space echo_test application. For controllers without scripting capability, like baremetal and RTOS (Real Time Operating systems), this would be achieved in the code.
In the Demo Docker Images this is script demo1A.
Echo Test Source
RPMsg Echo Baremetal Source
The RPMsg Echo service application is available as a baremetal solution in the open-amp Repository
It is a CMake application and can be built for any remote as long as the relevant OS/HW abstraction layer components like libmetal are ported for that platform.
Echo Test Linux Source
The echo test Linux application is executed on the Linux main controller as a user space application. The application is available in the OpenAMP System Reference repository.
It is a Makefile application and can be built using the Yocto rpmsg-echo-test recipe
An example main control script is given in the echo test readme
Reference Board Implementations
This Echo Test Sample is demonstrated in the following reference implementations.