<?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 enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95976/unable-to-enable-debug-options-in-vs-code-for-ncs-v2-2-0</link><description>Hi, 
 I am able to build my application fine in VS Code with NCS v2.2.0. However, I am unable to debug the application when I select &amp;quot;Enable debug options&amp;quot; when editing the build configuration. It makes it nearly all the way through the build and linking</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Feb 2023 09:19:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95976/unable-to-enable-debug-options-in-vs-code-for-ncs-v2-2-0" /><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/407710?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 09:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:707f6d92-d760-4fc4-93d1-7efe3b9249f0</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just noticed that the difference between the flash region sizes in our build logs is pretty close to your reported overflow amount of 15000 bytes. (&lt;code&gt;409088B&lt;/code&gt; vs &lt;code&gt;392704B&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;Perhaps you&amp;#39;ve done a mistake in your partition file that only takes effect once you surpass the actual flash region size?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/407648?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 20:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19813820-f4e9-48e1-9e8f-bcbef244e451</guid><dc:creator>NathanML</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Sorry for the delayed response! I was able to reduce the memory footprint, without debug options enabled, down to the following:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Memory region         Used Size  Region Size  %age Used
           FLASH:      242468 B     409088 B     59.27%
            SRAM:        173 KB     211736 B     83.67%
        IDT_LIST:          0 GB         2 KB      0.00%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, what is weird is that when I go to enable debug options for this build, I still get the same number of bytes for the overflow error:&amp;nbsp;region `FLASH&amp;#39; overflowed by 15872 bytes&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/406819?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2023 10:28:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a72f330f-a993-4660-92a9-3c32319b8ce9</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Ok, well you are using a large amount of your available memory.&lt;/p&gt;
&lt;p&gt;If I for instance try to build the Asset Tracker v2 application for the nRF9160 DK without debug options, I see this result:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Memory region         Used Size  Region Size  %age Used
           FLASH:      261412 B     392704 B     66.57%
             RAM:      130896 B     211736 B     61.82%
        IDT_LIST:          0 GB         2 KB      0.00%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And if I try to build with debug options the build fails, though not with exactly the same error message as yours:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Error: Image size (0x67f5e) + trailer (0x630) exceeds requested size 0x68000&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So it&amp;#39;s very possible that debug options need a lot of memory for your application.&lt;/p&gt;
&lt;p&gt;Could you try building with some of the more memory heavy libraries disabled while still having debug options disabled to see how much you are able to reduce the memory footprint by?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/406740?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 18:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53242c90-f580-46bd-ab26-ba4ebf4038d9</guid><dc:creator>NathanML</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Below is the memory usage of the successful build:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Memory region         Used Size  Region Size  %age Used
           FLASH:      309068 B     409088 B     75.55%
            SRAM:      190720 B     211736 B     90.07%
        IDT_LIST:          0 GB         2 KB      0.00%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/406594?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 09:08:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d752a5ea-2dce-4bcf-bf5c-0cfb1ff91fb6</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;If you don&amp;#39;t include debug options, and you let it build successfully, what does the end of the build log say about memory usage?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/406525?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 16:37:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3369ad3-a774-4686-b6d0-6d3298ee67ec</guid><dc:creator>NathanML</dc:creator><description>&lt;p&gt;Hi Einarh,&lt;/p&gt;
&lt;p&gt;Thank you for the response! So that is what I assumed, however when I disable some of the more&amp;nbsp;more memory heavy libraries like MBED (see below), the amount of memory it says it overflows by does not decrease and simple remains the same.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#CONFIG_MBEDTLS=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#CONFIG_MBEDTLS_SSL_CLI_C=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#CONFIG_MBEDTLS_TLS_LIBRARY=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#CONFIG_NET_SOCKETS_SOCKOPT_TLS=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;Even by reducing CONFIG_MAIN_STACK_SIZE for example, the amount that it says flash overflows by is unchanged.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if this is helpful, but this is a more verbose few lines of the error:&lt;/p&gt;
&lt;p&gt;c:/sdk/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1fc40 of bin\tfm_s.axf section `.gnu.sgstubs&amp;#39; is not within region `FLASH&amp;#39;&lt;br /&gt;c:/sdk/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: bin\tfm_s.axf section `.sg_end_dummy&amp;#39; will not fit in region `FLASH&amp;#39;&lt;br /&gt;c:/sdk/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1fc40 of bin\tfm_s.axf section `.gnu.sgstubs&amp;#39; is not within region `FLASH&amp;#39;&lt;br /&gt;c:/sdk/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH&amp;#39; overflowed by 15872 bytes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to enable debug options in VS Code for NCS v2.2.0</title><link>https://devzone.nordicsemi.com/thread/406405?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 09:21:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99f8bf79-e9d0-4d8d-b3fc-6a1111e27fab</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;Enabling debug options makes your application&amp;#39;s memory footprint larger, so it seems like you&amp;#39;ve exceeded your available memory when including it.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll have to disable other features to fit the ones you need, I&amp;#39;d recommend having a look at our memory footprint optimization recommendations:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_memory.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_memory.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>