diff --git a/examples/linux/rpmsg-echo-test/README.md b/examples/linux/rpmsg-echo-test/README.md index 5373af0..72378d0 100644 --- a/examples/linux/rpmsg-echo-test/README.md +++ b/examples/linux/rpmsg-echo-test/README.md @@ -1,36 +1,40 @@ -# app: echo_test +# Demo: echo_test -## Description: + This demo uses the Linux kernel rpmsg framework to send various size of data buffer to remote + processor and validates integrity of received buffer from remote processor. + If buffer data does not match, then number of different bytes are reported on + console - This demo uses kernel rpmsg framework to send various size of data buffer to remote - processor and validates integrity of received buffer from remote processor. - If buffer data does not match, then number of different bytes are reported on - console + * Platform: Xilinx ZynqMP ZCU102 board -## Remote processor firmware: Xilinx ZynqMP cortex-r5 platform + ## Remote Processor firmware (image_echo_test) + * Remote processor firmware: Xilinx ZynqMP cortex-r5 platform - https://github.com/OpenAMP/open-amp/blob/main/apps/examples/echo/rpmsg-echo.c + https://github.com/OpenAMP/open-amp/blob/main/apps/examples/echo/rpmsg-echo.c -## How to Build for Xilinx ZynqMP platform - * https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote - * RPU firmware elf file is expected in sdk at path: /lib/firmware/ - * This build step needs Xilinx Vendor specific toolchain xsdb + * Instructions to compile -## How to run on zcu102 board/QEMU: + https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote -Assume all the binaries are zcu102 board specific. + * RPU firmware elf file is expected in sdk at path: /lib/firmware/ + * This build step needs Xilinx Vendor specific toolchain xsdb - ##### Specify Echo Test Firmware to be loaded. - `echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware` + ## Run the demo + Assume all the binaries are board specific. - ##### Load and start target Firmware onto remote processor - `echo start > /sys/class/remoteproc/remoteproc0/state` + ``` + # Specify remote processor firmware to be loaded. + echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware - ##### check remote processor state - `cat /sys/class/remoteproc/remoteproc0/state` + # Load and start target firmware onto remote processor + echo start > /sys/class/remoteproc/remoteproc0/state - ##### Run echo_test application - `echo_test` + # check remote processor state + cat /sys/class/remoteproc/remoteproc0/state - ##### stop target firmware - `echo stop > /sys/class/remoteproc/remoteproc0/state` + # Run echo_test application on host processor + echo_test + + # Stop remote processor + echo stop > /sys/class/remoteproc/remoteproc0/state + ``` diff --git a/examples/linux/rpmsg-mat-mul/README.md b/examples/linux/rpmsg-mat-mul/README.md index 11a229f..c79f0b6 100644 --- a/examples/linux/rpmsg-mat-mul/README.md +++ b/examples/linux/rpmsg-mat-mul/README.md @@ -1,37 +1,45 @@ -# app: mat_mul_demo +# Demo: matrix multiply -## Description: + This example demonstrate interprocessor communication using rpmsg framework + in the Linux kernelspace. Host (this) application generates two random matrices and send + them to remote processor using rpmsg framework in the Linux kernelspace and waits for + the response. Remote processor firmware receives both matrices and + multiplies them and sends result back to host processor. + Host processor prints the result on console after receiveing it. + If -n option is passed, then above demo runs times. + User can also pass custom endpoint information with -s (source address) + and -e (destination address) options as well. - This example demonstrate interprocessor communication using rpmsg framework - in the Linux kernelspace. Host (this) application generates two random matrices and send - them to remote processor using rpmsg framework in the Linux kernelspace and waits for - the response. Remote processor firmware receives both matrices and - multiplies them and sends result back to host processor. - Host processor prints the result on console after receiveing it. - If -n option is passed, then above demo runs times. - User can also pass custom endpoint information with -s (source address) - and -e (destination address) options as well. + * Platform: Xilinx ZynqMP ZCU102 board -## Remote processor firmware: Xilinx ZynqMP cortex-r5 platform + ## Remote Processor firmware (image_matrix_multiply) + * Remote processor firmware: Xilinx ZynqMP cortex-r5 platform - https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiply.c + https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiply.c -## How to Build for Xilinx ZynqMP platform - * https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote - * RPU firmware elf file is expected in sdk at path: /lib/firmware/ - * This build step needs Xilinx Vendor specific toolchain xsdb + * Instructions to compile -## How to run on zcu102 board/QEMU: -Assume all the binaries are zcu102 board specific. + https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote - ##### Specify Matrix multiplication to get Firmare onto remote processor. - `echo image_matrix_multiply > /sys/class/remoteproc/remoteproc0/firmware` + * RPU firmware elf file is expected in sdk at path: /lib/firmware/ + * Note: This build step needs Xilinx Vendor specific toolchain xsdb - ##### Load and start target Firmware onto remote processor. - `echo start > /sys/class/remoteproc/remoteproc0/state` + ## Run the demo + Assume all the binaries are board specific. - ##### Run Matrix multiplication test linux application. - `mat_mul_demo` + ``` + # Specify remote processor firmware to be loaded. + echo image_matrix_multiply > /sys/class/remoteproc/remoteproc0/firmware - ##### Stop target firmware - `echo stop > /sys/class/remoteproc/remoteproc0/state` + # Load and start target Firmware onto remote processor + echo start > /sys/class/remoteproc/remoteproc0/state + + # check remote processor state + cat /sys/class/remoteproc/remoteproc0/state + + # Run Matrix multiplication application on host processor + mat_mul_demo + + # Stop remote processor + echo stop > /sys/class/remoteproc/remoteproc0/state + ``` diff --git a/examples/linux/rpmsg-proxy-app/README.md b/examples/linux/rpmsg-proxy-app/README.md index 57aa2bb..65bf762 100644 --- a/examples/linux/rpmsg-proxy-app/README.md +++ b/examples/linux/rpmsg-proxy-app/README.md @@ -1,12 +1,11 @@ -# app: proxy_app - -## Description: +# 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 - 1) This app allows remote processor to use file system of host processor. Host + + 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. @@ -16,7 +15,7 @@ file.." written by remote firmware. This demonstrates remote firmware can create and write files on host side. - 2) This application also demonstrates redirection of standard IO. + 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: @@ -40,26 +39,33 @@ remote via rpmsg_char driver and Remote communicates to Host via redirected Standard IO. -## Remote processor firmware: Xilinx ZynqMP cortex-r5 platform + * Platform: Xilinx ZynqMP ZCU102 board + + ## Remote Processor firmware (image_rpc_demo) + * Remote processor firmware: Xilinx ZynqMP cortex-r5 platform + + https://github.com/OpenAMP/open-amp/blob/main/apps/examples/rpc_demo/rpc_demo.c + + * Instructions to compile - https://github.com/OpenAMP/open-amp/blob/main/apps/examples/rpc_demo/rpc_demo.c + https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote -## How to Build for Xilinx ZynqMP platform - * https://github.com/OpenAMP/open-amp#example-to-compile-zynq-ultrascale-mpsoc-r5-genericbaremetal-remote - * RPU firmware elf file is expected in sdk at path: /lib/firmware/ - * This build step needs Xilinx Vendor specific toolchain xsdb + * RPU firmware elf file is expected in sdk at path: /lib/firmware/ + * This build step needs Xilinx Vendor specific toolchain xsdb -## How to run on zcu102 board/QEMU: -Assume all the binaries are zcu102 board specific. + ## Run the demo + Assume all the binaries are zcu102 board specific. -##### Specify proxy application to get Firmare onto remote processor. -`echo image_rpc_demo > /sys/class/remoteproc/remoteproc0/firmware` + ``` + # 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 and start target Firmware onto remote processor. + echo start > /sys/class/remoteproc/remoteproc0/state -##### Run proxy application. -`proxy_app` + # Run proxy application. + proxy_app -##### Stop target firmware -`echo stop > /sys/class/remoteproc/remoteproc0/state` + # Stop target firmware + echo stop > /sys/class/remoteproc/remoteproc0/state + ```