Skip to content

Commit

Permalink
examples: Modify README formatting
Browse files Browse the repository at this point in the history
Current README.md contains many titles with # prefix of each line.
It generates lots of indexes when these README files are linked in
openamp-docs repo.
Remove redundant # prefix. Only keep it for demo title, compilation steps
and demo run steps. This way, openamp-docs generates minimal index in table
of content.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
  • Loading branch information
tnmysh committed Dec 12, 2022
1 parent 8ffce20 commit 9b1b869
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 72 deletions.
52 changes: 28 additions & 24 deletions examples/linux/rpmsg-echo-test/README.md
Original file line number Diff line number Diff line change
@@ -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
```
62 changes: 35 additions & 27 deletions examples/linux/rpmsg-mat-mul/README.md
Original file line number Diff line number Diff line change
@@ -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 <number> option is passed, then above demo runs <number> 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 <number> option is passed, then above demo runs <number> 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
```
48 changes: 27 additions & 21 deletions examples/linux/rpmsg-proxy-app/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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:
Expand All @@ -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
```

0 comments on commit 9b1b869

Please sign in to comment.