<?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>Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12703/tossing-or-sharing-data-after-entering-bootloader-dfu</link><description>Hi, I use 
 
 
 IAR EWARM 7.20 
 
 
 Custom Board that has nRF51822-QFAA Revision 2 
 
 
 SDK 7.2 + S110 7.1 / SDK 10.0 + S110 8.0 
 
 
 ble_app_hrs example with Dual Bank DFU OTA 
 
 
 Hi, thanks to Vidar Berg&amp;#39;s answer , 
 I realized</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Mar 2016 13:46:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12703/tossing-or-sharing-data-after-entering-bootloader-dfu" /><item><title>RE: Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/thread/48249?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2016 13:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33e18b33-c8f6-4e80-acec-b6d7a7dc4da9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes you are correct, it&amp;#39;s the no_init section. Note that you only configure that for bootloader, you don&amp;#39;t have to configure that for the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/thread/48248?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2016 13:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e95cdc48-9c23-44bd-a802-41241158cb29</guid><dc:creator>MANGO</dc:creator><description>&lt;p&gt;@Hung Bui: Hmm, I forgot how I got that number. I referenced from one of the answers in the devzone&amp;#39;s question.&lt;/p&gt;
&lt;p&gt;Sorry I cannot find the referenced link. I will edit this comment if I find it.&lt;/p&gt;
&lt;p&gt;Surprisingly, I haven&amp;#39;t failed BLE OTA with that settings.&lt;/p&gt;
&lt;p&gt;So, I have to change the linker script (in IAR ,&lt;code&gt;.icf&lt;/code&gt; file) to &lt;code&gt;0x20002C00-0x20003FFF&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;IAR is different from Keil uVision so I think the iRAM2 is meaning the &lt;code&gt;__no_init&lt;/code&gt; section in IAR.&lt;/p&gt;
&lt;p&gt;Anyways, 128 (128 = 0x20004000 - 0x20003F80, top of 16KB Ram ~ &lt;code&gt;__no_init&lt;/code&gt; section)&lt;/p&gt;
&lt;p&gt;-46 (size of two global variables)&lt;/p&gt;
&lt;p&gt;= 82 bytes for my extra data, is this correct?&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/thread/48247?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2016 08:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83122608-e2cc-43dd-b5de-5095c79cdfe8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Mango: Could you let me know where you got the 3FAF from ?  The default configuration is IRAM1 from 0x20002C00-0x3F7F, IRAM2: 0x3F80-0x3FFF.
This mean you have 0x80 (128) byte for noinit RAM (IRAM2). The m_peer_data and m_peer_data_crc occupied 46 bytes, you have 82 bytes left for your application data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/thread/48246?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2016 14:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e13afad-918f-4897-8860-e3690a46be2f</guid><dc:creator>MANGO</dc:creator><description>&lt;p&gt;Great, what about the size? How much I can insert my own data? In case of SDK 7.2,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;typedef struct{ // sizeof(dfu_ble_peer_data_t) == 44 at SDK 7.2
ble_gap_enc_info_t enc_info;
ble_gap_irk_t      irk;
ble_gap_addr_t     addr;
} dfu_ble_peer_data_t;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since the bootloader at SDK 7.2 occupies small size of RAM of nRF518922-QFAA (16KB RAM),&lt;/p&gt;
&lt;p&gt;(0x20002C00 ~ 0x20003FAF) how much data am I allowed to add?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Tossing or sharing data after entering bootloader DFU</title><link>https://devzone.nordicsemi.com/thread/48245?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2016 13:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bc4aa9a-7a42-46d4-8d71-faf26bfee617</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Mango: Yes, you can modify the dfu_ble_peer_data_t struct to add your own data in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>