<?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>Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12150/single-bank-bootloader-is-over-16k-when-generating-zip-file-for-ota</link><description>Hi there, 
 I have a nrf51422CEAA chip with 16k variant with single bank bootloader code. I compile it using (03) optimazation and the final result is : 
 &amp;quot;Program Size: Code=12000 RO-data=332 RW-data=1248 ZI-data=3976&amp;quot; 
 My Keil setting is what this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Mar 2016 07:48:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12150/single-bank-bootloader-is-over-16k-when-generating-zip-file-for-ota" /><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45962?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 07:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6845665-1304-48b0-97ec-be9ea60988ab</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi MC, the last page in flash is used by the bootlaoder to store the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/structbootloader__settings__t.html?resultof=%22%62%6f%6f%74%6c%6f%61%64%65%72%5f%73%65%74%74%69%6e%67%73%5f%74%22%20"&gt;bootloader_settings_t&lt;/a&gt; structure, and cannot be included in the DFU image. But you can use it if programming through the debug interface, please see question &amp;#39;E&amp;#39; in this &lt;a href="https://devzone.nordicsemi.com/blogs/685/common-faq-on-dfu/"&gt;FAQ&lt;/a&gt; for more details.&lt;/p&gt;
&lt;p&gt;Attached a distribution packet of the other hex file you sent to my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45963?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 01:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c4f41df-49f2-46cf-9bd6-1625fcec76b2</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;The hex files are included.&lt;/p&gt;
&lt;p&gt;Regards,
MC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45961?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 13:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3be9a8cb-71c5-4d66-9c14-4dbbbe1b16f9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;strange, there isn&amp;#39;t anything linked above 0x3FC00 or anything below 0x3C000 as far as I can see, so it shouldn&amp;#39;t be more than 15K. May I ask for the .hex file as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45960?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 13:24:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21429b96-761a-4b6b-bf49-439b6324d653</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Attached is the map files. The nRF51422-xxac.map is the file I merge with bootloader_setting.hex that   just exceeding 15k as you mentioned.&lt;/p&gt;
&lt;p&gt;Regards,
MC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45959?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 13:03:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77bdc17e-6e4e-451a-b7b8-2e02dba900fa</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The .bin file is just exceeding 15K. Note that it&amp;#39;s only the binary image that will be loaded to flash and potentially cause the &amp;quot;data Size Exceeds&amp;quot;. The content of .dat will be transferred in the init packet, and loaded to RAM, and the json is used by the smart phone app determine the content of the distribution packet.&lt;/p&gt;
&lt;p&gt;Could you share the .map file from your build output so I can see if there might be anything linked outside of the default address range?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45958?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 12:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa39b2ca-559e-41a1-8b23-a56991417102</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;The link help me solve why there is an extra bytes in my bootloader code when enabling the:&lt;/p&gt;
&lt;p&gt;uint8_t  m_boot_settings[CODE_PAGE_SIZE] &lt;strong&gt;attribute&lt;/strong&gt;((at(BOOTLOADER_SETTINGS_ADDRESS))) &lt;strong&gt;attribute&lt;/strong&gt;((used)) = {BANK_VALID_APP} ;&lt;/p&gt;
&lt;p&gt;The work around was suggested that merging the bootloader_setting.hex with the code of&lt;/p&gt;
&lt;p&gt;uint8_t  m_boot_settings[CODE_PAGE_SIZE] &lt;strong&gt;attribute&lt;/strong&gt;((at(BOOTLOADER_SETTINGS_ADDRESS))) &lt;strong&gt;attribute&lt;/strong&gt;((used));&lt;/p&gt;
&lt;p&gt;But then is still when generating the package size its still above 16k. *.bin = 15368, *.dat = 14, *.json = 492.  A total of 16,226 bytes. The  nRF_toolbox always says &amp;quot;data Size Exceeds&amp;quot;.&lt;/p&gt;
&lt;p&gt;Do you have any idea on how to lower it below 16k.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45957?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 06:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be9dd581-f3f6-4133-97a8-f3533172f109</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I think I find the answer on this link. &lt;a href="https://devzone.nordicsemi.com/question/14988/cannot-init-the-m_boot_settings-in-s110-70-bootloader/post-id-15146%3C/p%3E"&gt;devzone.nordicsemi.com/.../p&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem is until now this was not yet solve.&lt;/p&gt;
&lt;p&gt;Thank you for helping.&lt;/p&gt;
&lt;p&gt;-MC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45956?ContentTypeID=1</link><pubDate>Sat, 27 Feb 2016 07:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4f2d653-0c35-4853-8b19-02a3b0f51a73</guid><dc:creator>mc</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;This is my command in generating the bootloader package:&lt;/p&gt;
&lt;p&gt;nrfutil dfu genpkg  --bootloader MyBT16kFile.hex --application-version 0xFFFFFFFF --dev-type 0x0### --dev-revision 0x0### --sd-req 0x## MyBT16kOTA.zip&lt;/p&gt;
&lt;p&gt;This much the same in you suggestion. ### is handled in the bootloader code.&lt;/p&gt;
&lt;p&gt;I tried the example dual bank of S310 but there is an error when converting to 16k but get struck with the error:&lt;/p&gt;
&lt;p&gt;._build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching arm_startup_nrf51.o(STACK).
._build\nrf51422_xxac.axf: Error: L6407E: Sections of aggregate size 0x800 bytes could not fit into .ANY selector(s).&lt;/p&gt;
&lt;p&gt;I tried to search for the fix of this but no luck...I tried hacking the stack size to 255 and it compiled okay but I do not wan&amp;#39;t to have a problem in the future of hacking stack.&lt;/p&gt;
&lt;p&gt;I am back to solving the puzzle of nrfutil why it exceeds 16k. Some note, I used the no pack of SDK9.0 for my code.&lt;/p&gt;
&lt;p&gt;-MC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Single bank Bootloader is over 16k when generating zip file for OTA</title><link>https://devzone.nordicsemi.com/thread/45955?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 13:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa3eb7a0-2744-418c-b45b-ca2a2e63a39e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using nrfutil to generate the distribution file as explained &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v10.0.0/bledfu_example_image.html?cp=4_0_1_4_3_1_1_2"&gt;here&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;e.g.,  nrfutil dfu genpkg ../application.zip --bootloader .hex --application-version 0xFFFFFFFF --dev-revision 0xFFFF --dev-type 0xFFFF --sd-req 0xFFFE&lt;/p&gt;
&lt;p&gt;Note that this tool strips the UICR section from the .hex file before converting to a binary image. Otherwise you&amp;#39;d gotten a lot of byte padding in the image since UICR register are memory mapped to 0x10001000 (0x3c000 -&amp;gt; 0x10001000 = ~250MB).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attachment:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2816.application.zip"&gt;application.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>