<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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 debug nRF9160 using VSCode</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88714/unable-to-debug-nrf9160-using-vscode</link><description>SDK Version: 1.9.1 Tool Chain Version: 1.9.1 Cortex Debug Extension Version: v1.4.4 I&amp;#39;m unable to debug my nRF9160 project using VSCode Debugger Extension. The same project can be debugged with zero issues using Segger Embedded Studio . This leads me</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Wed, 15 Jun 2022 05:25:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88714/unable-to-debug-nrf9160-using-vscode" /><item><title>RE: Unable to debug nRF9160 using VSCode</title><link>https://test-devzone.nordicsemi.com/thread/372467?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 05:25:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ec1f56-5270-4827-a468-7b16fddf865e</guid><dc:creator>user113696</dc:creator><description>&lt;p&gt;I ran into this issue again but this time with the nrf9160dk. I notice this issue occurs every time the MCU hits a hardfault. For example, using Segger, I saw that my code hits a hardfault at&amp;nbsp;C:\ncs\v1.9.1\zephyr\arch\arm\core\aarch32\cortex_m\fault_s.S&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;SECTION_SUBSEC_FUNC(TEXT,__fault,z_arm_exc_spurious)

mrs r0, MSP
mrs r1, PSP
push {r0, lr}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If I debugged the same code&amp;nbsp;with the debugger in VSCode, the debugger will crash and hangs forever when this breakpoint is about to be hit.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to debug nRF9160 using VSCode</title><link>https://test-devzone.nordicsemi.com/thread/372448?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 18:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c572f1aa-1c66-4903-9f24-466c948ff3a5</guid><dc:creator>user101568</dc:creator><description>&lt;p&gt;I&amp;#39;m unable to debug at all. It&amp;#39;s a custom board using the nRF9160. I&amp;#39;m building on toolchain 2.0.0. Below is my output. The end result I get an error &amp;quot;&lt;span&gt;Failed to launch undefined GDB Server: Timeout.&amp;quot; I see the SEGGER J-Link GDB Server but it says at the bottom &amp;quot;waiting for GDB connection... and then it times out.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Below is the full output...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Reading symbols from c:\ncs\toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objdump.exe --syms -C -h -w c:\720-0068-00_200\trunk\design_files\F9160\APP\build\zephyr\merged.hex&lt;br /&gt;Reading symbols from c:/ncs\toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-nm.exe --defined-only -S -l -C -p c:\720-0068-00_200\trunk\design_files\F9160\APP\build\zephyr\merged.hex&lt;br /&gt;Launching GDB: &amp;quot;c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe&amp;quot; -q --interpreter=mi2 &amp;quot;c:\\720-0068-00_200\\trunk\\design_files\\F9160\\APP\\build\\zephyr\\merged.hex&amp;quot;&lt;br /&gt; Set &amp;quot;showDevDebugOutput&amp;quot;: true in your &amp;quot;launch.json&amp;quot; to see verbose GDB transactions here. Helpful to debug issues or report problems&lt;br /&gt;Launching gdb-server: &amp;quot;C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServer.exe&amp;quot; -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF9160_xxAA -select usb=504403659 -rtos &amp;quot;C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll&amp;quot;&lt;br /&gt; Please check TERMINAL tab (gdb-server) for output from C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServer.exe&lt;br /&gt;Finished reading symbols from objdump: Time: 88 ms&lt;br /&gt;Finished reading symbols from nm: Time: 87 ms&lt;br /&gt;Reading symbols from c:\720-0068-00_200\trunk\design_files\F9160\APP\build\zephyr\merged.hex...&lt;br /&gt;(No debugging symbols found in c:\720-0068-00_200\trunk\design_files\F9160\APP\build\zephyr\merged.hex)&lt;br /&gt;GNU gdb (Zephyr SDK 0.14.1) 9.2&lt;br /&gt;Copyright (C) 2020 Free Software Foundation, Inc.&lt;br /&gt;License GPLv3+: GNU GPL version 3 or later &amp;lt;gnu.org/.../gpl.html&amp;gt;&lt;br /&gt;This is free software: you are free to change and redistribute it.&lt;br /&gt;There is NO WARRANTY, to the extent permitted by law.&lt;br /&gt;Type &amp;quot;show copying&amp;quot; and &amp;quot;show warranty&amp;quot; for details.&lt;br /&gt;This GDB was configured as &amp;quot;--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi&amp;quot;.&lt;br /&gt;Type &amp;quot;show configuration&amp;quot; for configuration details.&lt;br /&gt;For bug reporting instructions, please see:&lt;br /&gt;&amp;lt;github.com/.../issues&amp;gt;.&lt;br /&gt;Find the GDB manual and other documentation resources online at:&lt;br /&gt; &amp;lt;www.gnu.org/.../&amp;gt;.&lt;/p&gt;
&lt;p&gt;For help, type &amp;quot;help&amp;quot;.&lt;br /&gt;Type &amp;quot;apropos word&amp;quot; to search for commands related to &amp;quot;word&amp;quot;.&lt;br /&gt;Failed to launch undefined GDB Server: Timeout.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6332.gdb.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to debug nRF9160 using VSCode</title><link>https://test-devzone.nordicsemi.com/thread/371558?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 07:36:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d7dfb90-5302-44aa-bdab-6a86d9cba388</guid><dc:creator>user113696</dc:creator><description>&lt;p&gt;Yes. The table here represents the result of my experiment&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application&lt;/td&gt;
&lt;td&gt;Board&lt;/td&gt;
&lt;td&gt;Can Debug via Vscode?&lt;/td&gt;
&lt;td&gt;Can Debug via Segger?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom Application&lt;/td&gt;
&lt;td&gt;Custom Board&lt;/td&gt;
&lt;td&gt;No, debugger hangs forever&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AT_Client&lt;/td&gt;
&lt;td&gt;Custom Board&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to debug nRF9160 using VSCode</title><link>https://test-devzone.nordicsemi.com/thread/371552?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 07:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bedca294-9050-4c77-8d9b-142b795d9132</guid><dc:creator>user108933</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;span&gt;I tried debugging one of sample, &amp;quot;nRF9160/AT Client&amp;quot;, and the same custom board can be debugged fine. &amp;#39;&amp;#39; You meant that you had no problem for AT client. So, the problem is when you try to run the custom application?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have been talking to VS code team regarding this issue. I will get back to you later.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&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></channel></rss>