<?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>SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6376/sdk-8-0-0-dfu-bootloader-code-size-too-large-gcc</link><description>I&amp;#39;ve taken the example project at nRF51_SDK_8.0.0_5fc2c3a/examples/dfu/bootloader and attempted to build it using gcc. I&amp;#39;m going for a single bank update over BLE. The SDK docs here... 
 developer.nordicsemi.com/.../a00088.html 
 ...claim the bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Apr 2015 07:51:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6376/sdk-8-0-0-dfu-bootloader-code-size-too-large-gcc" /><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22226?ContentTypeID=1</link><pubDate>Mon, 13 Apr 2015 07:51:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92837a93-fa48-4414-9c49-9c10068330af</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;My suggestion would be to just modify the original dfu_types.h. This file is only used by the bootloader, and it should not be a problem unless you plan to have several versions of the bootloader in the same SDK. In that case you can always make a config file for each bootlaoder project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22225?ContentTypeID=1</link><pubDate>Mon, 13 Apr 2015 00:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fb5822e-95be-4c58-a809-1e758d43c95f</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;@Vidar I need to change BOOTLOADER_REGION_START but SDK 8.0.0 makes this very messy. I don&amp;#39;t want to edit a header file in the SDK, but if I copy dfu_types.h over to my project instead, my build system now has two directories with that header in it to include. Is there a better way? Can this be done more cleanly in the next SDK release?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22230?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 23:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3719a20e-4beb-4364-b17a-789d66b12046</guid><dc:creator>Mike F</dc:creator><description>&lt;p&gt;I wonder why it is so much larger when you compile it. I just added my map file so you can compare.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ grep &amp;#39;__Vectors\|__exidx_end&amp;#39; bootloader_s110v8_xxaa.map 
            0x000000000003c000                __Vectors
            0x000000000003f3d8                __exidx_end = .
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22229?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 22:04:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a491ba2b-845a-431b-9e3f-2073b8602218</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thank you very much indeed! This builds on my machine and weighs in at about 18KB. I&amp;#39;m now playing spot the difference with my own Makefile and sources and these ones to see how mine is getting so big. I haven&amp;#39;t run it as a bootloader yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22228?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 21:02:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d0dc6a8-cc52-4a2d-a51e-c1481e3db04f</guid><dc:creator>Mike F</dc:creator><description>&lt;p&gt;GCC can do it, here&amp;#39;s an example. The bootloader_util_gcc.c file in the SDK is fairly close. This works with both single and dual bank updates. It would be nice if a GCC version, like this, was included in future versions of the SDK.&lt;/p&gt;
&lt;p&gt;First, if you set m_uicr_bootloader_start_address as a volatile, BOOTLOADER_REGION_START will be written to flash when you program the hex file. If not, it will be optimized out so you&amp;#39;ll have to program BOOTLOADER_REGION_START into the UICR later.&lt;/p&gt;
&lt;p&gt;Next, you have to pass the argument start_addr to the assembly template so you get the expected application reset vector. If you don&amp;#39;t do this the DFU will upload successfully but the application will not start.  The code above address this start_addr issue.&lt;/p&gt;
&lt;p&gt;I left out isr_abort because it isn&amp;#39;t working for whatever reason.  I only get to the bootloader after a restart so I don&amp;#39;t need this code or &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00082.html"&gt;this code&lt;/a&gt; (or the bond sharing feature) but it does makes sense to get a gcc version of this working.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bltest.tgz"&gt;bltest.tgz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_5F00_s110v8_5F00_xxaa.map"&gt;bootloader_s110v8_xxaa.map&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22224?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 13:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef7eebfc-b14e-4eb8-aa0f-80fe6e4263bd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi, from your map file it seems like your bootloader is actually 32K . I am not sure if GCC is able to compile it to 16K, but you can try to optimize for size as Mike suggested.&lt;/p&gt;
&lt;p&gt;Here are some files that I have modified to use the bootloader with GCC and SDK 8.0.0. The linker file here allocates 21K in flash for the bootloader allowing -O3 optimization. Remember to change dfu_types.h--&amp;gt;BOOTLOADER_REGION_START according to the linker settings.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5280.makefile"&gt;makefile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_5F00_util_5F00_gcc_5F00_mod-.c"&gt;bootloader_util_gcc_mod .c&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_ble_5F00_svc_5F00_gcc.c"&gt;dfu_ble_svc_gcc.c&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7652.gcc_5F00_nrf51_5F00_bootloader_5F00_xxac.ld"&gt;gcc_nrf51_bootloader_xxac.ld&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the modifications are not necessary correct, and may have unexpected side effects due to little testing.  Also, did not add the bond sharing feature mentioned &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.0.0/s110/html/a00079.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;EDIT 13.4.2015
Added missing linker file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 8.0.0 DFU bootloader code size too large, gcc</title><link>https://devzone.nordicsemi.com/thread/22227?ContentTypeID=1</link><pubDate>Sun, 05 Apr 2015 22:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fd04043-3059-4626-8c8c-6758b248e8f1</guid><dc:creator>Mike F</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to do the same thing. I don&amp;#39;t have everything working yet, but ran into this issue.  I suspect that if you optimize for size -Os rather than speed -O3, you will be able to load it at 0x3c000.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>