Where is the RPMsg document for IMX8MM?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Where is the RPMsg document for IMX8MM?

ソリューションへジャンプ
10,445件の閲覧回数
Takashi_Kashiwagi
Senior Contributor I

Hi community,

I am trying to run a demo of RPMsg with 8MMINILPD4-EVK.

linux is 4.14-sumo and RTOS is FreeRTOS with rpmsg_lite.

The following thread is helpful, but it does not work well.

iMX8QXP: Use RPMSG to wake up M4 and A35

Are there any documents that might be helpful?

And where is the source code of "imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin"?

As far as I checked, it was looping endlessly with rpmsg_ns_announce-> rpmsg_lite_format_message-> vq_tx_remote-> RL_ASSERT.

The value of buffer_len seems to be strange as follows.

[virtqueue_create_static (151)] vq->vq_nentries = 2, vq->vq_ring_size = 4126, vq->vq_ring_mem = 0x90010000
[vring_init (151)] vr->desc = 0x90010000, vr->avail = 0x90010020, vr->used = 0x90011000
[virtqueue_create_static (151)] vq->vq_nentries = 2, vq->vq_ring_size = 4126, vq->vq_ring_mem = 0x90018000
[vring_init (151)] vr->desc = 0x90018000, vr->avail = 0x90018020, vr->used = 0x90019000
[RPMsgTask (100)] rpmsg_lite_remote_init OK (0 msec)
[RPMsgTask (102)] Wating rpmsg_lite_is_link_up (0 msec)
Link is up!
[RPMsgTask (111)] rpmsg_queue_create OK (1990 msec)
[RPMsgTask (118)] rpmsg_lite_create_ept OK (1990 msec)
[virtqueue_get_available_buffer (355)] head_idx = 0, *avail_idx = 18407, *len = 3878398162
buffer = 3D9A5489, buff_len = 3878398162, idx = 18407
[virtqueue_add_consumed_buffer (373)] head_idx = 18407, vq->vq_nentries = 2,

Best Regards,

T.kashiwagi

ラベル(3)
タグ(1)
1 解決策
8,410件の閲覧回数
Takashi_Kashiwagi
Senior Contributor I

Hi all,

I solved this, and I will post the settings.

About document , please refer to below.

About RTOS sample code , please refer to below.

  • boards\evkmimx8mm\multicore_examples\rpmsg_lite_str_echo_rtos (Please Create SDK_2.5.0_EVK-MIMX8MM via SDK dashboard. )

How to run RPMsg sample is as follows.

  • precondition
    • In menu configuration enable the following module:
      • Device Drivers > IMX RPMSG pingpong driver -- loadable modules only
      • Device Drivers > IMX RPMSG tty driver -- loadable modules only
    • Load Kernel module "imx_rpmsg_tty.ko"
      • $ insmod imx_rpmsg_tty.ko
    • CM4 binary is "imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"

Please note that CM4 and kernel modules do not work if they are mismatched.

The procedure is as follows.

 

1. Please boot linux and  "imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin". dmesg will be as follows.

root@imx8mmevk:~# dmesg | grep rpmsg
[ 0.861067] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.861114] virtio_rpmsg_bus virtio0: creating channel rpmsg-virtual-tty-channel-1 addr 0x1e
[ 0.873812] imx rpmsg driver is registered.
root@imx8mmevk:~#

2. Please load "imx_rpmsg_tty.ko" ($ insmod imx_rpmsg_tty.ko).  RPMsg tty driver is installed (/dev/ttyRPMSG30 appers).

root@imx8mmevk:~# dmesg | grep rpmsg
[ 0.861067] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.861114] virtio_rpmsg_bus virtio0: creating channel rpmsg-virtual-tty-channel-1 addr 0x1e
[ 0.873812] imx rpmsg driver is registered.
[ 651.497802] imx_rpmsg_tty virtio0.rpmsg-virtual-tty-channel-1.-1.30: new channel: 0x400 -> 0x1e!
[ 651.506808] Install rpmsg tty driver!
[ 651.512199] rpmsg_tty_cb68 65 6c 6c 6f 20 77 6f 72 6c 64 21 hello world!
root@imx8mmevk:~#

The following message is displayed on the CM4 console at this point.

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]

3. you can echo string as follows.

タイトルなし.png

Best Regards,

T.Kashiwagi

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
8,411件の閲覧回数
Takashi_Kashiwagi
Senior Contributor I

Hi all,

I solved this, and I will post the settings.

About document , please refer to below.

About RTOS sample code , please refer to below.

  • boards\evkmimx8mm\multicore_examples\rpmsg_lite_str_echo_rtos (Please Create SDK_2.5.0_EVK-MIMX8MM via SDK dashboard. )

How to run RPMsg sample is as follows.

  • precondition
    • In menu configuration enable the following module:
      • Device Drivers > IMX RPMSG pingpong driver -- loadable modules only
      • Device Drivers > IMX RPMSG tty driver -- loadable modules only
    • Load Kernel module "imx_rpmsg_tty.ko"
      • $ insmod imx_rpmsg_tty.ko
    • CM4 binary is "imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"

