<?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>nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92875/nrf52840-dongle-debug-with-jlink-internal-or-external-in-ncs-2-1-0</link><description>Hi guys, 
 As I want to debug on my nRF52840 Dongle with a Debugger, my first step was to connect it with internal segger OB JLINK integrated into nRF52840DK. This was not efficient, and I was not able to debug using the usual and suggested configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Oct 2022 10:43:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92875/nrf52840-dongle-debug-with-jlink-internal-or-external-in-ncs-2-1-0" /><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/392790?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 10:43:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d1306c2-7624-45df-8861-cee6bd5f2bfe</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again Enrico,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try to sum up your issue. Maybe it&amp;#39;s easier to answer the following questions:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- Have you managed to program any application to the dongle. Please test with very simple application for example blinky.&lt;/p&gt;
&lt;p&gt;- If you can flash the blinky application, did the blinky work ? (LED blink ?)&lt;/p&gt;
&lt;p&gt;- Have you managed to flash the bootloader on the dongle ? Which bootloader you used ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Please state step by step how you run the debugger ? Which GDB server you used ?&amp;nbsp; Have you configure the board for debugging. You need to select this :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/7510.pastedimage1666867632761v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/392309?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 08:09:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18ebd6ad-e020-4de9-842f-a00e85d3d4cd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Enrico,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please be aware that the dongle is not a development board, it&amp;#39;s more of a end device for nRF Connect and the nRF Sniffer&amp;nbsp;please find the following in &lt;a href="https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle"&gt;the documentation:&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&amp;quot;&amp;nbsp;&lt;span&gt;For other use cases please do note that there is no debug support on the Dongle, only support for programming the device and communicating through USB.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After you managed to flash bootloader, next step is to try erase everything and flash a simple application for example blinking LED.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After you have the LED blink correctly, you can start debugging.&amp;nbsp;I assume you will use GDB for debug ?&amp;nbsp;&lt;br /&gt;Make sure you select debug option when you build the application.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/392205?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 14:31:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed74db77-10b4-45e3-81d9-babf3875a614</guid><dc:creator>enpre</dc:creator><description>&lt;p&gt;Hi Hung,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using nRF programmer tool I can write and read to Dongle.&lt;br /&gt;I tested for example flasing the original bootloader, thus, jlink is working properly.&lt;br /&gt;&lt;br /&gt;The problems remain during debugging and also trying to flash an application.&lt;br /&gt;How can I go on this issue ? Using a professional and common debugger as JLink is fundamental for companies which builts a lot of custom board on your devices... and that&amp;#39;s why I need to debug well dongle before going on production stages.&lt;br /&gt;&lt;br /&gt;thank you so much Hung, waiting for your support!&lt;br /&gt;Enrico&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/391106?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 08:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16accb4a-9146-464b-912b-944b0fed612e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Enrico,&amp;nbsp;&lt;br /&gt;I don&amp;#39;t think trying to debug zephyr application would be a good idea to test.&amp;nbsp;&lt;br /&gt;Please try to test by just reading and writing&amp;nbsp; /erasing to a location in the memory of the dongle to make sure you can write to it.&amp;nbsp;&lt;br /&gt;What I would suggest&amp;nbsp;is to write something to the PCA10056 , for example blinky firmware. Let it blink. Just to make sure you don&amp;#39;t erase the wrong chip and you are actually working with the dongle instead of the PCA10056.&amp;nbsp;&lt;br /&gt;After that you can start either by Jlink Commander or by nrfjprog.exe I would suggest nrfjprog.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can try to do a nrfjprog --eraseall , or nrfjprog --memrd or nrfjprog --memwr to test.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;After you have verify that you can erase, write to the dongle, you can start testing with debugging an application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/391026?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 14:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8522479d-f170-4a49-9e70-1697f2ee50f8</guid><dc:creator>enpre</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried with VBUS = 5V (powering the dongle with USB).&lt;br /&gt;&lt;br /&gt;What I read is this on the terminal VSCode Side:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;Feature(s): GDB
Checking target voltage...
Target voltage: 1.83 V
Listening on TCP/IP port 50000
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000578 (Data = 0x0000E7FE)
Read 2 bytes @ address 0x00000578 (Data = 0xE7FE)
Loading RTOS plugin: C:\Program Files\SEGGER\JLink\GDBServer\RTOSPlugin_Zephyr.dll...
RTOS plugin load failed (Error 193, %1 is not a valid Win32 application.).
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x00000578)
Received monitor command: reset
Resetting target
Downloading 16256 bytes @ address 0x00001000
Downloading 16208 bytes @ address 0x00004F80
Downloading 16224 bytes @ address 0x00008ED0
Downloading 12752 bytes @ address 0x0000CE30
Downloading 16128 bytes @ address 0x00010000
Downloading 16000 bytes @ address 0x00013F00
Downloading 15984 bytes @ address 0x00017D80
Downloading 16048 bytes @ address 0x0001BBF0
Downloading 1376 bytes @ address 0x0001FAA0
Downloading 16032 bytes @ address 0x00020000
Downloading 16032 bytes @ address 0x00023EA0
Downloading 16000 bytes @ address 0x00027D40
Downloading 16016 bytes @ address 0x0002BBC0
Downloading 1456 bytes @ address 0x0002FA50
Downloading 15968 bytes @ address 0x00030000
Downloading 15984 bytes @ address 0x00033E60
Downloading 16032 bytes @ address 0x00037CD0
Downloading 16064 bytes @ address 0x0003BB70
Downloading 1488 bytes @ address 0x0003FA30
Downloading 16112 bytes @ address 0x00040000
Downloading 16272 bytes @ address 0x00043EF0
Downloading 11912 bytes @ address 0x00047E80
Comparing flash   [....................] Done.
Writing register (PC = 0x   1a414)
Received monitor command: reset
Resetting target
Read 4 bytes @ address 0x0001A414 (Data = 0x49132000)
Read 2 bytes @ address 0x0001A414 (Data = 0x2000)
Reading 64 bytes @ address 0x0003B980
Read 2 bytes @ address 0x0003B9C0 (Data = 0xB002)
Reading 64 bytes @ address 0x0003C7C0
Read 2 bytes @ address 0x0003C7CE (Data = 0x4040)
Read 2 bytes @ address 0x0001250C (Data = 0xB5F0)
Reading register (MSP = 0x20040000)
Reading register (PSP = 0x       0)
Reading register (PRIMASK = 0x       0)
Reading register (BASEPRI = 0x       0)
Reading register (FAULTMASK = 0x       0)
Reading register (CONTROL = 0x       0)
Reading register (FPSCR = 0x       0)
Reading register (s0 = 0x       0)
Reading register (s1 = 0x       0)
Reading register (s2 = 0x       0)
Reading register (s3 = 0x       0)
Reading register (s4 = 0x       0)
Reading register (s5 = 0x       0)
Reading register (s6 = 0x       0)
Reading register (s7 = 0x       0)
Reading register (s8 = 0x       0)
Reading register (s9 = 0x       0)
Reading register (s10 = 0x       0)
Reading register (s11 = 0x       0)
Reading register (s12 = 0x       0)
Reading register (s13 = 0x       0)
Reading register (s14 = 0x       0)
Reading register (s15 = 0x       0)
Reading register (s16 = 0x       0)
Reading register (s17 = 0x       0)
Reading register (s18 = 0x       0)
Reading register (s19 = 0x       0)
Reading register (s20 = 0x       0)
Reading register (s21 = 0x       0)
Reading register (s22 = 0x       0)
Reading register (s23 = 0x       0)
Reading register (s24 = 0x       0)
Reading register (s25 = 0x       0)
Reading register (s26 = 0x       0)
Reading register (s27 = 0x       0)
Reading register (s28 = 0x       0)
Reading register (s29 = 0x       0)
Reading register (s30 = 0x       0)
Reading register (s31 = 0x       0)
Reading register (d0 = 0x       0)
Reading register (d1 = 0x       0)
Reading register (d2 = 0x       0)
Reading register (d3 = 0x       0)
Reading register (d4 = 0x       0)
Reading register (d5 = 0x       0)
Reading register (d6 = 0x       0)
Reading register (d7 = 0x       0)
Reading register (d8 = 0x       0)
Reading register (d9 = 0x       0)
Reading register (d10 = 0x       0)
Reading register (d11 = 0x       0)
Reading register (d12 = 0x       0)
Reading register (d13 = 0x       0)
Reading register (d14 = 0x       0)
Reading register (d15 = 0x       0)
Setting breakpoint @ address 0x0001250C, Size = 2, BPHandle = 0x0001
Setting breakpoint @ address 0x0003B9C0, Size = 2, BPHandle = 0x0002
Setting breakpoint @ address 0x0003C7CE, Size = 2, BPHandle = 0x0003
Starting target CPU...
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but nothing happens.............. and breakpoints are not working.&lt;/p&gt;
&lt;p&gt;To the Debug Console Side I can see this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;Cortex-Debug: VSCode debugger extension version 1.6.6 git(9844153). Usage info: https://github.com/Marus/cortex-debug#usage
Warn: c:/2BiTS/progetti/ShockTest/iotnode/build_dongle/zephyr/zephyr.hex is not an ELF file format. Some features won&amp;#39;t work -- Globals, Locals, disassembly, etc.Launching GDB: &amp;quot;c:\\ncs\\toolchains\\v2.1.0-rc2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe&amp;quot; -q --interpreter=mi2
   
    IMPORTANT: Set &amp;quot;showDevDebugOutput&amp;quot;: &amp;quot;raw&amp;quot; in &amp;quot;launch.json&amp;quot; to see verbose GDB transactions here. Very helpful to debug issues or report problems
