<?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>Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33881/insufficient-resources-on-dfu-ota</link><description>Hej, 
 on trying to update firmware on nrf52832 over the air I&amp;#39;m getting the error message INSUFFICIENT_RESOURCES. 
 Actually I don&amp;#39;t understand the error message because if I generate the bootloader settings page for the firmware image and flash both</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Jul 2018 00:43:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33881/insufficient-resources-on-dfu-ota" /><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/139794?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 00:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e73813a-a0dc-447c-8177-12ad017bb312</guid><dc:creator>tkstreet</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;I am having this same issue.&amp;nbsp; I compiled my code with GCC and -Og and -g3 set, so the code is quite big (709kB).&amp;nbsp; However, it flashes with the bootloader and softdevice without any problems using nRFgo Studio and nrfjprog.&amp;nbsp; It is only when I try to do a DFU that it fails with the &amp;quot;INSUFFICIENT RESOURCES&amp;quot; error.&amp;nbsp; Why would this happen?&lt;/p&gt;
&lt;p&gt;EDIT: Nevermind.&amp;nbsp; I found &lt;a title="DFU bootloader hex merging" href="https://devzone.nordicsemi.com/f/nordic-q-a/22207/ftu-ota-failed/87279#87279"&gt;this thread&lt;/a&gt; that pointed out not to merge the settings hex with the application hex when creating a DFU package and only to do it when flashing the original application file.&amp;nbsp; I generated a new package without merging with the settings hex and the error went away.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130768?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 09:23:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:215545b5-1269-4130-920b-5ca07cdc5040</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;What if you first try an application update. If it fails, in this particular way, you do a bootloader update before retrying?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130609?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 13:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4909ba7a-058b-4194-9a7e-142f28bc7670</guid><dc:creator>chrizz</dc:creator><description>&lt;p&gt;Yes, of course we can. On the other hand we want our customers to do as less updates as necessary. But now for a firmware update we need our central device to be able to retrieve the bootloader version in order to update the bootloader followed by the large(r) firmware image once the bootloader is up to date &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f612.svg" title="Unamused"&gt;&amp;#x1f612;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130465?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 08:43:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b51a1f71-1ef4-4720-8f73-4a2a46394216</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, that is the line to change. If you do not use application data at all (and do not use any libraries such as peer manager that does) then setting it to 0 is safe.&lt;/p&gt;
&lt;p&gt;It is a compile time bootloader setting, and it cannot be overridden. (Fortunately, some would say, as changing it during DFU would allow for erasing application data.) So no, it cannot be circumvented and you need a bootloader that is built with the correct setting. Of course, you can do a bootloader upgrade first, to a bootloader with the new setting, then do the application update.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130457?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 08:19:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aba902b-9821-4486-a3f6-a0e10cb823ac</guid><dc:creator>chrizz</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/tesc"&gt;tesc&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;2. I think this is not the case here since the application size forces a single bank update.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. What if my application neither uses the application data region nor the peer manager? I mean 12kB (3 pages) is a lot of space one could use for &amp;quot;useful&amp;quot; things like e.g. code.&lt;/p&gt;
&lt;p&gt;On a quick look I found&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define DFU_APP_DATA_RESERVED CODE_PAGE_SIZE*3&lt;/pre&gt; in nrf_dfu_types.h&lt;/p&gt;
&lt;p&gt;Is this the line I would need to patch for the bootloader to flash from APP_IMAGE_START_ADDR to UICR_BOOTLOADER_START_ADDR? &lt;br /&gt;Can I somehow circumvent the bootloader from preserving this memory (without patching the bootloader code)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130363?ContentTypeID=1</link><pubDate>Tue, 01 May 2018 07:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d0d9587-153b-4ba9-9739-0525efc929dc</guid><dc:creator>cjishnu</dc:creator><description>&lt;p&gt;Thanks. I had the exact same issue and I had forgotten to include the 3 pages of application data in my code size calculation. After decreasing the code size, DFU works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130288?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2018 13:06:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c71f3b2-8ffd-44a0-b80e-58c103df0fbd</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;140 kB (0x23000 bytes) is the size of some versions of SoftDevice s132, but the size varies. For instance s132 version 6.0.0 (from SDK 15) is 152 kB (0x26000 bytes). Earlier versions are smaller in size.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130287?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2018 13:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c58e3ae-4d31-4636-8bfe-9721a37fdd41</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are correct that the flash requirement of SoftDevice s132 version 3.0.0 (which is the one you use for generating the DFU zip with &lt;code&gt;--sd-req 0x8c&lt;/code&gt;) is 124 kB (0x1F000 bytes). That means the application starts at 0x1F000.&lt;/p&gt;
&lt;p&gt;You are also correct that the bootloader (usually) starts at 0x78000.&lt;/p&gt;
&lt;p&gt;There are mainly two things that might reduce what size is possible for an application over DFU:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Application data. This is non-volatile storage used by an application. As a huge oversimplification it can be compared to a desktop application storing files to disk. Application data is used for instance by peer manager (through FDS), and it is located next to the bootloader (at lower flash address than the bootloader. Usually two or three flash pages, which on the nRF52832 means address 0x7000 or 0x6b00. See the Infocenter section on &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_memory"&gt;Memory layout&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Forcing dual bank update. Dual bank update means only free space in flash is used for downloading the new application. This means if anything goes wrong with the DFU you can still boot into the old application. (In contrast, with single bank you will end up in the DFU bootloader after an unsuccessful application update, and would have to do a successful DFU in order to get a working application after that.) By default the update is dual bank if enough space is available, but single bank is used as a fallback. Disabling single bank as a fallback requires changing a define in the bootloader source code and so this may be an issue only if you have done so. See also &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_bootloader_dfu_banks.html"&gt;Dual-bank and single-bank updates&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Insufficient resources on DFU OTA</title><link>https://devzone.nordicsemi.com/thread/130172?ContentTypeID=1</link><pubDate>Sat, 28 Apr 2018 04:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aca4e84-67bf-4ee3-a2d2-ecfbfc621a1c</guid><dc:creator>hari911</dc:creator><description>&lt;p&gt;Hi Chrizz,&lt;/p&gt;
&lt;p&gt;So, from my understanding, in case of nRF52832, S132 is expected to consume 0x00 - 0x23000 and the bootloader starts from 0x73000. So the application program space available is&amp;nbsp;0x50000 -&amp;gt; 320kB. Am just a beginner with nRF boards an also on to the nRF OTA bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>