I am having an issue with rpmsg on imx8x colibri. Invoking insmod command seems loads the module but it doesn’t do anything. There are no dmesg messages or new tty driver installed
This is using Toradex built image from April of 2020.
Could someone point me to the way to fix it?
Hello Jaski,
it seems there is (are) resource conflict (s) between my Cortex M4 firmware based on NXP’s SDK_2.7.0_MIMX8QX6xxxFZ rpmsg_lite_str_echo_rtos and Toradex Linux release 3.0b4.254. One is for sure - instead of Cortex M4 UART I forced to use UART_B for debug console. I don’t know how to use flash fixup in imx8qxp to remove UART_B from device tree. The only solution would be rebuild it. (?)
The behavior is as follow:
Cortex M4 firmware is loaded from u-boot
[upload|SRGktdk9hpdQ9kMOx4JbODfXXRQ=]
That after booting Linux gives this
[upload|xuR2xgUxE26SUFcYmzo1DSUZ5AA=]
Loading Linux imx_rpmsg_tty module creates driver entry
[upload|XTfJ5WHBGI7fCf1wcfjn8r/Q/5E=]
But Cortex M4 code crashes to hard fault trying to access uart at these lines:
[upload|uOc4Q4AgttlNxbIwf+QgYHDpVig=]
The elf and bin files are attached .
The changes to SDK code: reassign debug console to the UART_B and starting/initialization of STRM has been commented out as it not used for this demo.
It become apparent, the issue was in choosing UART_B for debug console and resource conflicts. Moving back to the NXP original SC_R_M4_0_UART (M40.UART0.TX and M40.UART0.RX) makes rpmsg demo to work.
u-boot:
Colibri iMX8X # fatload mmc 1 ${loadaddr} m4.bin && dcache flush && bootaux ${loadaddr}
45644 bytes read in 21 ms (2.1 MiB/s)
## Starting auxiliary core at 0x80280000 ...
Power on aux core 0
Copy image from 0x80280000 to 0x34fe0000
Start M4
bootaux complete
Linux console:
root@colibri-imx8x:~# modprobe imx_rpmsg_tty
[ 36.046358] imx_rpmsg_tty virtio1.rpmsg-openamp-demo-channel.-1.30: new channel: 0x400 -> 0x1e!
[ 36.055376] Install rpmsg tty driver!
root@colibri-imx8x:~# ls /dev/ttyR*
/dev/ttyRPMSG30
root@colibri-imx8x:~# stty -F /dev/ttyRPMSG30 -echo
root@colibri-imx8x:~# exec 3<> /dev/ttyRPMSG30
root@colibri-imx8x:~# echo test >&3
root@colibri-imx8x:~# cat <&3
test
^C
freeRTOS (Cortex M4) debug console
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
If anyone wants to repeat the test, the binary is attached. Cortex M4 UART pins are on X3 connector: