JTAG Debugging - rpmsg_lite IMX8MP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JTAG Debugging - rpmsg_lite IMX8MP

803 Views
AndyCapon
Contributor III

Hi,

Taking as an example the "String Echo FreeRTOS RTOS API Demo". VS Code/MCUXpresso

If I start the debugger (launch) at uboot then all works fine but rebooting the linux side every time is a bit of a pain.

If the debugger (launch) is started after boot then rpmsg_lite_wait_for_link_up() will always hang.

The only way round this I have found is to scp the elf file to the board and then attach the debugger to the board after doing:

echo stop > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state 
echo debugme.elf > /sys/devices/platform/imx8mp-echo start > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state
cat /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state

Is it meant to be like this or is there a trick to get over this and stick to the JTAG programming without using remoteproc?

Thanks

Andy

Labels (1)
Tags (1)
0 Kudos
Reply
3 Replies

739 Views
AndyCapon
Contributor III

Thanks @Zhiming_Liu 

Already doing all that.

Interesting that knowledge base article, I had also tried rpmsg_lite_is_link_up() which failed, also tried without rpmsg_lite_wait_for_link_up() and the link_state in the rpmsg_lite_instance was not set, I'll try without blocking but I guessed before it would be the same...

Thanks

Andy

0 Kudos
Reply

738 Views
AndyCapon
Contributor III

Ah, that knowledge base article is about something different, sorry I misunderstood what you said before and thought it was to do with the link problem.

I don't seem to get the problem in the KB, everything works as long as I get past the link issue. I'm going to look at exactly what remoteproc is doing...

0 Kudos
Reply

742 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @AndyCapon 

If you are using rpmsg str echo demo, you need to load imx_rpmsg_tty driver before you launch JLink in Linux. 

  • Boot into linux
  • modprobe imx_rpmsg_tty
  • Launch JLink

 

If you meet imx rproc kick error in linux, this knowledge base maybe helpful.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/imx-rproc-kick-failed-0-err-62-during-JL...

Best Regards,
Zhiming

0 Kudos
Reply