How to JTAG debug iMX8mq?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to JTAG debug iMX8mq?

ソリューションへジャンプ
19,423件の閲覧回数
matthewcampbell
Contributor III

I'm trying to bring up a custom board with an iMX8mq on it. We are having issues and I was looking to use JTAG to try and see what's going on. In the past on iMX6 we have used the SEGGER j-link Base with good success, but from their website it looks like they don't support any ARMv8 cores at this time.

I have a couple questions:

1) Has anyone got the j-link Base working with an iMX8 (cortex-a53 specifically). It looks like I might be able to use OpenOCD for this, but I am unsure.

2) Is there another recommended JTAG debugger I can buy that supports the iMX8mq?

タグ(3)
0 件の賞賛
返信
1 解決策
15,004件の閲覧回数
matthewcampbell
Contributor III

Although J-Link doesn't officially support any ARMv8 cores with their software, I was able to get things working with OpenOCD. Also, I got this going with the J-Link base which is the cheapest J-link adapter. Here is what I did:

  • Compile latest OpenOCD from source, make sure to use --enable-jlink when doing ./configure
  • run OpenOCD with Jlink connected to your PC and the target device. Unless you set up udev rules for the Jlink, you'll need to run as root
    • sudo openocd -f interface/jlink.cfg -f board/nxp_mcimx8m-evk.cfg
  • Run gdb and connect. In my case I'm using a Yocto SDK, so make to source the SDK first if that's what you're doing. Once in gdb you need to connect.
    • # $GDB
    • (gdb) target remote localohst:3333
    • info reg

That should do it. Hope this helps.

元の投稿で解決策を見る

7 返答(返信)
15,005件の閲覧回数
matthewcampbell
Contributor III

Although J-Link doesn't officially support any ARMv8 cores with their software, I was able to get things working with OpenOCD. Also, I got this going with the J-Link base which is the cheapest J-link adapter. Here is what I did:

  • Compile latest OpenOCD from source, make sure to use --enable-jlink when doing ./configure
  • run OpenOCD with Jlink connected to your PC and the target device. Unless you set up udev rules for the Jlink, you'll need to run as root
    • sudo openocd -f interface/jlink.cfg -f board/nxp_mcimx8m-evk.cfg
  • Run gdb and connect. In my case I'm using a Yocto SDK, so make to source the SDK first if that's what you're doing. Once in gdb you need to connect.
    • # $GDB
    • (gdb) target remote localohst:3333
    • info reg

That should do it. Hope this helps.

7,868件の閲覧回数
HAA
Contributor I

Hi @matthewcampbell,

I am also looking for a jtag debugger for IMX 8M Mini. I found out that SEGGER do not support Cortex A53 of the processor and that it is what I need; I need to debug a Linux project. However, I see that you were able to get that working with OpenOCD. But I have a question. Can I debug multi threads (analyze multi parallelism)?

Thank you in advance,

 

0 件の賞賛
返信
13,429件の閲覧回数
kunalkotecha1
Senior Contributor II

Hi @matthewcampbell,

 

We are facing an issue while interfacing JTAG with i.MX8MQ. We are following steps as mentioned in this post (cloned and compiled openocd) and we are able to detect the Core. However, we are not able to set the breakpoints. I have raised this post with a detailed query. Can you please have a look and provide some approaches? 

 

Regards,

Kunal

0 件の賞賛
返信
13,414件の閲覧回数
matthewcampbell
Contributor III

Hi @kunalkotecha1,

Unfortunately that project with the iMX.8 has since been cancelled and I haven't done any more work with the J-LINK and ARMv8 since then. I can't remember if I got breakpoints working or not in the first place, I was using J-LINK to load U-Boot in early board bring up. Sorry I couldn't be of more help, but if you find a solution please post it here for posterity.

14,917件の閲覧回数
lcameron
Contributor I

the gdb connect command should be:

(gdb) target extended-remote localhost:3333

 

Note the "extended". 

 

 

0 件の賞賛
返信
15,005件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Matt

one can look on

IDE - Debug, Compile and Build Tools (2)
SDK_2.3_MX8MQ_Beta_Patch(REV SDK2.3_MX8MQ_Beta)
(NXP provided IAR and Segger tool patch to support i.MX8MQuad device)

i.MX 8M Evaluation Kit|NXP 

for A53 supported  Lauterbach and ARM DS-5, for OpenOCD one can look at a53 support on

Programming Guide: OpenOCD + Eclipse + Jtag debug on Uboot & Linux 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

15,005件の閲覧回数
matthewcampbell
Contributor III

Hi Igor, thanks for the reply. OpenOCD paired with my existing J-Link seems to have been the answer. I'm surprised Segger doesn't officially support ARMv8 with their software considering it has been in the market more more than 5 years. Either way, I posted another answer in this thread on how to use the Segger J-link Base with OpenOCD to debug the iMX8mq.