imx8mn-evk with jlink and openocd

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

imx8mn-evk with jlink and openocd

1,014 Views
eembedder
Contributor I

Hi All,

I try to debug an SW issue on my EVK-IMX8M-Nano using JLINK debugger + openocd

As I understand the rest 3 cores are in the idle state, so no debug is available for them. So, how can I turn them on? Is it possible to use DBPRCR reg to emulates a powerdown? I want to modify an openocd script to power on all cores  and be able to USE all of them with openocd on Linux boot-up.

Can someone help me with this?

 

Thanks in advance!

0 Kudos
Reply
2 Replies

897 Views
irees
Contributor I

Hi, I'm in a similar situation, currently working with 8MNANOD3L-EVK and a J-Link Ultra+.

With OpenOCD 0.11.0, there is support for i.MX8MQ which appears to work for my board, in that I can break and continue from gdb while the system is in uboot, using openocd like this:

 

 

openocd -f interface/jlink.cfg -f board/nxp_mcimx8m-evk.cfg -c init -c halt

 

 

However, when my system starts loading Linux, I get DAP errors from OpenOCD - the CPU keeps running but the JTAG seems to be disconnected.

  1. Could it be the case that we need to change something about the device tree, to preserve access to the JTAG?
  2. Are the debug addresses for the A53 cores the same between i.MX8MQ and i.MX8MN?
  3. Is there some special Linux configuration or boot argument required to allow JTAG debugging?  FWIW, the target is running 5.10

I've tried setting the kernel boot arguments to include the following, with no noticeable effect:

nokaslr rodata=off maxcpus=1
 
Thanks!
0 Kudos
Reply

888 Views
irees
Contributor I

Aha, I've got this working.  Invoking OpenOCD as above, and adding cpuidle.off=1 to the Linux kernel boot args is sufficient.  Those other args might also be helpful, but aren't necessary for basic debugging.

Time to start looking in to the problem I set out to solve!

0 Kudos
Reply