rpmsg_lite_str_echo_rtos stuck at rpmsg_lite_is_link_up() when run from debugger with Linux running?

cancel
Showing results for 
Search instead for 
Did you mean: 

rpmsg_lite_str_echo_rtos stuck at rpmsg_lite_is_link_up() when run from debugger with Linux running?

Jump to solution
191 Views
paulw2
Contributor II

Hi,

rpmsg_lite_str_echo_rtos from SDK_2.9.1_EVK-MIMX8MM on evkmimx8mm board - 5.4-zeus

I can successfully load and run rpmsg_lite_str_echo_rtos_imxcm4.elf using remoteproc from A53 Linux and  can send RPMsg messsages to the M4 using /dev/ttyRPMSG30.

However, with Linux booted on the A53 when I load and run the same M4 firmware
using JTAG debugger, the "RPMSG String Echo FreeRTOS RTOS API Demo..." message is printed on the M4 console but nothing else and RPMsg between Linux on A53 and M4 does not work.

As I can debug the rpmsg_lite_str_echo_rtos firmware, set breakpoints, etc, I see that main_remote.c:app_task() remains stuck in while (0 == rpmsg_lite_is_link_up(my_rpmsg))

main_remote.c:app_task()

while (0 == rpmsg_lite_is_link_up(my_rpmsg))
;

Please could someone explain this ?

If I interrupt the boot process and break into u-boot, load rpmsg_lite_str_echo_rtos using the JTAG debugger, then boot to Linux, RPMsg works OK (as it does when loaded and run using remoteproc) and I can debug the firmware OK too.

I’d really appreciate an explanation of why RPMsg does not work when the M4 firmware is loaded via JAG debugger while Linux is running on the A53 and hopefully how to overcome this problem.

Thanks in advance.

0 Kudos
1 Solution
162 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

I believe this already reached you, if not please check the following, the steps team have shared for this to work are the following:
 

  • u-boot=> setenv fdt_file imx8mm-evk-rpmsg.dtb #It still works to start your C-M program here, but that might necessitate subtle changes below.
  • Boot Linux. Login.
  • modprobe imx_rpmsg_tty
  • cd /sys/class/remoteproc/remoteproc0 #For convenience — most of our remoteproc pseudo-files are here.
  • echo /run/media/mmcblk1p1/ >/sys/module/firmware_class/parameters/path
  • echo imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.elf >firmware #Note: *.elf, not *.bin.
  • cat state #It should report offline
  • Load C-M program via JTAG
  • echo start >state
  • Load a new C-M program via JTAG
  • echo stop >state
  • echo start >state   


Then you just need to repeat steps 10 -12 if you disconnect the debugger to load a new image.

Best regards,
Aldo.

View solution in original post

2 Replies
163 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

I believe this already reached you, if not please check the following, the steps team have shared for this to work are the following:
 

  • u-boot=> setenv fdt_file imx8mm-evk-rpmsg.dtb #It still works to start your C-M program here, but that might necessitate subtle changes below.
  • Boot Linux. Login.
  • modprobe imx_rpmsg_tty
  • cd /sys/class/remoteproc/remoteproc0 #For convenience — most of our remoteproc pseudo-files are here.
  • echo /run/media/mmcblk1p1/ >/sys/module/firmware_class/parameters/path
  • echo imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.elf >firmware #Note: *.elf, not *.bin.
  • cat state #It should report offline
  • Load C-M program via JTAG
  • echo start >state
  • Load a new C-M program via JTAG
  • echo stop >state
  • echo start >state   


Then you just need to repeat steps 10 -12 if you disconnect the debugger to load a new image.

Best regards,
Aldo.

View solution in original post

156 Views
paulw2
Contributor II

Thanks Aldo, yes, this process works for me.

0 Kudos