<?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>Maximum Size Bootloader + Soft Device OTA DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7635/maximum-size-bootloader-soft-device-ota-dfu</link><description>Hello, 
 This is an add-on question to the the one outlined in:
 devzone.nordicsemi.com/.../ 
 That question states that: 
 The maximum SoftDevice size that can be updated is : (FLASH_SIZE - MBR_SIZE - 2BOOTLOADER_SIZE)/2 + MBR_SIZE. That is (numbers</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jun 2015 07:21:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7635/maximum-size-bootloader-soft-device-ota-dfu" /><item><title>RE: Maximum Size Bootloader + Soft Device OTA DFU</title><link>https://devzone.nordicsemi.com/thread/27233?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 07:21:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3164204d-cbeb-431b-b076-cb0f664313d9</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Ok, good. Just wanted to make sure you knew about the reserved page of the device manager.&lt;/p&gt;
&lt;p&gt;PSTORAGE_MAX_APPLICATIONS actually tells how many pages are reserved for the device manager + application. It does not include the swap page. In your case PSTORAGE_MAX_APPLICATIONS with value 2 is probably correct since you want 1 page for the device manager and 1 page for the application.&lt;/p&gt;
&lt;p&gt;You could override the swap page with the bootloader by modifying the location of it, i.e. placing it below the application data. Then you could save 1kB of storage because it is perfectly fine to overwrite it when doing DFU. If you have the swap page below the application data you could set DFU_APP_DATA_RESERVED 0x0800. On the other hand, I think you are fine with the settings you are proposing and don&amp;#39;t need the extra work of relocating the swap page.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum Size Bootloader + Soft Device OTA DFU</title><link>https://devzone.nordicsemi.com/thread/27232?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2015 17:20:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cd94815-fb73-49b7-95aa-599407cb3aab</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;Ok so in truth I have 1KB reserved of &amp;quot;custom app data&amp;quot; and 1KB for the device manager. In total that means I have 3KB of &amp;quot;App data&amp;quot; including the swap page. So that means I should set #define DFU_APP_DATA_RESERVED           0x0C00 . I don&amp;#39;t think I&amp;#39;ll modify the pstorage.c, but I do see how the optimization would save 1KB.&lt;/p&gt;
&lt;p&gt;Why does the pstorage_platoform.h in the bootloader  #define PSTORAGE_MAX_APPLICATIONS   2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum Size Bootloader + Soft Device OTA DFU</title><link>https://devzone.nordicsemi.com/thread/27231?ContentTypeID=1</link><pubDate>Sat, 20 Jun 2015 06:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3bde16c-2ff7-400e-8b58-a935dab27f1a</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Lucas&lt;/p&gt;
&lt;p&gt;I think your calculations are good, that you have 4kB extra for the bootloader and 9kB for the softdevice. But if Asbjørn keeps his word, the S110 softdevice will not be made bigger, only minor revision updates are going to be made from now on. So 9 kB extra should be totally safe.&lt;/p&gt;
&lt;p&gt;If you are using the device manager you also need to account for that it reserves 1kB. The device manager uses pstorage to reserve the 1kB page. Pstorage also reserves 1kB swap page when it is initialized.&lt;/p&gt;
&lt;p&gt;Lets assume that you are using pstorage to store your 2kB or application data and that you also use the device manager, and you initialize the device manager before you register the 2 pages for your application data. Then for the &amp;quot;App data&amp;quot; region in the memory map shown &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00094.html"&gt;here&lt;/a&gt;, first you have 2 pages (2kB) for your application data, then you have one page for device manager on top of that and then you have the swap page at the top closest to the DFU bootloader area. However, you could change the pstorage code so that the swap page is located at the bottom of the &amp;quot;App data&amp;quot;, then you would save 1kB of storage space because then you could use the swap page area while doing DFU.&lt;/p&gt;
&lt;p&gt;If we assume that the &amp;quot;App data&amp;quot; is 4kB then you would have&lt;/p&gt;
&lt;p&gt;Max_SD = (256-4-4-2(24))/2+4 = 104KB&lt;/p&gt;
&lt;p&gt;as the max size for your softdevice&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>