diff --git a/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md b/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md index c384e6e3..91954863 100644 --- a/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md +++ b/examples/legacy_apps/machine/xlnx/microblaze_generic/README.md @@ -35,16 +35,16 @@ with RPMSG_NO_IPI flag. include (cross-generic-gcc) ``` - * Compile the libmetal library: +* Compile the libmetal library: - ``` - $ mkdir -p build-libmetal - $ cd build-libmetal - $ BSP="/path/to/your_MicroBlaze_design_BSP/dir" - $ cmake -DCMAKE_TOOLCHAIN_FILE= \ - -DCMAKE_LIBRARY_PATH=$BSP/lib - $ make VERBOSE=1 DESTDIR= install - ``` +```shell +mkdir -p build-libmetal +cd build-libmetal +BSP="/path/to/your_MicroBlaze_design_BSP/dir" +cmake -DCMAKE_TOOLCHAIN_FILE= \ + -DCMAKE_LIBRARY_PATH=$BSP/lib +make VERBOSE=1 DESTDIR= install +``` * build the OpenAMP library on your host as follows: * Create your own cmake toolchain file to compile openamp for your generic @@ -76,16 +76,16 @@ with RPMSG_NO_IPI flag. * Compile the OpenAMP library: - ``` - $ mkdir -p build-openamp - $ cd build-openamp - $ BSP="/path/to/your_MicroBlaze_design_BSP/dir" - - $ cmake -DCMAKE_TOOLCHAIN_FILE= \ - -DCMAKE_INCLUDE_PATH="$LIBMETAL/include;$BSP/include" \ - -DCMAKE_LIBRARY_PATH="$LIBMETAL/lib/;BSP/lib" -DWITH_APPS=on - $ make VERBOSE=1 DESTDIR=$(pwd) install - ``` +```shell +mkdir -p build-openamp +cd build-openamp +BSP="/path/to/your_MicroBlaze_design_BSP/dir" + +cmake -DCMAKE_TOOLCHAIN_FILE= \ + -DCMAKE_INCLUDE_PATH="$LIBMETAL/include;$BSP/include" \ + -DCMAKE_LIBRARY_PATH="$LIBMETAL/lib/;BSP/lib" -DWITH_APPS=on +make VERBOSE=1 DESTDIR=$(pwd) install +``` The OpenAMP library will be built in `build/usr/local/lib` directory, headers will be built in `build/usr/local/include` directory, and the diff --git a/examples/linux/rpmsg-echo-test/README.md b/examples/linux/rpmsg-echo-test/README.md index 7afcb3c5..79673e9d 100644 --- a/examples/linux/rpmsg-echo-test/README.md +++ b/examples/linux/rpmsg-echo-test/README.md @@ -25,7 +25,7 @@ Assume all the binaries are board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware diff --git a/examples/linux/rpmsg-mat-mul/README.md b/examples/linux/rpmsg-mat-mul/README.md index f81c8d25..a20ab01d 100644 --- a/examples/linux/rpmsg-mat-mul/README.md +++ b/examples/linux/rpmsg-mat-mul/README.md @@ -29,7 +29,7 @@ Assume all the binaries are board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_matrix_multiply > /sys/class/remoteproc/remoteproc0/firmware diff --git a/examples/linux/rpmsg-proxy-app/README.md b/examples/linux/rpmsg-proxy-app/README.md index cd143cc9..fc83850f 100644 --- a/examples/linux/rpmsg-proxy-app/README.md +++ b/examples/linux/rpmsg-proxy-app/README.md @@ -58,7 +58,7 @@ Assume all the binaries are zcu102 board specific. - ``` + ```shell # Specify remote processor firmware to be loaded. echo image_rpc_demo > /sys/class/remoteproc/remoteproc0/firmware diff --git a/examples/linux/rpmsg-utils/README b/examples/linux/rpmsg-utils/README.md similarity index 98% rename from examples/linux/rpmsg-utils/README rename to examples/linux/rpmsg-utils/README.md index a394d841..3a5f0f6f 100644 --- a/examples/linux/rpmsg-utils/README +++ b/examples/linux/rpmsg-utils/README.md @@ -7,6 +7,7 @@ automatically create endpoint devices as remoteproc devices are booted. An example of udev-rule that automatically exposes the APPS_RIVA_CTRL channel to user space as the pronto core comes up: +``` ACTION=="add", SUBSYSTEM=="rpmsg", \ KERNEL=="rpmsg_ctrl[0-9]*", \ ATTRS{rpmsg_name}=="pronto", \ @@ -22,9 +23,10 @@ SUBSYSTEM=="rpmsg", KERNEL=="rpmsg[0-9]*", \ ATTR{name}=="?*", \ ATTRS{rpmsg_name}=="?*", \ SYMLINK+="rpmsg/$attr{rpmsg_name}/$attr{name}" +``` eptdestroy -==== +========== "rpmsg_destroy_ept" implements RPMSG_DESTROY_EPT_IOCTL to destroy an endpoint created by the RPMSG_CREATE_EPT_IOCTL. ping diff --git a/examples/zephyr/dual_qemu_ivshmem/README.rst b/examples/zephyr/dual_qemu_ivshmem/README.rst index 3e82d9e3..4f5385cc 100644 --- a/examples/zephyr/dual_qemu_ivshmem/README.rst +++ b/examples/zephyr/dual_qemu_ivshmem/README.rst @@ -48,18 +48,21 @@ Preparing IVSHMEM server before doing anything: .. code-block:: console # n = number of vectors - $ sudo ivshmem-server -n 2 - $ *** Example code, do not use in production *** + sudo ivshmem-server -n 2 + + .. code-block:: console + + *** Example code, do not use in production *** #. Appropriately set ownership of ``/dev/shm/ivshmem`` and ``/tmp/ivshmem_socket`` for your deployment scenario. For instance: .. code-block:: console - $ sudo chgrp $USER /dev/shm/ivshmem - $ sudo chmod 060 /dev/shm/ivshmem - $ sudo chgrp $USER /tmp/ivshmem_socket - $ sudo chmod 060 /tmp/ivshmem_socket + sudo chgrp $USER /dev/shm/ivshmem + sudo chmod 060 /dev/shm/ivshmem + sudo chgrp $USER /tmp/ivshmem_socket + sudo chmod 060 /tmp/ivshmem_socket Building and Running ******************** @@ -68,15 +71,15 @@ open a terminal and then type: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host - $ west build -pauto -bqemu_cortex_a53 + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host + west build -pauto -bqemu_cortex_a53 For the remote side, open another terminal window and then type: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote - $ west build -pauto -bqemu_cortex_a53 + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote + west build -pauto -bqemu_cortex_a53 * Note: Warnings that appear are from ivshmem-shell subsystem and can be ignored. @@ -89,15 +92,15 @@ For example to run host instance: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host - $ west build -t run + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/host + west build -t run For the remote instance, just go to the remote side directory in another terminal: .. code-block:: console - $ cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote - $ west build -t run + cd path/to/this-repo/examples/zephyr/dual_qemu_ivshmem/remote + west build -t run Expected output: **************** @@ -107,7 +110,7 @@ go to the host instance terminal, you should see something like this: .. code-block:: console - uart:~$ *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** + *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** Hello qemu_cortex_a53 - Host Side, the communication over RPMsg is ready to use! If nothing appears, make sure you are running the remote instance after this one, because @@ -125,9 +128,16 @@ on console you may see something like this: Then go back to the host side terminal window, and issue the custom shell command ``rpmsg_ivshmem send`` and you should see how to use that: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send send: wrong parameter count send - Usage: rpmsg_ivshmem send @@ -136,9 +146,16 @@ this command will send the data over RPMsg-IVSHMEM backend and the remote side will reply back echoing the sent string, on the host terminal this should take an output similar like the shown below: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 Remote side echoed the string back: [ RPMsg over IVSHMEM ] at message number 1 @@ -182,13 +199,14 @@ an output similar like the shown below: On the remote side terminal window is possible also to check the messages arriving from host: +**Output** + .. code-block:: console *** Booting Zephyr OS build v3.4.0-rc2-91-gbf0f58d69816 *** Hello qemu_cortex_a53 - Remote Side, the communication over RPMsg is ready to use! - - uart:~$ Host side sent a string: + Host side sent a string: [ RPMsg over IVSHMEM ] Now echoing it back! @@ -233,11 +251,17 @@ This sample supports huge message number in order to do stress testing, somethin this command is blocking and have a 5 second timeout, returning if something goes wrong, for example shutdown the remote side unexpectedly: +**Command** + + .. code-block:: console + + rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 + +**Output** + .. code-block:: console - uart:~$ rpmsg_ivshmem send "RPMsg over IVSHMEM" 10 Remote side response timed out! - uart:~$ Known limitation: *****************