<?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>How to build [SDK 14.0.0] bootloader_secure_ble with -O0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25658/how-to-build-sdk-14-0-0-bootloader_secure_ble-with--o0</link><description>What do I need to change to make &amp;quot;bootloader_secure_ble&amp;quot; build for armgcc (using Makefile in pca10040_debug) and -O0 (no size optimization )?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Oct 2017 10:49:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25658/how-to-build-sdk-14-0-0-bootloader_secure_ble-with--o0" /><item><title>RE: How to build [SDK 14.0.0] bootloader_secure_ble with -O0</title><link>https://devzone.nordicsemi.com/thread/101095?ContentTypeID=1</link><pubDate>Tue, 10 Oct 2017 10:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf20e9b-d4d5-49d2-8b73-21bed7487666</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set -O0 flag in Makefile&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You need to change the flash size available to the bootloader. Go to the corresponding .ld file for your project (&lt;strong&gt;secure_dfu_gcc_pca10040_debug.ld&lt;/strong&gt;, in the main project folder) and change the FLASH ORIGIN and LENGTH so that the bootloader fits. This should work: &lt;code&gt;FLASH (rx) : ORIGIN = 0x72000, LENGTH = 0xC000&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you get &lt;code&gt;error: r7 cannot be used in asm here&lt;/code&gt; add &lt;code&gt;-fomit-frame-pointer&lt;/code&gt; to CFLAGS.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>