<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unable to program nRF52840_DK, fails with error &amp;#39;&amp;#39;Cannot connect to J-Link.&amp;#39;&amp;#39;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106247/unable-to-program-nrf52840_dk-fails-with-error-cannot-connect-to-j-link</link><description>Hello. 
 When attempting to flash a &amp;quot;.hex&amp;quot; file on the nRF52840_DK I get the following error. What do I need to be address the error and be able to successfully program the flash? 
 The &amp;quot;nrfjprog --ids&amp;quot; successfully returns the ID of the board as &amp;#39;1050263398</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2024 02:04:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106247/unable-to-program-nrf52840_dk-fails-with-error-cannot-connect-to-j-link" /><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/465467?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 02:04:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d0c3bd3-f525-43d5-b6e4-f84c3341ef7a</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;The latest version of Virtualbox (7.0.14 r161095) with the corresponding Extension pack seems to not have the issue that I reported earlier. Thought it might help anyone who might experience similar issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/459065?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 18:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e4021f6-9c52-4a83-9a85-1002d60f7483</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;In the Ubuntu Virtualbox guest, the command line you shared is one I had used before, fails with the same error I posted earlier. This time I also removed the Virtualbox guest extension pack, and it still fails. Like before, the same command when run on Windows 11 works ok.&lt;/p&gt;
