<?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>Visual Studio code GDB debugger debugs SPM and sometimes not my application</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/87872/visual-studio-code-gdb-debugger-debugs-spm-and-sometimes-not-my-application</link><description>Setup Visual Studio Code and installed the toolchain manager stuff got 1.9.1 of the SDK and the command line stuff for my windows 10 machine (if that matters). And trying to debug the blinky example on my nrf53 DK board. Selected the NS version of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Tue, 17 May 2022 15:17:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/87872/visual-studio-code-gdb-debugger-debugs-spm-and-sometimes-not-my-application" /><item><title>RE: Visual Studio code GDB debugger debugs SPM and sometimes not my application</title><link>https://test-devzone.nordicsemi.com/thread/368165?ContentTypeID=1</link><pubDate>Tue, 17 May 2022 15:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:078b1ec0-4be7-4c8b-a9e7-57e6ceff43d6</guid><dc:creator>user76103</dc:creator><description>&lt;p&gt;I got my environment working.&amp;nbsp; I&amp;#39;m not sure what was causing the problems I was seeing.&amp;nbsp; Debugging to my application was intermittent (worked some days and not others).&amp;nbsp; Then got &amp;quot;not valid elf file&amp;quot; warnings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I had tried uninstalling Visual Studio Code and uninstalling the nordic stuff but that wasn&amp;#39;t cleaning out the system.&amp;nbsp; Reinstall visual studio code and all the extensions were already there.&amp;nbsp; Also removal and reinstall of the extensions didn&amp;#39;t fix anything.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;What DID fix my problems was to uninstall Visual Studio code, and uninstall all the nordic stuff.&amp;nbsp; Delete the install directory for the SDK (where ever you chose to put it).&amp;nbsp; Finally before re-installing anything, delete:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;%UserProfile%&lt;/strong&gt;\.vscode&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;%AppData%&lt;/strong&gt;\nrfconnect&lt;/p&gt;
&lt;p&gt;When uninstalling things, these 2 directories and the SDK directory did not get removed.&amp;nbsp; And I assume something got messed up in there.&amp;nbsp; After deleting those directories and reinstalling things as per the standard setup instructions, everything is working.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope that helps someone else.&amp;nbsp; It caused me weeks of headache.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio code GDB debugger debugs SPM and sometimes not my application</title><link>https://test-devzone.nordicsemi.com/thread/367883?ContentTypeID=1</link><pubDate>Fri, 13 May 2022 15:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4144f3a8-52c0-4834-9444-42eef2a429a5</guid><dc:creator>user76103</dc:creator><description>&lt;p&gt;At the moment it&amp;#39;s working as you describe.&amp;nbsp; There were a couple days where spm_jump() wasn&amp;#39;t jumping into my application and I am not sure why.&amp;nbsp; But it&amp;#39;s working as you describe now.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But even with the unmodified blinky example, I&amp;#39;m getting: Not a valid ELF file &amp;quot;executable&amp;quot;: &amp;quot;c:/git\ZBS01\Test2\blinky2\build\zephyr\merged.hex&amp;quot;. Many debug functions may not work&lt;/p&gt;
&lt;p&gt;That&amp;#39;s not normal is it?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Warn: c:/git\ZBS01\Test2\blinky2\build\zephyr\merged.hex is not an ELF file format. Some features won&amp;#39;t work -- Globals, Locals, disassembly, etc.Launching GDB: &amp;quot;c:\\Users\\sminnick\\ncs\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe&amp;quot; -q --interpreter=mi2 &amp;quot;c:/git\\ZBS01\\Test2\\blinky2\\build\\zephyr\\merged.hex&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set &amp;quot;showDevDebugOutput&amp;quot;: &amp;quot;raw&amp;quot; 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\\JLinkGDBServerCL.exe&amp;quot; -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF5340_xxAA_APP -select usb=1050050870 -rtos &amp;quot;C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please check TERMINAL tab (gdb-server) for output from C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe&lt;br /&gt;Reading symbols from c:/git\ZBS01\Test2\blinky2\build\zephyr\merged.hex...&lt;br /&gt;(No debugging symbols found in c:/git\ZBS01\Test2\blinky2\build\zephyr\merged.hex)&lt;br /&gt;WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+&lt;br /&gt;0x00007fc8 in ?? ()&lt;br /&gt;Program stopped, probably due to a reset and/or halt issued by debugger&lt;br /&gt;add symbol table from file &amp;quot;c:/git/ZBS01/Test2/blinky2/build/zephyr/zephyr.elf&amp;quot;&lt;br /&gt;(y or n) [answered Y; input not from terminal]&lt;br /&gt;Reading symbols from c:/git/ZBS01/Test2/blinky2/build/zephyr/zephyr.elf...&lt;br /&gt;add symbol table from file &amp;quot;c:/git/ZBS01/Test2/blinky2/build/spm/zephyr/zephyr.elf&amp;quot;&lt;br /&gt;(y or n) [answered Y; input not from terminal]&lt;br /&gt;Reading symbols from c:/git/ZBS01/Test2/blinky2/build/spm/zephyr/zephyr.elf...&lt;br /&gt;2&lt;br /&gt;Resetting target&lt;br /&gt;[New Remote target]&lt;br /&gt;[Switching to Remote target]&lt;br /&gt;&lt;br /&gt;Thread 2 hit Temporary breakpoint 2, main () at C:/Users/sminnick/ncs/v1.9.1/nrf/samples/spm/src/main.c:55&lt;br /&gt;55&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spm_config();&lt;br /&gt;[New Thread 536903904]&lt;br /&gt;[Switching to Thread 536904080]&lt;br /&gt;&lt;br /&gt;Thread 2 hit Breakpoint 1, main () at ../src/main.c:47&lt;br /&gt;47&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_pin_set(dev, PIN, (int)led_is_on);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio code GDB debugger debugs SPM and sometimes not my application</title><link>https://test-devzone.nordicsemi.com/thread/367851?ContentTypeID=1</link><pubDate>Fri, 13 May 2022 13:07:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8191fd04-e6ec-441f-b716-1e5113874528</guid><dc:creator>user77782</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When it is built with NS version, the program will start from&amp;nbsp;&lt;span&gt;&lt;code&gt;spm_config()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;spm_jump()&lt;/code&gt;.The function&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;spm_config()&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;will set the security attribute of the peripherals depending on the default configurations in its associated Kconfig file.&amp;nbsp;It will set the flash regions after the SPM location, as Non-Secure, while the RAM regions after the first 64 kB are set as Non-Secure. The function&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;spm_jump()&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;will make the application jump to a Non-Secure partition (e.g. the non-secure user application).&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I cannot reproduce the issue with NCS v1.9.1 \zephyr\samples\basic\blinky and VSCode v1.67.1 either. &lt;/span&gt;&lt;span&gt;Can you try the unmodified&amp;nbsp;blinky&amp;nbsp;sample again?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>