cancel
Showing results for 
Search instead for 
Did you mean: 

Using STM32MP157 with OpenAmp echo example ttyRPMSG0 is missing - sometimes - why ?

Snappy Steve
Associate

I am new to STM32 boards and IDE but have an STM32MP157A-DK1 board which came with an SD Card / OS on it. We want to make our own OS image using the ST linux.

In the downloads accompanying the workshop videos we have the DK2_TIMER1_OpenAmp_Solution to toggle an LED and present some ttyRPMSG devices to talk through.

I can take the code and build it on STM32CubeIDE Version: 1.10.1 and get no errors to give an ELF file. I can also get the demo ELF file in the workshop zip.

I can load both types of firmware into both the supplied SD Card OS and our development OS and in all cases I can flash the LED, start and stop the M4.

With the workshop ELF file it works to provide the /dev/ttyRPMSG0 & 1 devices only on our OS build. The ELF file I can build provides the devices only on the supplied ST OS from the SD Card. But no ttyRPMSG devices appear with the alternate mixes.

So what needs to be set compatible on the OS kernel / DTB's etc to make them appear.

I have tested my build code to change the LED flash pattern before and after the call to VIRT_UART_Init( &huart0 ) so I know its passing that line ok without it returning an error.

running dmesg on the board I have:

[ 8638.112604] virtio_rpmsg_bus virtio0: rpmsg host is online

[ 8638.118009] virtqueue callback for 8df7aed6 (e39af94e)

[ 8638.118062] virtio_rpmsg_bus virtio0: From: 0x0, To: 0x35, Len: 40, Flags: 20480, Reserved: 0

[ 8638.118095] rpmsg_virtio RX: 00 00 00 00 35 00 00 00 00 00 00 00 28 00 00 50 ....5.......(..P

[ 8638.118111] rpmsg_virtio RX: 72 70 6d 73 67 2d 74 74 79 2d 63 68 61 6e 6e 65 rpmsg-tty-channe

[ 8638.118126] rpmsg_virtio RX: 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 l...............

[ 8638.118138] rpmsg_virtio RX: 00 00 00 00 00 00 00 00                         ........

[ 8638.118158] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty-channel addr 0x0

[ 8638.125137] remoteproc0#vdev0buffer: registered virtio0 (type 7)

[ 8638.130021] Added buffer head 0 to 8df7aed6

[ 8638.130383] No more buffers in queue

[ 8638.130384] remoteproc remoteproc0: remote processor m4 is now up

[ 8638.130398] virtio_rpmsg_bus virtio0: Received 1 messages

but no /dev/ttyRP*

Any help appreciated.

1 REPLY 1
Erwan SZYMANSKI
ST Employee

Hello @Snappy Steve​,

Thank you for your contribution, as I do not know what has been given for the workshop, I will not be able to give you a simple correction on your specific case. We already saw another ST Community member who made the same feedback as you concerning the RPMSGX devices from Linux side, based on a workshop example.

Please try to do the following steps to be sure that your are perfectly aligned on official last release (OSTL 4.0).

  • First, follow this article to generate your SD card with OSTL-4.0 elements (TF-A, Kernel ...). You will so have a clean SD card based on last delivery for Linux side.
  • Secondly, follow this article to download the right Firmware Package (v_1.6) and follow the different steps. You will see that there is an example based on OpenAMP to use co-processor communication.

I hope that this information will help you, do not hesitate to come back to me if you face any troubles.

Kind regards,

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.