Hi everyone,
I'm working on a custom board based on i.MX8M mini with Eclipse, GNU Arm Embedded toolchain and Segger J-Link.
I'm having a problem on debugging rpmsg using pingpong example.
With linux running, I load the program using the debugger, the program starts and initializes the rpmsg, but it waits indefinitely in the rpmsg_lite_wait_for_link_up() function. The same program loaded from linux with remoteproc works fine.
The is compiled for intenal RAM (0x1FFE000).
Did anyone already see this behaviour?
Many thanks
Biafra
Hi @biafra,
Hi @Dhruvit,
Many thanks for your answer.
These are the steps I do when it works:
echo -n ~/ > /sys/module/firmware_class/parameters/path
echo -n linux_remote.elf > /sys/class/remoteproc/remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up imx-rproc
remoteproc remoteproc0: Booting fw image linux_remote_2_13.elf, size 3534088
remoteproc0#vdev0buffer: assigned reserved memory node vdevbuffer@78400000
virtio_rpmsg_bus virtio0: rpmsg host is online
remoteproc0#vdev0buffer: registered virtio0 (type 7)
remoteproc remoteproc0: remote processor imx-rproc is now up
virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x1e
RPMSG Ping-Pong FreeRTOS RTOS API Demo...
RPMSG Share Base Addr is 0x78000000
Link is up!
Nameservice announce sent.
modprobe imx_rpmsg_pingpong
90:init
42:rpmsg_pingpong_probe
imx_rpmsg_pingpong virtio0.rpmsg-openamp-demo-channel.-1.30: new channel: 0x400 -> 0x1e!
get 1 (src: 0x1e)
get 3 (src: 0x1e)
get 5 (src: 0x1e)
[...]
get 99 (src: 0x1e)
get 101 (src: 0x1e)
imx_rpmsg_pingpong virtio0.rpmsg-openamp-demo-channel.-1.30: goodbye!
Waiting for ping...
Sending pong...
Waiting for ping...
Sending pong...
Waiting for ping...
Sending pong...
[...]
Waiting for ping...
Sending pong...
Waiting for ping...
Sending pong...
Ping pong done, deinitializing...
Looping forever...
These are the steps I do when it doesn't work:
RPMSG Ping-Pong FreeRTOS RTOS API Demo...
RPMSG Share Base Addr is 0x78000000
modprobe imx_rpmsg_pingpong
90:init
The M4 program is compiled using the MIMX8MM6xxxxx_cm4_ram.ld linker file.
Am I making some mistakes?
Many thanks
Biafra
Hi @biafra,
Hi @Dhruvit,
Hi tried your suggestion, but with no luck.
The behaviour is the same as before: the M4 core is not able to hanshake that the link is up, it waits indefintely in the rpmsg_lite_wait_for_link_up() function, even after loading the pingpong module.
Many thanks
Biafra
Hi @biafra,
I hope you are doing well.
Please make sure that you started the M4 application after stopping at the u-boot console and making necessary device tree changes.
Please refer to the steps and Notes mentioned in 5.5 Debug RPMSG demos and 5.6 at Debug RPMSG demos.
Please make sure that you have configured the breakpoint correctly.
Thanks & Regards,
Dhruvit Vasavada
HI @Dhruvit,
In the previous test I forgot to add
status = "disabled";
in the imx8mm-cm4 node.
Now I followed all the things you noticed, but the behaviour is still the same.
This time there also the problem that I can use remoteproc: /dev/remoteproc0 doesn't exist.
Many thanks
Biafra
Hi @biafra,
I hope you are doing well.
If the rpmsg node is missing then suggested device tree changes are not required.
Please be careful to set breakpoints or debug step by step in rpmsg demos because when the M core is stopped even the A core is blocked.
Please make sure that you have followed all the steps and notes mentioned in Debug RPMSG demos.
Please provide me with the device tree used for further debugging.
Please refer to the below-mentioned link where rpmsg demos are debugged successfully.
Thanks & Regards,
Dhruvit Vasavada.