Hi @Andy.McClernon !
Sorry for the delay. I was able to get the RPMsg demo working.
I’ve used the rpmsg_lite_str_echo_rtos
demo from the MCUXpresso SDK. I’ve uploaded the resulting m4_image.bin
here: https://share.toradex.com/g3z689caam593fz
I’ve loaded the M4 firmware from U-Boot via TFTP using:
Apalis iMX8 # tftp ${loadaddr} m4_image.bin
Alternatively, this can also be done via an SD card:
Apalis iMX8 # fatload mmc 2 ${loadaddr} m4_image.bin
.
Then run
Apalis iMX8 # dcache flush && bootaux ${loadaddr} 0
You should see the following output on U-Boot:
## Starting auxiliary core at 0x80280000 ...
Power on M4 and MU Copy
M4 image from 0x80280000 to TCML
0x34fe0000 Start M4 0 bootaux complete
And the following output on the M4 UART:
RPMSG String Echo FreeRTOS RTOS API Demo...
Then on U-Boot, run
Apalis iMX8 # boot
Once Linux boots, load the imx_rpmsg_tty
module:
# modprobe imx_rpmsg_tty
You should not get any immediate output on stdout, at least that’s what happened here.
The output of dmesg | grep rpmsg
should show something like:
apalis-imx8-06506336:~$ dmesg | grep rpmsg
[ 0.000000] OF: reserved mem: initialized node rpmsg_dma@0x90400000, compatible id shared-dma-pool
[ 0.272372] imx rpmsg driver is registered.
[ 0.405467] imx-rpmsg 90000000.rpmsg: assigned reserved memory node rpmsg_dma@0x90400000
[ 0.405875] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.406246] virtio_rpmsg_bus virtio1: rpmsg host is online
[ 0.406313] virtio_rpmsg_bus virtio1: creating channel rpmsg-virtual-tty-channel addr 0x1e
[ 0.407422] imx-rpmsg 90100000.rpmsg1: assigned reserved memory node rpmsg_dma@0x90400000
[ 0.407791] virtio_rpmsg_bus virtio2: rpmsg host is online
[ 0.428692] virtio_rpmsg_bus virtio3: rpmsg host is online
[ 60.168417] imx_rpmsg_tty virtio1.rpmsg-virtual-tty-channel.-1.30: new channel: 0x400 -> 0x1e!
[ 60.168623] Install rpmsg tty driver!
Notice that these last couple of lines came up when modprobing imx_rpmsg_tty
.
At that point, the M4 UART should look like:
RPMSG String Echo FreeRTOS RTOS API Demo...
Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]
Two TTY devices got enumerated here:
-rw-r--r-- 1 root root 18 Jun 18 14:07 /dev/ttyRPMSG
crw-rw---- 1 root dialout 235, 0 Jun 18 14:07 /dev/ttyRPMSG30
I was able to exchange messages with the M4 by using /dev/ttyRPMSG30:
# echo "Hello from Linux!" > /dev/ttyRPMSG30
Then the M4 UART should receive it like:
RPMSG String Echo FreeRTOS RTOS API Demo...
Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]
Get Message From Master Side : "Hello from Linux!" [len : 17]
Get New Line From Master Side
Can you please try and validate these steps?