This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Overview

This readme is about the OpenAMP linux_rpc_demo.

The linux_rpc_demo is about remote procedure calls between linux host and a linux remote using rpmsg to perform 1. File operations such as open, read, write and close 2. I/O operation such as printf, scanf

Compilation

Add cmake option -DWITH_PROXY_APPS=ON to build the system reference demonstration applications.

System Reference Legacy Apps Build Overview

This page details how to setup and build the OpenAMP System Reference legacy apps and test examples found in the examples/legacy_apps directory. These applications were moved from the OpenAMP repository.

Initialization

The first step is to initialize the workspace folder (my-workspace) where the examples and all Zephyr modules will be cloned. You can do that by running:

# initialize my-workspace for the example-application (main branch)
west init -m https://github.com/OpenAMP/openamp-system-reference --mf examples/legacy_apps/west.yml --mr main my-workspace
# update modules
cd my-workspace
west update

Build

The following steps are to build legacy apps on a host machine.

export PROJECT_ROOT=$PWD

Build libmetal

cd $PROJECT_ROOT/libmetal
cmake . -Bbuild -DCMAKE_INSTALL_PREFIX=$PROJECT_ROOT/target
make -C build VERBOSE=1 install

Build open_amp

cd $PROJECT_ROOT/open-amp
cmake . -Bbuild -DCMAKE_INCLUDE_PATH=$PROJECT_ROOT/libmetal/build/lib/include/   -DCMAKE_LIBRARY_PATH=$PROJECT_ROOT/libmetal/build/lib/ -DCMAKE_INSTALL_PREFIX=$PROJECT_ROOT/target
make -C build VERBOSE=1 install

Build legacy Apps

cd $PROJECT_ROOT/openamp-system-reference/examples/legacy_apps
cmake -Bbuild \
-DCMAKE_INCLUDE_PATH="$PROJECT_ROOT/libmetal/build/lib/include/;$PROJECT_ROOT/open-amp/build/lib/include/" \
-DCMAKE_LIBRARY_PATH="$PROJECT_ROOT/libmetal/build/lib/;$PROJECT_ROOT/open-amp/build/lib/" \
-DCMAKE_INSTALL_PREFIX=$PROJECT_ROOT/target
make -C build VERBOSE=1 install

If you are perusing the github repository refer to the legacy_apps README.md for compilation information.

Run demonstration on a Linux PC

  • Start rpc demo server on one console

sudo LD_LIBRARY_PATH=<openamp_built>/usr/local/lib:<libmetal_built>/usr/local/lib \
build-openamp/usr/local/bin/linux_rpc_demod-shared
  • Run rpc demo client on another console to perform file and I/O operations on the server

sudo LD_LIBRARY_PATH=<openamp_built>/usr/local/lib:<libmetal_built>/usr/local/lib \
build-openamp/usr/local/bin/linux_rpc_demo-shared 1

Enter the inputs on the host side the same gets printed on the remote side. You will see communication between the host and remote process using rpmsg calls.

Note

sudo is required to run the OpenAMP demos between Linux processes, as it doesn’t work on some systems if you are normal users.