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.

Demo: proxy_app

This app demonstrates two functionality

  1. Use of host processor’s file system by remote processor

  2. remote processor’s standard IO redirection to host processor’s standard IO

case 1: This app allows remote processor to use file system of host processor. Host processor file system acts as proxy of remote file system. Remote processor can use open, read, write, close calls to interact with files on host processor.

File “remote.file” is available after app exits on host side that is created by remote processor that contains string “This is a test string being written to file..” written by remote firmware. This demonstrates remote firmware can create and write files on host side.

case 2: This application also demonstrates redirection of standard IO. Remote processor can use host processor’s stdin and stdout via proxy service that is implemented on host side. This is achieved with open-amp proxy service implemented here: rpmsg_retarget.c Remote side firmware uses two types of output functions to print message on console 1) xil_printf i.e. using same UART console as of APU and 2) Standard “printf” function that is re-directed to standard output of Host. Both function uses different ways to output messages, but using same console.

This is interactive demo:

  1. When the remote application prompts you to Enter name, enter any string without space.

  2. When the remote application prompts you to Enter age , enter any integer.

  3. When the remote application prompts you to Enter value for pi, enter any floating point number. After this, remote application will print all the inputs entered by user on console of host processor.

Remote firmware’s standard IO are redirected to host processor’s standard IO. So, when remote uses “printf” and “scanf” functions actually host processor’s console is used for printing output and scanning inputs. Host communicates with remote via rpmsg_char driver and Remote communicates to Host via redirected Standard IO.

Platform: Xilinx Zynq UltraScale+ MPSoC(a.k.a ZynqMP)

Board: ZynqMP Zcu102

Remote Processor firmware (image_rpc_demo)

Run the demo

Assume all the binaries are zcu102 board specific.

# Specify remote processor firmware to be loaded.
echo image_rpc_demo > /sys/class/remoteproc/remoteproc0/firmware

# Load and start target Firmware onto remote processor.
echo start > /sys/class/remoteproc/remoteproc0/state

# load rpmsg_char driver
modprobe rpmsg_char

# load rpmsg_ctrl driver
modprobe rpmsg_ctrl

# Run proxy application.
proxy_app

# unload rpmsg_ctrl driver
modprobe -r rpmsg_ctrl

#unload rpmsg_char driver
modprobe -r rpmsg_char

# Stop target firmware
echo stop > /sys/class/remoteproc/remoteproc0/state