<?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 Random errors when debugging remotely in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Random-errors-when-debugging-remotely/m-p/936674#M4351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm trying to set up a raspberry pi to enable debugging over IP for a FRDM k64, but I've run into an issue in both KDS and MCUX. I haven't been able to find any resources that mention the specific issue I'm having, so I'm hoping someone here can shed some light on the situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso 10.3.1 and Kinetis Design Studio 3.2.0.&lt;/P&gt;&lt;P&gt;The raspberry pi is connected to the k64 via USB and is running JLinkGDBServer with the following&amp;nbsp;parameters&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;sudo ./JLinkGDBServer -device MK64FN1M0xxx12 -endian little -if SWD -speed 4000 -select USB -noir -noLocalhostOnly -log ./jlink.log -nohalt -vd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the board plugged in directly to my PC, JLink debugging works perfectly. On the Pi,&amp;nbsp;&lt;SPAN&gt;JLinkGDBServer&amp;nbsp;runs without error. However, when attempting to connect to the Pi as a remote debugger, MCUXpresso and KDS will sometimes work, but often (on seemingly random occasions) error out and fail to initialize the debug session.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error shown in both is always the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Error in final launch sequence&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Failed to execute MI command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -target-select remote 172.16.22.225:2331&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Error message from debugger back end:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Unknown remote qXfer reply: OK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Unknown remote qXfer reply: OK&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've investigated this but have been unable to determine the cause. The only reference to this that I've found online is &lt;A _jive_internal="true" href="https://community.nxp.com/thread/447820"&gt;this forum post&lt;/A&gt;, but the scenario is different (and the accepted solution does not seem to be applicable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After recording some logs from the server, I found no obvious errors, but a slight difference in the sequence of events when the client connects. Interestingly, all successful runs share the same pattern, and likewise for all unsuccessful runs. The differences are shown in red.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef; height: 25px;"&gt;&lt;TH style="width: 10%; height: 25px;"&gt;Success (KDS)&lt;/TH&gt;&lt;TH style="width: 87%; height: 25px;"&gt;Failure&amp;nbsp;&lt;SPAN style="background-color: #efefef; font-weight: bold;"&gt;(KDS)&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="height: 326px;"&gt;&lt;TD style="width: 10%; height: 326px;"&gt;Connected to 172.16.120.208&lt;BR /&gt;+$qSupported:multiprocess+;qRelocInsn+#2a&lt;BR /&gt;+&lt;BR /&gt;$PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+#b1&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;+&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$Hg0#df&lt;/SPAN&gt;&lt;BR /&gt;$OK#9a&lt;BR /&gt;$qXfer:features:read:target.xml:0,fff#7d&lt;BR /&gt;$m&amp;lt;?xml version="1.0"?&amp;gt;&lt;/TD&gt;&lt;TD style="width: 87%; height: 326px;"&gt;Connected to 172.16.120.208&lt;BR /&gt;+$qSupported:multiprocess+;qRelocInsn+#2a&lt;BR /&gt;+&lt;BR /&gt;$PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+#b1&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;+&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$Hg0#df&lt;/SPAN&gt;$qXfer:features:read:target.xml:0,fff#7d&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$OK#9a&lt;/SPAN&gt;&lt;BR /&gt;$m&amp;lt;?xml version="1.0"?&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two complete logs are attached, for one successful and one unsuccessful run using KDS.&lt;/P&gt;&lt;P&gt;Note that for the failed attempt, remotetimeout was set to 10 seconds in the launch configuration for the GDB client.&amp;nbsp;This increased the delay before the error was thrown but did not have any other notable effect.&lt;/P&gt;&lt;P&gt;Further note that I have dismissed &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;JLINK_GetHWStatus(...)&lt;/SPAN&gt; as the culprit, since there are failure cases in which it&amp;nbsp;does not not run at all during the initial connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has seen this or has advice for how to avoid this inconsistent error behavior, I'd love to hear it! I can provide additional logs as well if that's helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;As a side note, when I initially tried to configure remote debugging on MCUX, I found that the debug config editor never updated the launch file's&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;"org.eclipse.cdt.debug.gdbjtag.core.ipAddress" &lt;/SPAN&gt;value, so I had to manually correct it. It kept trying to use localhost:2331, which failed since I disabled gdbserver locally. I don't know if I just missed a config parameter or if that's the intended behavior, but it held me up for a&amp;nbsp;while.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;Additionally: With certain specific settings enabled in MCUX (eg &lt;A href="https://mcuoneclipse.com/2019/03/02/remote-debugging-with-usb-based-jtag-swd-debug-probes/#comment-140315"&gt;nonstop debug mode&lt;/A&gt;), the Unknown remote qXfer reply error is thrown 100% of the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jun 2019 18:31:15 GMT</pubDate>
    <dc:creator>twyatt</dc:creator>
    <dc:date>2019-06-17T18:31:15Z</dc:date>
    <item>
      <title>Random errors when debugging remotely</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Random-errors-when-debugging-remotely/m-p/936674#M4351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm trying to set up a raspberry pi to enable debugging over IP for a FRDM k64, but I've run into an issue in both KDS and MCUX. I haven't been able to find any resources that mention the specific issue I'm having, so I'm hoping someone here can shed some light on the situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso 10.3.1 and Kinetis Design Studio 3.2.0.&lt;/P&gt;&lt;P&gt;The raspberry pi is connected to the k64 via USB and is running JLinkGDBServer with the following&amp;nbsp;parameters&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;sudo ./JLinkGDBServer -device MK64FN1M0xxx12 -endian little -if SWD -speed 4000 -select USB -noir -noLocalhostOnly -log ./jlink.log -nohalt -vd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the board plugged in directly to my PC, JLink debugging works perfectly. On the Pi,&amp;nbsp;&lt;SPAN&gt;JLinkGDBServer&amp;nbsp;runs without error. However, when attempting to connect to the Pi as a remote debugger, MCUXpresso and KDS will sometimes work, but often (on seemingly random occasions) error out and fail to initialize the debug session.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error shown in both is always the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Error in final launch sequence&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Failed to execute MI command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; -target-select remote 172.16.22.225:2331&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Error message from debugger back end:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Unknown remote qXfer reply: OK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; Unknown remote qXfer reply: OK&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've investigated this but have been unable to determine the cause. The only reference to this that I've found online is &lt;A _jive_internal="true" href="https://community.nxp.com/thread/447820"&gt;this forum post&lt;/A&gt;, but the scenario is different (and the accepted solution does not seem to be applicable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After recording some logs from the server, I found no obvious errors, but a slight difference in the sequence of events when the client connects. Interestingly, all successful runs share the same pattern, and likewise for all unsuccessful runs. The differences are shown in red.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef; height: 25px;"&gt;&lt;TH style="width: 10%; height: 25px;"&gt;Success (KDS)&lt;/TH&gt;&lt;TH style="width: 87%; height: 25px;"&gt;Failure&amp;nbsp;&lt;SPAN style="background-color: #efefef; font-weight: bold;"&gt;(KDS)&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="height: 326px;"&gt;&lt;TD style="width: 10%; height: 326px;"&gt;Connected to 172.16.120.208&lt;BR /&gt;+$qSupported:multiprocess+;qRelocInsn+#2a&lt;BR /&gt;+&lt;BR /&gt;$PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+#b1&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;+&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$Hg0#df&lt;/SPAN&gt;&lt;BR /&gt;$OK#9a&lt;BR /&gt;$qXfer:features:read:target.xml:0,fff#7d&lt;BR /&gt;$m&amp;lt;?xml version="1.0"?&amp;gt;&lt;/TD&gt;&lt;TD style="width: 87%; height: 326px;"&gt;Connected to 172.16.120.208&lt;BR /&gt;+$qSupported:multiprocess+;qRelocInsn+#2a&lt;BR /&gt;+&lt;BR /&gt;$PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+#b1&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;+&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$QStartNoAckMode#b0&lt;/SPAN&gt;&lt;BR /&gt;$OK#9a&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;+$Hg0#df&lt;/SPAN&gt;$qXfer:features:read:target.xml:0,fff#7d&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;$OK#9a&lt;/SPAN&gt;&lt;BR /&gt;$m&amp;lt;?xml version="1.0"?&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two complete logs are attached, for one successful and one unsuccessful run using KDS.&lt;/P&gt;&lt;P&gt;Note that for the failed attempt, remotetimeout was set to 10 seconds in the launch configuration for the GDB client.&amp;nbsp;This increased the delay before the error was thrown but did not have any other notable effect.&lt;/P&gt;&lt;P&gt;Further note that I have dismissed &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;JLINK_GetHWStatus(...)&lt;/SPAN&gt; as the culprit, since there are failure cases in which it&amp;nbsp;does not not run at all during the initial connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has seen this or has advice for how to avoid this inconsistent error behavior, I'd love to hear it! I can provide additional logs as well if that's helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;As a side note, when I initially tried to configure remote debugging on MCUX, I found that the debug config editor never updated the launch file's&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;"org.eclipse.cdt.debug.gdbjtag.core.ipAddress" &lt;/SPAN&gt;value, so I had to manually correct it. It kept trying to use localhost:2331, which failed since I disabled gdbserver locally. I don't know if I just missed a config parameter or if that's the intended behavior, but it held me up for a&amp;nbsp;while.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;Additionally: With certain specific settings enabled in MCUX (eg &lt;A href="https://mcuoneclipse.com/2019/03/02/remote-debugging-with-usb-based-jtag-swd-debug-probes/#comment-140315"&gt;nonstop debug mode&lt;/A&gt;), the Unknown remote qXfer reply error is thrown 100% of the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2019 18:31:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Random-errors-when-debugging-remotely/m-p/936674#M4351</guid>
      <dc:creator>twyatt</dc:creator>
      <dc:date>2019-06-17T18:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Random errors when debugging remotely</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Random-errors-when-debugging-remotely/m-p/936675#M4352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because of you are using the Segger firmware and an external hardware as debugger (Raspberry Pi), I'd say this seems to be an error on the JLink commands not in the MCUXpresso IDE or the MCU by itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I highly recommend you to contact Segger support to see if they have more information regarding this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.segger.com/support/technical-support/"&gt;https://www.segger.com/support/technical-support/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the inconvenience this may cause you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2019 21:58:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Random-errors-when-debugging-remotely/m-p/936675#M4352</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2019-06-19T21:58:53Z</dc:date>
    </item>
  </channel>
</rss>

