imx_rpmsg_tty not working on IMX8M EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx_rpmsg_tty not working on IMX8M EVK

Jump to solution
5,415 Views
brian2
Contributor II

Hello, I'm trying to get the "imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin" example working on my i.MX8M EVK. 

I am using Yocto, installed via 

$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml
$ repo sync
$ MACHINE=imx8mqevk DISTRO=fsl-imx-wayland source imx-setup-release.sh -b imx
$ bitbake imx-image-full

I was told 5.4.3-1.0.0 was the last validated version for the i.MX8M EVK in another question.  

This installs a few example .bin files on the u-boot partition. I'm able to load them fine using

u-boot=> fatload mmc 1:1 0x48000000 imx8mq_m4_TCM_hello_world.bin
6860 bytes read in 13 ms (514.6 KiB/s)
u-boot=> cp.b 0x48000000 0x7e0000 20000
u-boot=> dcache flush
u-boot=> bootaux 0x7e0000
## Starting auxiliary core at 0x007E0000 ...

This works, and shows output on the M4's UART.

But the rpmsg examples do not seem to work. Loading "imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin" does show this in the M4's UART:

RPMSG String Echo FreeRTOS RTOS API Demo...

But nothing else. When I boot into Linux on the target, I try to 

modprobe imx_rpmsg_tty
ls /dev/tty*

But no ttyRPMSG nodes appear, and no console messages appear about the RPMSG bus. 

Any ideas of what is wrong?

0 Kudos
Reply
1 Solution
5,369 Views
brian2
Contributor II

Ah, thank you! Nowhere did I read or find that I had to change the dtb in editenv. This line:

u-boot=> editenv fdt_file
edit: imx8mm-evk-rpmsg.dtb
u-boot=> boot

 Doing that works fine! Thank you very much!

View solution in original post

0 Kudos
Reply
2 Replies
5,370 Views
brian2
Contributor II

Ah, thank you! Nowhere did I read or find that I had to change the dtb in editenv. This line:

u-boot=> editenv fdt_file
edit: imx8mm-evk-rpmsg.dtb
u-boot=> boot

 Doing that works fine! Thank you very much!

0 Kudos
Reply
5,371 Views
art
NXP Employee
NXP Employee

I have tried it on my i.MX8MMini EVK board with 5.4.24 kernel and 2.8.0 MCUXpresso SDK. Everything worked as expected.

Here are all the steps I followed:

-- Build complete .sdcard image:

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.24-2.1.0.xml

repo sync -q -j8

EULA=1 MACHINE=imx8mmevk DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build

bitbake fsl-image-validation-imx

This will build an image (fsl-image-validation-imx-imx8mmevk.sdcard) with 5.4.24-2.1.0+gbabac008e5cf BSP.

 

-- Build SDK demo:

export PATH=$PATH:/opt/gcc-arm-none-eabi-7-2017-q4-major/bin
export ARMGCC_DIR=/opt/gcc-arm-none-eabi-7-2017-q4-major
cd boards/evkmimx8mm/multicore_examples/rpmsg_lite_str_echo_rtos/armgcc
./build_all.sh

I took release/rpmsg_lite_str_echo_rtos_imxcm4.bin for my test scenario.

 

-- Booting steps:

- Stop in u-boot (load demo and change default dtb)

u-boot=> fatload mmc 1:1 0x48000000 rpmsg_lite_str_echo_rtos_imxcm4.bin
16748 bytes read in 17 ms (961.9 KiB/s)
u-boot=> cp.b 0x48000000 0x7e0000 0x20000
u-boot=> bootaux 0x7e0000
## Starting auxiliary core stack = 0x20020000, pc = 0x1FFE0355...

u-boot=> editenv fdt_file
edit: imx8mm-evk-rpmsg.dtb
u-boot=> boot

- Load module and test:

root@imx8mmevk:~# insmod /lib/modules/5.4.24-2.1.0+gbabac008e5cf/kernel/drivers/rpmsg/imx_rpmsg_tty.ko
[ 97.340005] imx_rpmsg_tty virtio0.rpmsg-virtual-tty-channel-1.-1.30: new channel: 0x400 -> 0x1e!
[ 97.350208] Install rpmsg tty driver!
root@imx8mmevk:~# echo "test" > /dev/ttyRPMSG30

- Results on M4 side:

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 : "test" [len : 4]
Get New Line From Master Side

Best Regards,
Artur

0 Kudos
Reply