JTAG Debugging - rpmsg_lite IMX8MP

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

JTAG Debugging - rpmsg_lite IMX8MP

722 次查看
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

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

658 次查看
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 项奖励
回复

657 次查看
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 项奖励
回复

661 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2300031%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EJTAG%20%E8%B0%83%E8%AF%95%20-%20rpmsg_lite%20IMX8MP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300031%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E4%BB%A5%22%3CSPAN%3EString%20Echo%20FreeRTOS%20RTOS%20API%20Demo%22%3C%2FSPAN%3E%E4%B8%BA%E4%BE%8B%E3%80%82VS%20%E4%BB%A3%E7%A0%81%2FMCUXpresso%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3E%E5%A6%82%E6%9E%9C%E6%88%91%E5%9C%A8%20uboot%20%E5%90%AF%E5%8A%A8%E8%B0%83%E8%AF%95%E5%99%A8%EF%BC%88%E5%90%AF%E5%8A%A8%EF%BC%89%EF%BC%8C%E9%82%A3%E4%B9%88%E4%B8%80%E5%88%87%E6%AD%A3%E5%B8%B8%EF%BC%8C%E4%BD%86%E6%98%AF%E6%AF%8F%E6%AC%A1%E9%83%BD%E9%87%8D%E5%90%AFlinux%E7%AB%AF%3C%2FFONT%3E%E6%9C%89%E7%82%B9%E7%97%9B%E8%8B%A6%E3%80%82%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E8%B0%83%E8%AF%95%E5%99%A8%EF%BC%88%E4%B8%8A%E5%B8%82%EF%BC%89%E5%9C%A8%E5%90%AF%E5%8A%A8%E5%90%8E%E5%90%AF%E5%8A%A8%EF%BC%8C%E5%88%99%20%3CSPAN%3Erpmsg_lite_wait_for_link_%3C%2FSPAN%3E%20up%20()%20%E5%B0%86%E5%A7%8B%E7%BB%88%E6%8C%82%E8%B5%B7%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E5%8F%91%E7%8E%B0%E7%9A%84%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E7%9A%84%E5%94%AF%E4%B8%80%E6%96%B9%E6%B3%95%E6%98%AF%E5%B0%86%E7%B2%BE%E7%81%B5%E6%96%87%E4%BB%B6scp%E5%88%B0%E6%9D%BF%E4%B8%8A%EF%BC%8C%E7%84%B6%E5%90%8E%E5%9C%A8%E5%81%9A%E5%AE%8C%E4%B9%8B%E5%90%8E%E5%B0%86%E8%B0%83%E8%AF%95%E5%99%A8%E8%BF%9E%E6%8E%A5%E5%88%B0%E6%9D%BF%E4%B8%8A%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20translate%3D%22no%22%3E%3CSPAN%3Eecho%20stop%20%26gt%3B%20%2Fsys%2Fdevices%2Fplatform%2Fimx8mp-cm7%2Fremoteproc%2Fremoteproc0%2Fstate%3CSPAN%20class%3D%22%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eecho%20debugme.elf%20%26gt%3B%20%2Fsys%2Fdevices%2Fplatform%2Fimx8mp-%3C%2FSPAN%3E%3CSPAN%3Eecho%20start%20%26gt%3B%20%2Fsys%2Fdevices%2Fplatform%2Fimx8mp-cm7%2Fremoteproc%2Fremoteproc0%2Fstate%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Ecat%20%2Fsys%2Fdevices%2Fplatform%2Fimx8mp-cm7%2Fremoteproc%2Fremoteproc0%2Fstate%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3E%E6%98%AF%E6%B3%A8%E5%AE%9A%E8%A6%81%E8%BF%99%E6%A0%B7%EF%BC%8C%E8%BF%98%E6%98%AF%E6%9C%89%E4%BB%80%E4%B9%88%E7%AA%8D%E9%97%A8%E5%8F%AF%E4%BB%A5%E5%85%8B%E6%9C%8D%E8%BF%99%E7%A7%8D%E6%83%85%E5%86%B5%EF%BC%8C%E5%9D%9A%E6%8C%81%E4%BD%BF%E7%94%A8%20JTAG%20%E7%BC%96%E7%A8%8B%E8%80%8C%E4%B8%8D%E4%BD%BF%E7%94%A8%20remoteproc%EF%BC%9F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E5%AE%89%E8%BF%AA%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2300031%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2300188%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Debugging%20-%20rpmsg_lite%20IMX8MP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300188%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%95%8A%EF%BC%8C%E9%82%A3%E7%AF%87%E7%9F%A5%E8%AF%86%E5%BA%93%E6%96%87%E7%AB%A0%E8%AF%B4%E7%9A%84%E6%98%AF%E5%8F%A6%E4%B8%80%E4%BB%B6%E4%BA%8B%EF%BC%8C%E5%AF%B9%E4%B8%8D%E8%B5%B7%EF%BC%8C%E6%88%91%E8%AF%AF%E8%A7%A3%E4%BA%86%E4%BD%A0%E4%B9%8B%E5%89%8D%E8%AF%B4%E7%9A%84%E8%AF%9D%EF%BC%8C%E4%BB%A5%E4%B8%BA%E6%98%AF%E4%B8%8E%E9%93%BE%E6%8E%A5%E9%97%AE%E9%A2%98%E6%9C%89%E5%85%B3%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%88%91%E5%9C%A8%20KB%20%E4%B8%AD%E4%BC%BC%E4%B9%8E%E6%B2%A1%E6%9C%89%E9%81%87%E5%88%B0%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%8C%E5%8F%AA%E8%A6%81%E8%A7%A3%E5%86%B3%E4%BA%86%E9%93%BE%E6%8E%A5%E9%97%AE%E9%A2%98%EF%BC%8C%E4%B8%80%E5%88%87%E9%83%BD%E8%83%BD%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C%E3%80%82%E6%88%91%E8%A6%81%E7%9C%8B%E7%9C%8B%20remoteproc%20%E7%A9%B6%E7%AB%9F%E5%9C%A8%E5%81%9A%E4%BB%80%E4%B9%88...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2300167%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Debugging%20-%20rpmsg_lite%20IMX8MP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300167%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%B0%A2%E8%B0%A2%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40%E5%88%98%E5%BF%97%E6%98%8E%3C%2FA%3E%3C%2FP%3E%3CP%3E%E5%B7%B2%E7%BB%8F%E5%9C%A8%E5%81%9A%E8%BF%99%E4%BA%9B%E4%BA%8B%E4%BA%86%E3%80%82%3C%2FP%3E%3CP%3E%E8%BF%99%E7%AF%87%E7%9F%A5%E8%AF%86%E5%BA%93%E6%96%87%E7%AB%A0%E5%BE%88%E6%9C%89%E6%84%8F%E6%80%9D%EF%BC%8C%E6%88%91%E4%B9%9F%E8%AF%95%E8%BF%87%3CSPAN%3Erpmsg_lite_is_link_up()%EF%BC%8C%E4%BD%86%E5%A4%B1%E8%B4%A5%E4%BA%86%EF%BC%8C%E4%B9%9F%E8%AF%95%E8%BF%87%E4%B8%8D%E4%BD%BF%E7%94%A8%20%3C%2FSPAN%3E%3CSPAN%3Erpmsg_lite_wait_for_link_up()%EF%BC%8C%E4%BD%86%20%3C%2FSPAN%3E%3CSPAN%3Erpmsg_lite_instance%20%E4%B8%AD%E7%9A%84%20link_state%3C%2FSPAN%3E%3CSPAN%3E%E6%B2%A1%E6%9C%89%E8%AE%BE%E7%BD%AE%EF%BC%8C%E6%88%91%E5%B0%86%E5%B0%9D%E8%AF%95%E4%B8%8D%E9%98%BB%E5%A1%9E%EF%BC%8C%E4%BD%86%E6%88%91%E4%B9%8B%E5%89%8D%E7%8C%9C%E6%B5%8B%E4%BC%9A%E6%98%AF%E4%B8%80%E6%A0%B7%E7%9A%84...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E5%AE%89%E8%BF%AA%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2300137%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20JTAG%20Debugging%20-%20rpmsg_lite%20IMX8MP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300137%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F55163%22%20target%3D%22_blank%22%3E%40AndyCapon%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%E5%A6%82%E6%9E%9C%E4%BD%A0%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%20rpmsg%20str%20echo%20%E6%BC%94%E7%A4%BA%EF%BC%8C%E5%88%99%E9%9C%80%E8%A6%81%E5%85%88%E5%8A%A0%E8%BD%BD%20imx_rpmsg_tty%20%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%EF%BC%8C%E7%84%B6%E5%90%8E%E6%89%8D%E8%83%BD%E5%9C%A8%20Linux%20%E4%B8%AD%E5%90%AF%E5%8A%A8%20jLink%E3%80%82%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E5%90%AF%E5%8A%A8%E5%88%B0%20linux%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Emodprobe%20imx_rpmsg_tty%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%E7%94%A8%E4%B8%8A%E5%B8%82%20jLink%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E5%A6%82%E6%9E%9C%E6%82%A8%E5%9C%A8%20linux%20%E4%B8%AD%E9%81%87%E5%88%B0%20imx%20rproc%20kick%20%E9%94%99%E8%AF%AF%EF%BC%8C%E6%9C%AC%E7%9F%A5%E8%AF%86%E5%BA%93%E6%88%96%E8%AE%B8%E4%BC%9A%E5%AF%B9%E6%82%A8%E6%9C%89%E6%89%80%E5%B8%AE%E5%8A%A9%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2Fimx-rproc-kick-failed-0-err-62-during-JLink-rpmsg-debug%2Fta-p%2F2130567%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2Fimx-rproc-kick-failed-0-err-62-during-JLink-rpmsg-debug%2Fta-p%2F2130567%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%87%B4%E6%95%AC%EF%BC%8C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E