Launching gdb-server: &amp;quot;C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe&amp;quot; -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52840_xxAA -select usb=51017173 -rtos &amp;quot;C:\\Program Files\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll&amp;quot;
   
    Please check TERMINAL tab (gdb-server) for output from C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe

0x00000578 in ?? ()
Program stopped, probably due to a reset and/or halt issued by debugger
add symbol table from file &amp;quot;c:/2BiTS/progetti/ShockTest/iotnode/build_dongle/zephyr/zephyr.elf&amp;quot;
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/2BiTS/progetti/ShockTest/iotnode/build_dongle/zephyr/zephyr.elf...


2 Resetting target&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;this is the only think I can see...&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another question,&amp;nbsp;in the guide there&amp;#39;s the indication in order to maintain the original bootloader on the device.&lt;br /&gt;Is it necessary if I use an external debugger ?&lt;br /&gt;&lt;br /&gt;I ask this because if I flash from scratch my application, using the jlink and the nordic programmer tool, my application doesn&amp;#39;t start.....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle Debug with JLINK (Internal or External) in NCS 2.1.0</title><link>https://devzone.nordicsemi.com/thread/390922?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 08:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fea4603d-fd3a-4757-8061-a8e1e14bde9b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Enrico,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The dongle was designed to run on 5V if you supply it via the VBUS.&amp;nbsp;&lt;br /&gt;Could you try to connect 5V to VBUS instead of VDD which is 3.7&lt;/p&gt;
&lt;p&gt;Another option is to connect 3.7V to VDD_NRF which is on pin 1 of the P1 header on the back side of the dongle.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>