Problem loading rpmsg tty colibri imx8x

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?


HI @dsp4us

Thanks for writing to the Toradex Community!

Regarding your issue, did you load a binary file to the M4 core? If yes, could you share this binary file?

Best regards,

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


  • That after booting Linux gives this


  • Loading Linux imx_rpmsg_tty module creates driver entry


But Cortex M4 code crashes to hard fault trying to access uart at these lines:


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.


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*
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


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:

  • M40.UART0.TX - A21
  • M40.UART0.RX - B1


Hi Michael

Perfect that it works. Thanks for your valuable Input.

Best regards,

Is it possible from your side to provide the source code of this example?

Hi @pkg_su !

Please, check the MCUXpresso SDK from NXP.

We currently have this FreeRTOS on the Cortex-M4 of a Colibri iMX8X | Toradex Developer Center article about it.

Also, it is worth mentioning that we are currently working to enhance the Cortex-M-related articles.

Best regards,