<?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>DFU secure bootloader fails on nRF52832-QFAB</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84752/dfu-secure-bootloader-fails-on-nrf52832-qfab</link><description>Hello, 
 I am new to DFU OTA on Nordic&amp;#39;s chips and I am currently trying to implement it on a custom board with an nRF52832-QFAB chip. 
 This will be a long issue since I have been trying a lot of different things, but as a summary: I have been able to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Feb 2022 14:25:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84752/dfu-secure-bootloader-fails-on-nrf52832-qfab" /><item><title>RE: DFU secure bootloader fails on nRF52832-QFAB</title><link>https://devzone.nordicsemi.com/thread/353141?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 14:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d404df7-2d5e-460b-ae92-5d7cff9befdd</guid><dc:creator>aamacaya</dc:creator><description>&lt;p&gt;Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I changed the Section Placement Macros in the _debug project version as you suggested. I still can&amp;#39;t build the project, but the errors were reduced to:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;Linking secure_bootloader_ble_s132_pca10040_debug.elf
    .bss is too large to fit in RAM1 memory segment
    section .heap overlaps absolute placed section .stack
    .mbr_params_page is too large to fit in FLASH1 memory segment
    .bootloader_settings_page is too large to fit in FLASH1 memory segment
    section .stack VMA [0000000020007800,0000000020007fff] overlaps section .bss VMA [00000000200059d0,000000002000a1d7]
Build failed&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This suggests that there is still a FLASH shortage problem and a RAM Shortage Problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the non-debug project (and my original Section Placement MAcros suggestion) the build errors are:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  Linking secure_bootloader_ble_s132_pca10040.elf
    section .heap overlaps absolute placed section .stack
    .mbr_params_page is too large to fit in FLASH1 memory segment
    .bootloader_settings_page is too large to fit in FLASH1 memory segment
    section .stack VMA [0000000020007800,0000000020007fff] overlaps section .bss VMA [00000000200059b4,0000000020007f63]
Build failed&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this case there is only a FLASH shortage.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have&amp;nbsp;&lt;span&gt;NRF_BL_DFU_ENTER_METHOD_BUTTON defined as &amp;quot;0&amp;quot; so there is no pin activating the DFU mode on the custom board. Also, as a redundancy, I have defined&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN as &amp;quot;4&amp;quot; since P0.4 is a button on my custom board that I can easily control.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have adjusted FLASH size and RAM size accordingly on the ble_app_blinky project. The project builds without any errors and I can run it without problems on my custom board by uploading it using SES (I can not use DFU since the bootloader does not build).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally, here I attach the&amp;nbsp;ble_app_blinky project, the&amp;nbsp;pca10040_s132_ble project, and the&amp;nbsp;pca10040_s132_ble_debug project that I am using.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0131.files.zip"&gt;devzone.nordicsemi.com/.../0131.files.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU secure bootloader fails on nRF52832-QFAB</title><link>https://devzone.nordicsemi.com/thread/353067?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 11:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1802f3cf-2291-4872-b733-293d47d0e239</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Agustin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you send us the project you created, both the bootloader and the ble_app_blinky ?&lt;br /&gt;What you did in 4.3 seems to be correct. However at 4.1 I think the correct address should be :&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;FLASH_PH_START=0x0&lt;br /&gt;FLASH_PH_SIZE=0x40000&lt;br /&gt;RAM_PH_START=0x20000000&lt;br /&gt;RAM_PH_SIZE=0x8000&lt;br /&gt;FLASH_START=&lt;strong&gt;0x31000&lt;/strong&gt;&lt;br /&gt;FLASH_SIZE=0xd000&lt;br /&gt;RAM_START=0x20005968&lt;br /&gt;RAM_SIZE=0x2698&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The reason for that is that you were building the secure_bootloader\pca10040_s132_ble_debug variant. If you build the secure_bootloader\pca10040_s132_ble you can use what you used. This explain why you get the &amp;quot;too large to fit in flash&amp;quot; error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the&amp;nbsp;&lt;span&gt;ble_app_blinky&amp;nbsp;, you should also change the FLASH SIZE and RAM SIZE accordingly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;I would suggest to stick to the bootloader _debug variant&amp;nbsp; so that you can debug it. You can add a breakpoint inside&amp;nbsp;dfu_enter_check() and check why it doesn&amp;#39;t enter the app.&lt;/p&gt;
&lt;p&gt;There could be a chance that&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON was enabled and the NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN (by default P0.16) was in active level causing the bootloader to stay in DFU mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>