<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Debugging iMX8QM6 with OpenOCD: TAPID mismatch and proper mapping of targets in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941557#M140887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thank you but the issues I had were more ARM and OpenOCD related.&lt;/P&gt;&lt;P&gt;In the meantime I solved some of them.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here are a few things that might be useful:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TAP ID mismatch is not important for JLink/OpenOCD. Probably a version update...&lt;/LI&gt;&lt;LI&gt;The M4 core I was debugging was indeed the SCU. There was a unknown problem that I could only solve by using another board.&amp;nbsp;When the other two M4 cores are turned on they can be seen with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;'dap info 2&lt;/SPAN&gt;' or '&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dap info 3&lt;/SPAN&gt;' commands. In my case, this cores were not powered on so the commands returned a message like 'Can't read component, the corresponding core might be turned off'. This has changed now with the new board.&lt;/LI&gt;&lt;LI&gt;There is a mention in OpenOCD code that hardware breakpoints only work if M4 core is running from TCML memory region (up to 0x1fffffff). That is because the installed revision of FPB (Flash Patch and Breakpoint) does not support hardware breakpoints in the upper part of the memory region.&lt;BR /&gt;Using software breakpoints to debug in DDR at address 0x88000000 does not work neither with JLink nor with OpenOCD. With OpenOCD, '&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;(gdb) si&lt;/SPAN&gt;' would appear to step over an instruction but it will not halt after the instruction was executed.&lt;/LI&gt;&lt;LI&gt;The previous OpenOCD config file was wrong. Here is a more proper one:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# configuration file for NXP i.MX8QM6 SoC&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# @20190903&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# guessed, updated and extended from imx8m.cfg&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# The iMX8QM6 SoC has the folowing cores that can be debug targets:&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;AP cluster 0: 4 x Cortex-A53&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;AP cluster 1: 2 x Cortex-A72&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;2 x Cortex-M4&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;1 x Cortex-M4 - the SCU (System Control Unit)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# This configuration file considers that all 6 Application Processors (AP) are &lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# running in Hybrid Multiprocessing (HMP) mode.&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# With this configuration the following 4 targets are available in GDB:&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3333 - imx8qm6.aX &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;--- AP cores (all 6 of them in HMP mode)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3334 - imx8qm6.m4.scu &amp;nbsp;&amp;nbsp;&amp;lt;--- SCU&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3335 - imx8qm6.m4.0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3336 - imx8qm6.m4.1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# '-defer-examine' may be used for targets that are not powered up&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPNAME] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME $CHIPNAME&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME imx8qm6&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPCORES_A53] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a53 $CHIPCORES_A53&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a53 4&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPCORES_A72] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a72 $CHIPCORES_A72&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a72 2&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# CoreSight Debug Access Port&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists DAP_TAPID] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID $DAP_TAPID&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID 0x1890101d&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# the DAP tap&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -expected-id $_DAP_TAPID&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _CTINAME $_CHIPNAME.cti&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _hmp_command "target smp"&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create a53 targets in CTI cluster 0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A53 {0x80410000 0x80510000 0x80610000 0x80710000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A53 {0x80420000 0x80520000 0x80620000 0x80720000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core_a53 0 } { $_core_a53 &amp;lt; $_cores_a53 } { incr _core_a53 } {&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; cti create $_CTINAME.a53.$_core_a53 -dap $_CHIPNAME.dap -ap-num 6 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A53 $_core_a53]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; target create $_CHIPNAME.a53.$_core_a53 aarch64 -coreid $_core_a53 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dap $_CHIPNAME.dap -dbgbase [lindex $DBGBASE_A53 $_core_a53] \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -cti $_CTINAME.a53.$_core_a53&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _hmp_command "$_hmp_command $_CHIPNAME.a53.$_core_a53"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create a72 targets in CTI cluster 1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A72 {0x80210000 0x80310000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A72 {0x80220000 0x80320000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core_a72 0 } { $_core_a72 &amp;lt; $_cores_a72 } { incr _core_a72 } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; cti create $_CTINAME.a72.$_core_a72 -dap $_CHIPNAME.dap -ap-num 6 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A72 $_core_a72]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; target create $_CHIPNAME.a72.$_core_a72 aarch64 -coreid $_core_a72 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dap $_CHIPNAME.dap -dbgbase [lindex $DBGBASE_A72 $_core_a72] \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -cti $_CTINAME.a72.$_core_a72&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _hmp_command "$_hmp_command $_CHIPNAME.a72.$_core_a72"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;eval $_hmp_command&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4 SCU core on AP #1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.scu cortex_m -dap ${_CHIPNAME}.dap -ap-num 1&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4-0 core on AP #2&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.0 cortex_m -dap ${_CHIPNAME}.dap -ap-num 2&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4-1 core on AP #3&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# did not tried this one&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.1 cortex_m -dap ${_CHIPNAME}.dap -ap-num 3 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -defer-examine&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# AHB-AP for direct access to soc bus&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.ahb mem_ap -dap ${_CHIPNAME}.dap -ap-num 0&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# default target&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists TARGETNAME] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _TARGETNAME $TARGETNAME&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _TARGETNAME $_CHIPNAME.a53.0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;targets $_TARGETNAME&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;adapter_khz 4000&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;reset_config trst_and_srst&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Aug 2019 06:24:59 GMT</pubDate>
    <dc:creator>teodor_robas</dc:creator>
    <dc:date>2019-08-30T06:24:59Z</dc:date>
    <item>
      <title>Debugging iMX8QM6 with OpenOCD: TAPID mismatch and proper mapping of targets</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941555#M140885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a iMX8QM6 (4 x A53; 2 x A72; 2 x M4) that I would like to debug with OpenOCD and J-Link.&lt;/P&gt;&lt;P&gt;An&amp;nbsp;OpenOCD compiled from sources shows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;$ ./src/openocd.exe -f tcl/interface/jlink.cfg -f imx8m_local-2.cfg&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Open On-Chip Debugger 0.10.0+dev-00924-g16496488-dirty (2019-08-09-11:20)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Licensed under GNU GPL v2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;For bug reports, read&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; &lt;A href="http://openocd.org/doc/doxygen/bugs.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://openocd.org/doc/doxygen/bugs.html&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : auto-selecting first available session transport "jtag". To override use 'transport select &amp;lt;transport&amp;gt;'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;adapter speed: 4000 kHz&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 6666 for tcl connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 4444 for telnet connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : J-Link Pro V4 compiled Feb 2 2018 18:13:08&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Hardware version: 4.00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : VTarget = 1.798 V&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : clock speed 4000 kHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : &lt;STRONG&gt;JTAG tap: imx8m.cpu tap/device found: 0x1890101d&lt;/STRONG&gt; (mfg: 0x00e (Freescale (Motorola)), part: 0x8901, ver: 0x1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Warn : &lt;STRONG&gt;JTAG tap: imx8m.cpu UNEXPECTED: 0x1890101d&lt;/STRONG&gt; (mfg: 0x00e (Freescale (Motorola)), part: 0x8901, ver: 0x1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Error: &lt;STRONG&gt;JTAG tap: imx8m.cpu expected 1 of 1: 0x5ba00477&lt;/STRONG&gt; (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Error: Trying to use configured scan chain anyway...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Warn : Bypassing JTAG setup events due to errors&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : imx8m.a53.0: hardware has 6 breakpoints, 4 watchpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : imx8m.a72.0: hardware has 6 breakpoints, 4 watchpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : imx8m.a72.1: hardware has 6 breakpoints, 4 watchpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : imx8m.m4.0: hardware has 6 breakpoints, 4 watchpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : imx8m.m4.1: hardware has 6 breakpoints, 4 watchpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 3333 for gdb connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 3334 for gdb connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 3335 for gdb connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 3336 for gdb connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Info : Listening on port 3337 for gdb connections&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TAPID does not match with the expected one. In the manual (i.MX 8QuadMax Applications Processor Reference Manual, Rev. E, 06/2018, Chapter 6.2.1) also TAP ID 0x5ba00477 is mentioned but 0x1890101d is found by OpenOCD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what OpenOCD shows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt; dap info 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;AP ID register 0x44770004&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Type is MEM-AP AXI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;MEM-AP BASE 0x00000002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; No ROM table present&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt; dap info 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;AP ID register 0x24770011&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Type is MEM-AP AHB3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;MEM-AP BASE 0xe00ff003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Valid ROM table present&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe00ff000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04000bb4c4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x4c4, Cortex-M4 ROM (ROM Table)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0x1, ROM table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; MEMTYPE system memory present on bus&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x0] = 0xfff0f003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe000e000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04000bb00c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0xc, Cortex-M4 SCS (System Control Space)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0xe, Generic IP component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x4] = 0xfff02003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe0001000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04003bb002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x2, Cortex-M3 DWT (Data Watchpoint and Trace)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0xe, Generic IP component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x8] = 0xfff03003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe0002000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04002bb003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x3, Cortex-M3 FPB (Flash Patch and Breakpoint)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0xe, Generic IP component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0xc] = 0xfff01003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe0000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04003bb001&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x1, Cortex-M3 ITM (Instrumentation Trace Module)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0xe, Generic IP component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x10] = 0xfff41002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component not present&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x14] = 0xfff42003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe0041000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04000bb925&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x925, Cortex-M4 ETM (Embedded Trace)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0x9, CoreSight component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Type is 0x13, Trace Source, Processor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x18] = 0xfff43002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component not present&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x1c] = 0xfff44003&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component base address 0xe0043000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Peripheral ID 0x04001bb908&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Designer is 0x4bb, ARM Ltd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Part is 0x908, CoreSight CSTF (Trace Funnel)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Component class is 0x9, CoreSight component&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Type is 0x12, Trace Link, Funnel, router&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ROMTABLE[0x20] = 0x0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; End of ROM table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt; scan_chain&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; TapName Enabled IdCode Expected IrLen IrCap IrMask&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;-- ------------------- -------- ---------- ---------- ----- ----- ------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 0 imx8m.cpu Y 0x1890101d 0x5ba00477 4 0x01 0x0f&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;gt; targets&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; TargetName Type Endian TapName State&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;-- ------------------ ---------- ------ ------------------ ------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 0 imx8m.a53.0 aarch64 little imx8m.cpu running&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 1 imx8m.a53.1 aarch64 little imx8m.cpu examine deferred&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 2 imx8m.a53.2 aarch64 little imx8m.cpu examine deferred&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 3 imx8m.a53.3 aarch64 little imx8m.cpu examine deferred&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 4 imx8m.a72.0 aarch64 little imx8m.cpu running&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 5 imx8m.a72.1 aarch64 little imx8m.cpu running&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 6* imx8m.m4.0 cortex_m little imx8m.cpu halted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 7 imx8m.m4.1 cortex_m little imx8m.cpu halted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; 8 imx8m.ahb mem_ap little imx8m.cpu running&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The config file:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# configuration file for NXP i.MX8M family of SoCs&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPNAME] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME $CHIPNAME&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME imx8m&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPCORES] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores $CHIPCORES&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores 4&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# CoreSight Debug Access Port&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists DAP_TAPID] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID $DAP_TAPID&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID 0x5ba00477&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; # set _DAP_TAPID 0x1890101d&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# the DAP tap&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $_DAP_TAPID&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _TARGETNAME_A53 $_CHIPNAME.a53&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _TARGETNAME_A72 $_CHIPNAME.a72&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _TARGETNAME_M4F $_CHIPNAME.m4f&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _CTINAME_A53 $_TARGETNAME_A53.cti&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _CTINAME_A72 $_TARGETNAME_A72.cti&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _CTINAME_M4F $_TARGETNAME_M4F.cti&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A53 {0x80410000 0x80510000 0x80610000 0x80710000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A53 {0x80420000 0x80520000 0x80620000 0x80720000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A72 {0x80C10000 0x80D10000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A72 {0x80C20000 0x80D20000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_M4F {0x80910000 0x80920000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_M4F {0x80918000 0x80928000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core 0 } { $_core &amp;lt; 4 } { incr _core } {&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;cti create $_CTINAME_A53.$_core -dap $_CHIPNAME.dap -ap-num 1 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A53 $_core]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _command "target create $_TARGETNAME_A53.$_core aarch64 -dap $_CHIPNAME.dap \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dbgbase [lindex $DBGBASE_A53 $_core] -cti $_CTINAME_A53.$_core"&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { $_core != 0 } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; # non-boot core examination may fail&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _command "$_command -defer-examine"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _smp_command "$_smp_command $_TARGETNAME_A53.$_core"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; } else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _smp_command "target smp $_TARGETNAME_A53.$_core"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; }&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;eval $_command&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;eval $_smp_command&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core 0 } { $_core &amp;lt; 2 } { incr _core } {&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;cti create $_CTINAME_A72.$_core -dap $_CHIPNAME.dap -ap-num 1 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A72 $_core]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _command "target create $_TARGETNAME_A72.$_core aarch64 -dap $_CHIPNAME.dap \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dbgbase [lindex $DBGBASE_A72 $_core] -cti $_CTINAME_A72.$_core"&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _smp_command "target smp $_TARGETNAME_A72.$_core"&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;eval $_command&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# declare the auxiliary Cortex-M4-0 core on AP #1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.0 cortex_m -dap ${_CHIPNAME}.dap -ap-num 1&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# declare the auxiliary Cortex-M4-1 core on AP #1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.1 cortex_m -dap ${_CHIPNAME}.dap -ap-num 1&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# AHB-AP for direct access to soc bus&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.ahb mem_ap -dap ${_CHIPNAME}.dap -ap-num 0&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# default target is A53 core 0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;targets $_TARGETNAME_A53.0&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;adapter_khz 4000&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can halt, and step instructions from a Cortex M4 core (with some ugly kernel dumps on the application cores). Still I am not sure what core is this one - it could be the System Controller.&lt;/P&gt;&lt;P&gt;As for aarch64 cores GDB complains:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;./aarch64-linux-gnu-gdb.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Remote debugging using 127.0.0.1:3334&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;warning: Architecture rejected target-supplied description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there comes questions:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1) Is it possible that the TAPID mismatch is a problem ?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;and&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1a) Is it possible that OpenOCD shows SJC TAP ID instead ?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt;2)&amp;nbsp;OpenOCD targets listed above may very well be in the wrong order or missing.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Would there be a target for each of the eight cores ?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;and&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;2a) Any idea from where targets proper order might be revealed ?&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;3) The missing CTIBASE and DBGBASE registers are from various forum posts.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Is it possible that the values for M4 and A72 are wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Teodor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:13:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941555#M140885</guid>
      <dc:creator>teodor_robas</dc:creator>
      <dc:date>2019-08-19T12:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging iMX8QM6 with OpenOCD: TAPID mismatch and proper mapping of targets</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941556#M140886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately as you may know the i.MX8 family it is not released yet (pre-production stage) , all the required support/documentation should be requested through your distributor(DFAE).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize for the inconvenience and for any problem this may cause.&lt;/P&gt;&lt;P&gt;Thank you for your understanding,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Aldo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941556#M140886</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-08-19T19:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging iMX8QM6 with OpenOCD: TAPID mismatch and proper mapping of targets</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941557#M140887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thank you but the issues I had were more ARM and OpenOCD related.&lt;/P&gt;&lt;P&gt;In the meantime I solved some of them.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here are a few things that might be useful:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TAP ID mismatch is not important for JLink/OpenOCD. Probably a version update...&lt;/LI&gt;&lt;LI&gt;The M4 core I was debugging was indeed the SCU. There was a unknown problem that I could only solve by using another board.&amp;nbsp;When the other two M4 cores are turned on they can be seen with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;'dap info 2&lt;/SPAN&gt;' or '&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dap info 3&lt;/SPAN&gt;' commands. In my case, this cores were not powered on so the commands returned a message like 'Can't read component, the corresponding core might be turned off'. This has changed now with the new board.&lt;/LI&gt;&lt;LI&gt;There is a mention in OpenOCD code that hardware breakpoints only work if M4 core is running from TCML memory region (up to 0x1fffffff). That is because the installed revision of FPB (Flash Patch and Breakpoint) does not support hardware breakpoints in the upper part of the memory region.&lt;BR /&gt;Using software breakpoints to debug in DDR at address 0x88000000 does not work neither with JLink nor with OpenOCD. With OpenOCD, '&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;(gdb) si&lt;/SPAN&gt;' would appear to step over an instruction but it will not halt after the instruction was executed.&lt;/LI&gt;&lt;LI&gt;The previous OpenOCD config file was wrong. Here is a more proper one:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# configuration file for NXP i.MX8QM6 SoC&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# @20190903&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# guessed, updated and extended from imx8m.cfg&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# The iMX8QM6 SoC has the folowing cores that can be debug targets:&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;AP cluster 0: 4 x Cortex-A53&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;AP cluster 1: 2 x Cortex-A72&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;2 x Cortex-M4&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# &amp;nbsp;&amp;nbsp;&amp;nbsp;1 x Cortex-M4 - the SCU (System Control Unit)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# This configuration file considers that all 6 Application Processors (AP) are &lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# running in Hybrid Multiprocessing (HMP) mode.&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# With this configuration the following 4 targets are available in GDB:&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3333 - imx8qm6.aX &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;--- AP cores (all 6 of them in HMP mode)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3334 - imx8qm6.m4.scu &amp;nbsp;&amp;nbsp;&amp;lt;--- SCU&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3335 - imx8qm6.m4.0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# port 3336 - imx8qm6.m4.1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# '-defer-examine' may be used for targets that are not powered up&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPNAME] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME $CHIPNAME&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _CHIPNAME imx8qm6&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPCORES_A53] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a53 $CHIPCORES_A53&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a53 4&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists CHIPCORES_A72] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a72 $CHIPCORES_A72&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _cores_a72 2&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# CoreSight Debug Access Port&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists DAP_TAPID] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID $DAP_TAPID&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _DAP_TAPID 0x1890101d&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# the DAP tap&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -expected-id $_DAP_TAPID&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _CTINAME $_CHIPNAME.cti&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set _hmp_command "target smp"&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create a53 targets in CTI cluster 0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A53 {0x80410000 0x80510000 0x80610000 0x80710000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A53 {0x80420000 0x80520000 0x80620000 0x80720000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core_a53 0 } { $_core_a53 &amp;lt; $_cores_a53 } { incr _core_a53 } {&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; cti create $_CTINAME.a53.$_core_a53 -dap $_CHIPNAME.dap -ap-num 6 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A53 $_core_a53]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; target create $_CHIPNAME.a53.$_core_a53 aarch64 -coreid $_core_a53 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dap $_CHIPNAME.dap -dbgbase [lindex $DBGBASE_A53 $_core_a53] \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -cti $_CTINAME.a53.$_core_a53&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _hmp_command "$_hmp_command $_CHIPNAME.a53.$_core_a53"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create a72 targets in CTI cluster 1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set DBGBASE_A72 {0x80210000 0x80310000}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;set CTIBASE_A72 {0x80220000 0x80320000}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;for { set _core_a72 0 } { $_core_a72 &amp;lt; $_cores_a72 } { incr _core_a72 } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; cti create $_CTINAME.a72.$_core_a72 -dap $_CHIPNAME.dap -ap-num 6 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -ctibase [lindex $CTIBASE_A72 $_core_a72]&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; target create $_CHIPNAME.a72.$_core_a72 aarch64 -coreid $_core_a72 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -dap $_CHIPNAME.dap -dbgbase [lindex $DBGBASE_A72 $_core_a72] \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -cti $_CTINAME.a72.$_core_a72&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _hmp_command "$_hmp_command $_CHIPNAME.a72.$_core_a72"&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;eval $_hmp_command&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4 SCU core on AP #1&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.scu cortex_m -dap ${_CHIPNAME}.dap -ap-num 1&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4-0 core on AP #2&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.0 cortex_m -dap ${_CHIPNAME}.dap -ap-num 2&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# create SCU Cortex-M4-1 core on AP #3&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# did not tried this one&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.m4.1 cortex_m -dap ${_CHIPNAME}.dap -ap-num 3 \&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -defer-examine&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# AHB-AP for direct access to soc bus&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;target create ${_CHIPNAME}.ahb mem_ap -dap ${_CHIPNAME}.dap -ap-num 0&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;# default target&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;if { [info exists TARGETNAME] } {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _TARGETNAME $TARGETNAME&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;} else {&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; set _TARGETNAME $_CHIPNAME.a53.0&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;targets $_TARGETNAME&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;adapter_khz 4000&lt;/SPAN&gt;

&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;reset_config trst_and_srst&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2019 06:24:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debugging-iMX8QM6-with-OpenOCD-TAPID-mismatch-and-proper-mapping/m-p/941557#M140887</guid>
      <dc:creator>teodor_robas</dc:creator>
      <dc:date>2019-08-30T06:24:59Z</dc:date>
    </item>
  </channel>
</rss>

