RPMSG examples on v5.15.71-2.2.0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RPMSG examples on v5.15.71-2.2.0

1,537 次查看
Ferromagnetic
Contributor II

Hi everyone,

I want to run examples with rpmsg (rpmsg_lite_pingpong_rtos_linux_remote and rpmsg_lite_str_echo_rtos) on iMX8QXP-mek board. I use v5.15.71-2.2.0 version of Linux. I follow instruction from i.MX Linux Reference Manual chapter 2.8 Remote Processor Messaging and nothong happens. I set appropriate dtb in uboot imx8qxp-mek-rpmsg.dtb. Load m4 binary with J-Link or from SD card, I have first logs:

RPMSG Ping-Pong FreeRTOS RTOS API Demo...
RPMSG Share Base Addr is 0x90010000

and after boot into Linux nothing happen, should be next log:

Link is up!

Nameservice announce sent.

but it not working, program stay in while loop:

while (0 == rpmsg_lite_is_link_up(my_rpmsg)) {...}

I read on another site that from version 5.15 of kernel rpmsg was replaced by remoteproc. So how to run example with rpmsg working between Linux A35 and cortex M4 cores? 

I see in dts file imx8qxp-mek-rpmsg there is no information about rpmsg node. I think that is replaced by something new.

Also I wondering if is possible to communicate M4 with HIFI4 dsp core directly?

标记 (1)
0 项奖励
回复
5 回复数

1,511 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,

This may be caused by how are you loading and starting the Cortex-M4, for i.MX8QXP, SCU_ROM will handle the load of M4 binary code. SCU will create a seperate resource partition(generally partition 3) and based on that partition, there would be resource isolation(including memory region) between M core and A core.

To flash your own M4 image, please follow SDK doc "Getting Started with MCUXpresso SDK for MEK-MIMX8QX" - "Run a demo using imx-mkimage".You need to build a flash.bin file with M4 by imx-mkimage, using "make SOC=iMX8QX REV=C0 flash_cm4_ddr"

Best regards,
Aldo.

0 项奖励
回复

1,498 次查看
Ferromagnetic
Contributor II

Ok, but when I using older version 4.14-sumo, and load binary to M4 via J-Link it's working:

root@imx8qxpc0mek:~# dmesg | grep "rpmsg"
[ 0.000000] OF: reserved mem: initialized node rpmsg_dma@0x90400000, compatible id shared-dma-pool
[ 0.434253] imx rpmsg driver is registered.
[ 0.617057] imx-rpmsg 90000000.rpmsg: assigned reserved memory node rpmsg_dma@0x90400000
[ 0.625352] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 0.630926] virtio_rpmsg_bus virtio1: rpmsg host is online
[ 0.636110] virtio_rpmsg_bus virtio0: creating channel rpmsg-i2c-channel addr 0x1
[ 0.757287] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.1: new channel: 0x400 -> 0x1!
[ 0.765486] imx_rpmsg_i2c i2c-rpbus-1: add I2C adapter i2c-rpmsg-adapter successfully
[ 0.786761] imx_rpmsg_i2c i2c-rpbus-5: add I2C adapter i2c-rpmsg-adapter successfully
[ 0.804779] imx_rpmsg_i2c i2c-rpbus-12: add I2C adapter i2c-rpmsg-adapter successfully
[ 0.813413] imx_rpmsg_i2c i2c-rpbus-14: add I2C adapter i2c-rpmsg-adapter successfully
[ 0.850745] imx_rpmsg_i2c i2c-rpbus-15: add I2C adapter i2c-rpmsg-adapter successfully
[ 2.222934] virtio_rpmsg_bus virtio1: creating channel rpmsg-openamp-demo-channel addr 0x1e
[ 89.232303] imx_rpmsg_pingpong virtio1.rpmsg-openamp-demo-channel.-1.30: new channel: 0x400 -> 0x1e!
[ 89.484700] imx_rpmsg_pingpong virtio1.rpmsg-openamp-demo-channel.-1.30: goodbye!

[UPDATE]

I flash eMMC memory using uuu with bootloader "imx-boot-imx8qxpc0mek-sd.bin-flash_regression_linux_m4" and now I can load binary via J-Link and it is working. It seems that the point is in partitioning resources, but in this bootloader file is m4 image that is loaded every device power on (power demo), I would there is no m4 preloaded, so it is possible to edit dtb file to have working rpmsg example with previous bootloader, maybe need to change shared memory region? I would be gratefull for help.

0 项奖励
回复

1,484 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Glad to hear that it is now working, for your last question which bootloader version are you referring to?

Best regards,
Aldo.

0 项奖励
回复

1,478 次查看
Ferromagnetic
Contributor II

I mean this one imx-boot-imx8qxpc0mek-sd.bin-flash 

0 项奖励
回复

1,462 次查看
AldoG
NXP TechSupport
NXP TechSupport

Hello,
 
It should be always prefered to let SCU_ROM code load the M4 binary in 8QXP/QM for SCU support. You need to build a flash.bin file with M4 by imx-mkimage, using "make SOC=iMX8QX REV=C0 flash_linux_m4".

Best regards,
Aldo.

0 项奖励
回复