<?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 Debugger Fail to Connect in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Debugger-Fail-to-Connect/m-p/702313#M43161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;I am creating a custom bootloader for a k64 microcontroller on a custom board. Software is coded using Kinetis SDK 2.0, and I am debugging using Segger J-Link. This is my first attempt in creating a custom bootloader, and mistakes have been made.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;fter attempting to jump to user app the system crashed, and I lost the debug connection completely, and received this error message when attempting to reconnect: "J-Link GDB Server failed: Could not connect to target. Please check if target is powered and if ribbon cable is plugged properly". I suspect that when restarting the system, the same crash occurs and prevents the debugger to ever make the connection. I was able to restore the connection by using reset strategy 2 (this option will reset the controller by pulling the reset pin low, and halt the program execution ). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;I read that the debug connection may be lost if the cpu executes random code. I verified that the user application was correctly written to flash, and made another attempt. The jump to the reset handler of the user app was made correctly, and even made it to main. However, when calling BOARD_BootClockRUN() the system crashed again (this was the second time this function was called, as the bootloader does it as well). The debug connection was lost again, but now I am not able to restore it. Scoping the reset pin verifies that the pin is correctly toggled low by the debugger, but still not able to connect. I have also tried all the other reset strategies, and another J-link adapter, without success. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Atm, there is no other way to flash another application to the controller than using the debugger. I can really use some help to get it working again. Also, can anyone explain why this is happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2017 09:19:11 GMT</pubDate>
    <dc:creator>andreastornes</dc:creator>
    <dc:date>2017-09-13T09:19:11Z</dc:date>
    <item>
      <title>Debugger Fail to Connect</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Debugger-Fail-to-Connect/m-p/702313#M43161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;I am creating a custom bootloader for a k64 microcontroller on a custom board. Software is coded using Kinetis SDK 2.0, and I am debugging using Segger J-Link. This is my first attempt in creating a custom bootloader, and mistakes have been made.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;fter attempting to jump to user app the system crashed, and I lost the debug connection completely, and received this error message when attempting to reconnect: "J-Link GDB Server failed: Could not connect to target. Please check if target is powered and if ribbon cable is plugged properly". I suspect that when restarting the system, the same crash occurs and prevents the debugger to ever make the connection. I was able to restore the connection by using reset strategy 2 (this option will reset the controller by pulling the reset pin low, and halt the program execution ). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;I read that the debug connection may be lost if the cpu executes random code. I verified that the user application was correctly written to flash, and made another attempt. The jump to the reset handler of the user app was made correctly, and even made it to main. However, when calling BOARD_BootClockRUN() the system crashed again (this was the second time this function was called, as the bootloader does it as well). The debug connection was lost again, but now I am not able to restore it. Scoping the reset pin verifies that the pin is correctly toggled low by the debugger, but still not able to connect. I have also tried all the other reset strategies, and another J-link adapter, without success. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #f2f2f5; font-size: 14px;"&gt;Atm, there is no other way to flash another application to the controller than using the debugger. I can really use some help to get it working again. Also, can anyone explain why this is happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 09:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Debugger-Fail-to-Connect/m-p/702313#M43161</guid>
      <dc:creator>andreastornes</dc:creator>
      <dc:date>2017-09-13T09:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger Fail to Connect</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Debugger-Fail-to-Connect/m-p/702314#M43162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved by executing J-link script from&amp;nbsp;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/439921?commentID=857127#comment-857127"&gt;https://community.nxp.com/thread/439921?commentID=857127#comment-857127&lt;/A&gt;. This board does not have a reset button, but it worked by applying power to the board just as the script started.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Many thanks to the NXP support team for finding the solution!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 06:31:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Debugger-Fail-to-Connect/m-p/702314#M43162</guid>
      <dc:creator>andreastornes</dc:creator>
      <dc:date>2017-09-14T06:31:18Z</dc:date>
    </item>
  </channel>
</rss>

