i.MX 8M Plus JTAG debug from reset release

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

i.MX 8M Plus JTAG debug from reset release

545 次查看
tadejm
Contributor I

Hi all,

I have a few inquiries about behaviors of i.MX 8M Plus SoC regarding JTAG debug via external debugger and I was hoping you could help me clear it up.

Contrary to how other i.MX 8M derivatives I worked with (i.MX 8M Nano, i.MX8M Mini) behaved, I noticed that JTAG TAP is not available or operational after device is released from reset. It only becomes available after a valid boot image starts executing on ARM Cortex-A53 core(s).

And it does not have to be anything special as far as user code on boot image is concerned, simple 'while (1)' suffices.

But interestingly enough not all boot images are OK, for example if I create a boot image with software breakpoint 'BRK' instruction instead of 'while(1)', the device does not boot (or JTAG does not become available).

My queries:

  1. Is the fact that debug logic is not available to external debugger until device is booted expected behavior? If so:
    1. How does it work? Does Cortex-A53 in BootROM 'enable' somehow JTAG if it recognizes a correctly structured boot image?
    2. Can debugger work somehow around this, i.e. can hardware debugger gain control over JTAG debug logic if there is no valid boot image programmed to any boot media? If not:
      1. How does a customer, when it creates a new custom board without SD card slot for example, program the boot media?
        If debugger could have access to 'unbooted' SoC, debugger could do the programming for example.

Than you for your time and effort.

0 项奖励
回复
5 回复数

472 次查看
joanxie
NXP TechSupport
NXP TechSupport

pls refer to the document as below, which is for TRACE32 debugger

https://community.nxp.com/t5/NXP-Tech-Blog/Debug-i-MX8MP-uboot-with-TRACE32/ba-p/1615599

0 项奖励
回复

459 次查看
tadejm
Contributor I
Thank you for your reply.

However this seems to be the same, u-boot needs to be flashed to eMMC or SD card before debugger can connect to SoC.

My question is, can debugger connect to SoC debug logic with all the boot devices blank?
If not, what is the official procedure to flash boot image to e.g. eMMC or QSPI if you do not have slot for SD card on custom board design?
0 项奖励
回复

362 次查看
joanxie
NXP TechSupport
NXP TechSupport

1)I'm not sure what  you mean JTAG is unavailable, couldn't debug or couldn't connect? I attached an AN for how to use Jtag on imx processor, which can tell you all of detailed information, you can refer to that firstly

2)what is the official procedure to flash boot image to e.g. eMMC or QSPI if you do not have slot for SD card on custom board design?

> the link I sent to you before is about official procedure to flash image to emmc, you also can refer to the enclosed AN

 

0 项奖励
回复

142 次查看
tadejm
Contributor I

1) Couldn't connect. Let me explain a bit:

With our debug/trace tools we already support SoCs like i.MX 6UL, i.MX8 M, i.MX8 MMini, i.MX8 MNano, etc. On all of the above JTAG is not problematic on "virgin" device, in means that we can read for example JTAG IDCODE on an SoC that does not have boot image programmed on any boot medium.

On i.MX 8M Plus, this cannot be done, JTAG debug logic seems dead until device is programmed with valid boot image.

My question here is, is this just the way it is or can tool vendor somehow access JTAG debug logic while device does not have valid boot image programmed.

 

2) Understood. Official procedure of programming "virgin" device without SD card is via USB and NXP provided tool.

0 项奖励
回复

75 次查看
joanxie
NXP TechSupport
NXP TechSupport

you can refer to the enclosed file, imx8mp has secure Jtag mode, which supports  challenge/response mechanism used to authenticate the JTAG accesses uses a challenge value and the associated secret
response key. 

0 项奖励
回复