Please note that CM4 and kernel modules do not work if they are mismatched.

The procedure is as follows.

 

1. Please boot linux and  "imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin". dmesg will be as follows.

root@imx8mmevk:~# dmesg | grep rpmsg
[ 0.861067] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.861114] virtio_rpmsg_bus virtio0: creating channel rpmsg-virtual-tty-channel-1 addr 0x1e
[ 0.873812] imx rpmsg driver is registered.
root@imx8mmevk:~#

2. Please load "imx_rpmsg_tty.ko" ($ insmod imx_rpmsg_tty.ko).  RPMsg tty driver is installed (/dev/ttyRPMSG30 appers).

root@imx8mmevk:~# dmesg | grep rpmsg
[ 0.861067] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.861114] virtio_rpmsg_bus virtio0: creating channel rpmsg-virtual-tty-channel-1 addr 0x1e
[ 0.873812] imx rpmsg driver is registered.
[ 651.497802] imx_rpmsg_tty virtio0.rpmsg-virtual-tty-channel-1.-1.30: new channel: 0x400 -> 0x1e!
[ 651.506808] Install rpmsg tty driver!
[ 651.512199] rpmsg_tty_cb68 65 6c 6c 6f 20 77 6f 72 6c 64 21 hello world!
root@imx8mmevk:~#

The following message is displayed on the CM4 console at this point.

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]

3. you can echo string as follows.

タイトルなし.png

Best Regards,

T.Kashiwagi

0 件の賞賛
返信
8,410件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

For i.MX8M Mini RPMsg-related documentation, you could refer to the RPMsg information included on the “i.MX Linux Reference Manual” document, included on the “L4.9.123_2.3.0_8MM_GA_LINUX_DOC” package.


Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------

8,410件の閲覧回数
Takashi_Kashiwagi
Senior Contributor I

Hi Carlos

Thank you for responding.

My current situation is as follows.
・ In RTOS, I was able to load and execute the sample source (rpmsg_lite_pingpong_rtos_linux_remote). However, it will not be executed from "Send Name Service Announcement".
・ In Linux, I can not execute unit_test. There is no "/ dev / ttyRPMsg".

I have read “i.MX Linux Reference Manual” document. I checked kernel config and exectuted "insmod" as follows. 

In menu configuration enable the following module:
• Device Drivers > IMX RPMSG pingpong driver -- loadable modules only
• Device Drivers > IMX RPMSG tty driver -- loadable modules only

root@imx8mmevk:/lib/modules/4.14.78-imx_4.14.78_1.0.0_ga+g94da7bdc489b/kernel/drivers/rpmsg# insmod im
x_rpmsg_tty.ko
insmod: ERROR: could not insert module imx_rpmsg_tty.ko: File exists
root@imx8mmevk:/lib/modules/4.14.78-imx_4.14.78_1.0.0_ga+g94da7bdc489b/kernel/drivers/rpmsg#

"imx_rpmsg_tty.ko" appears to be loaded but there is no "/ dev / ttyRPMsg".

Do you know what caused it?

Best Regards,

T.Kashiwagi

0 件の賞賛
返信
8,410件の閲覧回数
Takashi_Kashiwagi
Senior Contributor I

Hi all

 I changed "RPMSG_LITE_SHMEM_BASE" as follows.

#define RPMSG_LITE_SHMEM_BASE 0xb8000000

and "rpmsg_ns_announce" was executed.

[RPMsgTask (88)] Start (0 msec)
[virtqueue_create_static (151)] vq->vq_nentries = 2, vq->vq_ring_size = 4126, vq->vq_ring_mem = 0xB8000000
[vring_init (151)] vr->desc = 0xB8000000, vr->avail = 0xB8000020, vr->used = 0xB8001000
[virtqueue_create_static (151)] vq->vq_nentries = 2, vq->vq_ring_size = 4126, vq->vq_ring_mem = 0xB8008000
[vring_init (151)] vr->desc = 0xB8008000, vr->avail = 0xB8008020, vr->used = 0xB8009000
[RPMsgTask (101)] rpmsg_lite_remote_init OK (0 msec)
[RPMsgTask (103)] Wating rpmsg_lite_is_link_up (0 msec)
Link is up!
[RPMsgTask (112)] rpmsg_queue_create OK (1980 msec)
[RPMsgTask (119)] rpmsg_lite_create_ept OK (1980 msec)
[virtqueue_get_available_buffer (355)] head_idx = 0, *avail_idx = 0, *len = 512
buffer = 78040000, buff_len = 512, idx = 0
Nameservice announce sent.

Next, I tried to execute "/unit_tests/Remote_Processor_Messaging/mxc_mcc_tty_test.out" according to i.MX_Reference_Manual.

I enabled the following module:
• Device Drivers > IMX RPMSG pingpong driver -- loadable modules only
• Device Drivers > IMX RPMSG tty driver -- loadable modules only

but "/dev/ttyRPMSG30" could not be found. Which tty can I use instead?

Best Regards,

T.Kashiwagi

0 件の賞賛
返信