Changes

Jump to: navigation, search
Created page with "<section begin="History" /> {| style="border-collapse:collapse; " ! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History |- ! style="bo..."
<section begin="History" />
{| style="border-collapse:collapse; "
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
|-
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Issue Date
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Notes
|-
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |August 2023
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MP1-L-1.0.0 release
|-
|}
<section end="History" />
__FORCETOC__
<section begin="Body" />

==Introduction==
As known, the STM32MP115x SoC is powered by a heterogeneous architecture comprising a single/dual ARM Cortex-A7 (CA7) and an ARM Cortex-M4 (CM4). When the application requires implementing an Asymmetric Multiprocessing configuration (AMP), the most common scenario is to use Linux on the CA7, and bare metal or RTOS-based firmware on the CM4. In either case, the [[https://www.openampproject.org/ OpenAMP framework]] is typically used to establish a communication channel between the cores. DESK-MP1-L provides some examples based on this framework to demonstrate how to set up AMP configurations. The following section illustrates one of them, namely OpenAMP_TTY_echo.

For more details please see the [https://www.st.com/en/embedded-software/stm32cubemp1.html STM32CubeMP1 firmware] and the [https://github.com/STMicroelectronics/STM32CubeMP1/tree/1.6.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo source code].
==Running the OpenAMP_TTY_echo example==
The example is automatically built by Yocto. To run it, please issue the following commands on the target's console:
<pre class="board-terminal">
root@desk-mp1:~# cp /usr/local/Cube-M4-examples/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/lib/firmware/OpenAMP_TTY_echo.elf /lib/firmware/
root@desk-mp1:~# echo -n OpenAMP_TTY_echo.elf > /sys/class/remoteproc/remoteproc0/firmware
root@desk-mp1:~# echo start >/sys/class/remoteproc/remoteproc0/state
root@desk-mp1:~# dmesg | tail -n 8
[ 69.935241] remoteproc remoteproc0: powering up m4
[ 69.940260] remoteproc remoteproc0: Booting fw image OpenAMP_TTY_echo.elf, size 219192
[ 69.947843] remoteproc0#vdev0buffer: assigned reserved memory node vdev0buffer@10042000
[ 69.957458] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400
[ 69.964031] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 69.968816] remoteproc0#vdev0buffer: registered virtio0 (type 7)
[ 69.976364] remoteproc remoteproc0: remote processor m4 is now up
[ 69.981515] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x401
root@desk-mp1:~# stty -onlcr -echo -F /dev/ttyRPMSG0
root@desk-mp1:~# cat /dev/ttyRPMSG0 &
root@desk-mp1:~# echo "Hello Virtual UART0" > /dev/ttyRPMSG0
Hello Virtual UART0
root@desk-mp1:~# cat /sys/class/remoteproc/remoteproc0/state
running
</pre>

To stop the demo:
<pre class="board-terminal">
root@desk-mp1:~# echo stop > /sys/class/remoteproc/remoteproc0/state
[ 104.989459] remoteproc remoteproc0: warning: remote FW shutdown without ack
[1]+ Done cat /dev/ttyRPMSG0
root@desk-mp1:~# cat /sys/class/remoteproc/remoteproc0/state
offline
root@desk-mp1:~#
</pre>
4,650
edits

Navigation menu