&lt;p&gt;I suppose, given the issue is not clearly in any one of Segger/JLink, nRF board, or Virtualbox, it might be harder to analyze. I am ok with the work around to copy the hex file to Windows 11 host, and program it there.&lt;/p&gt;
&lt;p&gt;As for debugging it, a quick test showed that I can run JLilnkGDBServer on Windows 11 (making sure it listens on all incoming connections on port 2331,2332, and 2333), and can connect from the Linux guest OS running in Virtualbox. Not optimal, but is do able.&lt;/p&gt;
&lt;p&gt;Thanks for your timely and&amp;nbsp; helpful response Jared. You may close this ticket or mark this as resolved.&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458940?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 11:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dad02f15-27c1-40bb-9888-b0f6c2e426f1</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;I understand. You mentioned that you are able to list the debugger with nrfjprog but not flash the hex. Are you able to do a recover?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;#39;nrfjprog --log zephyr.hex --sectoranduicrerase --verify -f NRF52 --snr 1050263398&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you try this instead, and share the log:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt; nrfjprog --program zephyr.hex --chiperase --verify --log&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I haven&amp;#39;t&amp;nbsp;been able to test this on virtual box yet but it worked on VMware&amp;nbsp;at least,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458796?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 16:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10d3f08-48e4-4fe1-a893-d857d0f0e0ed</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;Hi Jared.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The response&amp;nbsp;to my post on Segger support (&lt;a href="https://support.segger.com/#ticket/zoom/35021_"&gt;https://support.segger.com/#ticket/zoom/35021&lt;/a&gt;) is&amp;nbsp; as below. Essentially, it says I need to seek help from Nordic.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;You are using a J-Link OB which is an on-board debug probe for evaluation boards.&lt;/em&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;The J-Link OB is provided solely as part of an evaluation board.&lt;/em&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;It is not sold separately and may only be used to debug the device on the evaluation board it comes with.&lt;/em&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;Support is provided via the evaluation board manufacturer.&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;This article might help you to get up &amp;amp; running:&lt;/em&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;
&lt;div style="padding-left:30px;"&gt;
&lt;div style="padding-left:30px;"&gt;&lt;em&gt;&lt;a title="https://wiki.segger.com/J-Link_cannot_connect_to_the_CPU#J-Link_connection" href="https://wiki.segger.com/J-Link_cannot_connect_to_the_CPU#J-Link_connection" rel="nofollow noopener noreferrer" target="_blank"&gt;https://wiki.segger.com/J-Link_cannot_connect_to_the_CPU&lt;/a&gt;&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;/div&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;If you need any additional help, we would suggest to get in touch with Nordic&lt;/em&gt;&lt;br /&gt;&lt;span class="js-signatureMarker"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div data-signature="true" data-signature-id="4"&gt;
&lt;div&gt;I suppose this this could mean the issue is tied to the USB interface exposed by the nRF52840-DK, not the JLink interface itself that is exposed.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;How could I debug this further? If it help recreate the scenario, the configuration I have is: Windows 11 host OS, Virtualbox 7.0.12 with extension pack + USB 2.0 emulation, Ubuntu 22.04 guest OS, JLink 7.94.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Regards.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458740?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 13:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfda526e-49d6-485a-b72a-c7f59c544ab6</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, I think you should post this on the &lt;a href="https://forum.segger.com/"&gt;Segger &lt;/a&gt;Forum, they would be able to support you better on this issue,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458584?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 19:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d5a1dc4-a683-402e-b645-68cb36d342cd</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;Hello.&lt;br /&gt;&lt;br /&gt;The problem seems to be with the Virtualbox setup that I have for running Linux. I have tried using the USB 1.0, 2,0, and 3.0 emulation, and with the Virtualbox extenstion pack installed. The Segger JLink is identified by &amp;quot;lsusb&amp;quot;, and &amp;quot;nrfjprog --ids&amp;quot; reports the correct serial number, the serial ports are also ok when once the app is installed, so are the couple of Bluetooth examples.&lt;/p&gt;
&lt;p&gt;However, to flash the FW/app it seems only the host OS (Windows 11) is able to do so with the nrfjprog. This does give me a work around to flash the image, but not for the ability to use GDB over JLink&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyone might have any clue why Virtiualbox might have a problem? The setup seems to have worked well for quite some time now with other USB devices importted into the Linux guest machine. Also, per&amp;nbsp;&lt;a id="" href="https://wiki.segger.com/J-Link_on_VirtualBox"&gt;https://wiki.segger.com/J-Link_on_VirtualBox&lt;/a&gt;&amp;nbsp;the config is supported. Will check if there is support forum for Segger.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Arun.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458573?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 16:06:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75189fc2-958f-42ea-9fa6-28617387d456</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I checked the list you pointed to. Following is my response to each point:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Does the device show up in Device Manager on your computer? Please try to connect and disconnect the kit a few times. It might show up with unexpected names.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Yes, the SEGGER USB device is listed in the output of &amp;quot;lsusb&amp;quot; command. And yes, I have power cycled the board many times now.&lt;br /&gt;&lt;br /&gt;Also, a MSD gets mounted on the Linux host, and I see &amp;quot;README.TXT&amp;quot; and &amp;quot;SEGGER.HTML&amp;quot; files with expected contents.&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;Like I mentioned before, I see the LED1 blink, which I suppose means some default sample program on the board is running on it, is this correct?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Have you tried a different USB cable? Faulty cables are surprisingly often the problem. Have you tried using a different computer? If it works on a different computer we know that the kit is not broken and that it is probably a driver issue.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Yes, I have changed three USB cables, each of which I know works with other devices that I have. Note also that like I mentioned earlier, &amp;quot;nrfjprog --ids&amp;quot; does list the board, so the board is accessible.&lt;br /&gt;&lt;br /&gt;The board is connected to a powered USB hub which seems to work well with many other devices. I have changed to another powered USB hub, but the same result.&lt;br /&gt;&lt;br /&gt;I do not have another computer to try to find one where I can try this. &lt;span style="text-decoration:underline;"&gt;But shouldn&amp;#39;t all the other inputs here be sufficient to say the host side as well as the USB hub/cables are ok?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Have you tried to press the IF BOOT/RESET button while power cycling the kit? It should then show up as a Removable Storage Device named &amp;quot;BOOTLOADER&amp;quot;. Then you can drag-and-drop the J-LINK interface MCU firmware found&amp;nbsp;&lt;a title="J-LINK Interface MCU firmware" href="https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK/Download#infotabs" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;&amp;nbsp;(v170724) onto the storage device to reprogram the JLINK firmware.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;When I press&amp;nbsp;the reset button while the board is connected and powered on, I see the LED1 switch off until I release the reset button.&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;When I keep the reset button pressed and power on the board, then release the reset button 10 seconds after&amp;nbsp;powering on, the board does not enter the bootloader. The MSD&amp;nbsp; Instead the LED1 starts to blink, which I presume to mean &lt;strong&gt;the board did not enter the bootloader, is this correct? Shouldn&amp;#39;t this work at least?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;i downloaded the &amp;quot;j-link-ob-sam3u128-v2-nordicsemi-170724.bin&amp;quot; file, and copied it to the MSD that gets mounted as &amp;quot;/media/user/JLINK&amp;quot;. But a file &amp;quot;FAIL.TXT&amp;quot; gets created with contents &amp;quot;&lt;em&gt;The currently active SWD interface does not support MSD drag and drop&lt;/em&gt;&amp;quot;. Am I doing something wrong?&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Have you measured the supply voltage on the kit? It should be somewhere between 2.8V-3.3V. If it isn&amp;#39;t, then the hardware is probably broken.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;The board is powered from USB, all other observations would seem to mean the power is ok, isn&amp;#39;t this reasonable assumption?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Have you made sure that you are using the latest J-Link driver version?&lt;/em&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;I downloaded the current version of Segger SW, which per output of &amp;quot;nrfjprog --ids&amp;quot; is at &amp;quot;7.9.4&amp;quot;.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Have you tried this guide?&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/blogs/16/recover-the-nrf51-when-nrjprog-and-nrfgo-studio-co/"&gt;https://devzone.nordicsemi.com/blogs/...&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &amp;quot;JLinkExe&amp;quot; comnand outputs &amp;quot;Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.&amp;quot;. So cannot try anything else.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The board is new, it was delivered yesterday.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458525?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 13:26:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47355dcb-2902-4ef3-b2af-9f7e5bf1c789</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you go through this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24592/my-nrf52-nrf51-dk-kit-doesn-t-work"&gt;checklist&lt;/a&gt;&amp;nbsp;and see if any of them resolves your issue?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458521?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 13:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53ac1086-897b-428d-8a4b-96c710feabfe</guid><dc:creator>CapAble</dc:creator><description>&lt;p&gt;Hi Jared.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The board is as it was delivered, no modifications to it.&lt;/li&gt;
&lt;li&gt;Settings of the switches
&lt;ul&gt;
&lt;li&gt;SW6: I have left it at default, and LED5 lights up. If it is at nRF only then the&amp;nbsp;LED does not light and the board does not show up on the Linux host. Also, LED1 blinks (fades in and out).&lt;/li&gt;
&lt;li&gt;SW8: is on, else the LED5 does not light.&lt;/li&gt;
&lt;li&gt;SW9: is on VDD position, else LED5 does not light.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without the above settings, the board does not show up the Linux host (output of &amp;#39;lsusb&amp;#39; command), and the &amp;quot;nrfprog --ids&amp;#39; does not list the board ID. The command &amp;#39;nrfjprog --program ./build/zephyr/zephyr.hex --sectoranduicrerase --verify -f NRF52 --snr 1050263398 --log mylog&amp;#39; fails as before, and there is nothing in the log file.&lt;/p&gt;
&lt;p&gt;If it is relevant, I see /dev/ttyACM0 and /dev.ttyACM1 show up, but I do not see any output on them at 11500 bps &amp;amp; no parity.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Arun,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to program nRF52840_DK, fails with error ''Cannot connect to J-Link.''</title><link>https://devzone.nordicsemi.com/thread/458472?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 10:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba53fab-ac54-4dad-91f3-7455345f5e00</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you done any modifications to the development kit such as soldering or cutting any solder bridge?&lt;/p&gt;
&lt;p&gt;How is the different switches such as SW9, SW8, SW6 configured?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>