<?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>BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106962/bl-653-nrf52833-failed-to-boot-the-fw-from-secondary-slot-of-mcuboot-which-is-located-in-external-flash</link><description>I have a BL653 module and with a lot of efforts somehow I was able to successfully create a secondary slot for mcuboot in external flash connected using SPI. Every time I try to DFU over BLE the latest FW image gets loaded in external flash which is secondary</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jan 2024 13:22:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106962/bl-653-nrf52833-failed-to-boot-the-fw-from-secondary-slot-of-mcuboot-which-is-located-in-external-flash" /><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462297?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 13:22:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eee4ebe4-67f3-4e82-9b1c-fe4a1b16d004</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Then I should keep the name as pm_static.yml just to make sure the memory allocated is static.&lt;/p&gt;
&lt;p&gt;Thank you very much for the quick inputs that you have provided.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462273?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 12:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3de2132d-cdf3-4c6a-bcb6-f847a0e52808</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Aniket95"]One final question with your suggestion I have renamed the pm_static.yml to pm.yml and am really not sure if it matters. Do you still recommend to keep the name as pm.yml or change it to pm_static.yml?[/quote]
&lt;p&gt;It is not recognized as pm.yml. pm.yml is only recognized and used in child images.&lt;/p&gt;
&lt;p&gt;The Parititon Manager will only include static partitioning in your project if you name it specifically &amp;quot;pm_static.yml&amp;quot; (or include it via build options).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462267?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 12:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:050d704b-cffc-4180-a233-c7985274797b</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thank you so much for your valuable inputs. I was able to perform the DFU successfully.&lt;/p&gt;
&lt;p&gt;One final question with your suggestion I have renamed the pm_static.yml to pm.yml and am really not sure if it matters. Do you still recommend to keep the name as pm.yml or change it to pm_static.yml?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462048?ContentTypeID=1</link><pubDate>Fri, 29 Dec 2023 08:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c7ecbb1-f0b6-412d-a32a-3b29703d98da</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Aniket95"]It seems like I need to increase the size for mcuboot I hope that could be done by pm_static.yaml, correct?[/quote]
&lt;p&gt;It could.&lt;/p&gt;
&lt;p&gt;However, you could also set CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 in child_image/mcuboot.conf.&lt;/p&gt;
&lt;p&gt;I recommend not using pm_static.yml for develpement. First use pm_static.yml when you are closer to deploying your project. The main use-case for static partitioning is to make sure that the partitioning does not change in-between DFUs, as changing partitioning between DFUs is &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders/bootloader.html#static-partition-requirement-for-dfu"&gt;not allowed&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462006?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 15:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8156225a-d6aa-47ca-b07b-372854425351</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Here is my code developed for BL-653(nrf52833), if you get chance could you just check it and let me know what is going wrong&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/462004?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 15:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ced9fbb-d9a5-42d7-b98c-abf3613cde29</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I am trying to make my project setup according to the sample example that you have provided many thanks for that. I created a child_image folder and copied .overlay and .conf file in it. When I try to enable debug logs for bootloader the flash is overflowing. It seems like I need to increase the size for mcuboot I hope that could be done by pm_static.yaml, correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461986?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 14:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68f27937-9536-419f-aa77-f26a98bd61cf</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Aniket95"]Apparently I am not using any folder named as child image, I am just adding the .conf and .overlay files in build configuration. Is that a problem?[/quote]
&lt;p&gt;That will not work.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/multi_image.html"&gt;Multi image build configurations&lt;/a&gt; will detect the folder child_image and apply configurations acordingly.&lt;/p&gt;
&lt;p&gt;Since you do not have this, my guess to the error is that you have not configured external flash for the MCUboot child image, and therefore MCUboot can not access external flash when trying to swap the images. See the child_image folder in my &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/77d8ce3fe7e1855b02d5d51b68291c20253dc38f/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash"&gt;external flash sample&amp;nbsp; &lt;/a&gt;for how to configure this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461982?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 14:18:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78fe4665-28a2-4149-8fa0-2d6f5786d6f6</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Apparently I am not using any folder named as child image, I am just adding the .conf and .overlay files in build configuration. Is that a problem?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="pastedimage1703773058940v1" class="mceItem mceNonEditable mceInsertMediaItem mceInsertMediaItem mceInsertMediaItemImage" style="color:transparent;height:240px;width:320px;"&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1703773084282v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1703773108340v4.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461979?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 14:11:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59e8aaf7-5143-48b0-9659-1ccf50315308</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Aniket95"]If there is any macro to enable boot logs please let me know.[/quote]
&lt;p&gt;Indeed there is. You can enable logging in the MCUboot child image.&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/77d8ce3fe7e1855b02d5d51b68291c20253dc38f/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash/child_image/mcuboot.conf#L4-L6"&gt;here&lt;/a&gt; for an example of how. Remember to put it in child_image/mcuboot.conf, as is done in the sample.&lt;/p&gt;
[quote user="Aniket95"]Talkin about external flash yes the DFU works and the latest image gets loaded in slot-1 which is located in external flash. The only problem is am not able to copy the latest FW in slot-0 which is in internal flash or boot the FW from slot-1 itself.[/quote]
&lt;p&gt;The way this works is a 2 step procedure:&lt;/p&gt;
&lt;p&gt;1. New image is uploaded to slot-1 (also known as mcuboot_secondary)&lt;/p&gt;
&lt;p&gt;2. Tag mcuboot_secondary as &amp;quot;test&amp;quot; or &amp;quot;confirm&amp;quot;. On next boot, mcuboot will recognice this and swap slot-0 and slot-1.&lt;/p&gt;
&lt;p&gt;Seems like 1 works. So we need to figure out if it is the Tag og Swap that fails. I hope to find this from the bootloader logs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461976?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 14:00:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bb30bdf-b87a-4092-9ff5-22234703b7d0</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Here are the logs I get when I try to boot the latest image from external flash, I have highlighted the logs from mcuboot. I am really not sure are these the correct one that you are referring to. If there is any macro to enable boot logs please let me know.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1703771683192v2.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/106962/bl-653-nrf52833-failed-to-boot-the-fw-from-secondary-slot-of-mcuboot-which-is-located-in-external-flash/461946"]Can you try a couple of those and see if that works for you? Specifically the one with external flash and UART (does external flash DFU work?) and the one with BLE (does BLE DFU work?).[/quote]
&lt;p&gt;The BLE DFU worked well with internal flash. And I think I have referred couple of examples from the link you have provided. The problem is most of the examples are configured for nrf52840 or nrf9160 while I am working with nrf52833. So I just copied the relevant settings from those and copied that in my project. Still I will take a look at the link.&lt;/p&gt;
&lt;p&gt;Talkin about external flash yes the DFU works and the latest image gets loaded in slot-1 which is located in external flash. The only problem is am not able to copy the latest FW in slot-0 which is in internal flash or boot the FW from slot-1 itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461946?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 12:28:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f583019-60c2-4a46-a434-0ce9576f663a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Do you get bootloader logs over RTT or UART from your application?&lt;br /&gt;This sometimes gives hints to what went wrong.&lt;/p&gt;
&lt;p&gt;I got some unofficial bootloader samples over at &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples&lt;/a&gt;. Can you try a couple of those and see if that works for you? Specifically the one with external flash and UART (does external flash DFU work?) and the one with BLE (does BLE DFU work?).&lt;/p&gt;
&lt;p&gt;Then when you know that both features work standalone, try to add them one by one to your app. This way we hopefully can narrow down where the issue is at.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461942?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 11:45:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea0cb93d-7e23-4a98-b286-a63ff4997966</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I have tried with eliminating the&amp;nbsp;&lt;strong&gt;CONFIG_FLASH_LOAD_OFFSET&amp;nbsp;&amp;nbsp;&lt;/strong&gt;setting but still getting same results. The DFU package always gets loaded in slot-1(external memory partition) and I am still not able to boot the latest image.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461940?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 11:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2550d7f9-3d92-47a0-913d-c7dc5a5b5864</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/106962/bl-653-nrf52833-failed-to-boot-the-fw-from-secondary-slot-of-mcuboot-which-is-located-in-external-flash/461927"]However, with MCUboot, the partition manager is used for both MCUboot and the application, making it so that they both know which addresses to use, and therefore you do not need to use CONFIG_FLASH_LOAD_OFFSET from the application.[/quote]
&lt;p&gt;I will remove&amp;nbsp;&lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&amp;nbsp;from the setting and check if I get lucky. But do you think is there any other reason for this issue?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461927?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 10:18:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20d93b1a-fd30-4ad6-86da-8bdffdf4a21c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Aniket95"]&lt;strong&gt;- &lt;/strong&gt;I just followed this from one of the example I guess. Do you think this is the culprit?[/quote]
&lt;p&gt;It could be yes. It will offset the starting address of the application. It is usually used if the application does not know about the bootloader, for it to start on the correct address.&lt;/p&gt;
&lt;p&gt;However, with MCUboot, the partition manager is used for both MCUboot and the application, making it so that they both know which addresses to use, and therefore you do not need to use CONFIG_FLASH_LOAD_OFFSET from the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461923?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 09:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:672c544b-a747-4619-8a8e-24552a10f8a3</guid><dc:creator>Aniket95</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="background-color:#ffff00;"&gt;Does it act different without the &amp;quot;MOVE_WITHOUT_SWAP&amp;quot; configuration?&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;- No I did not see any different behavior.&lt;/p&gt;
&lt;p&gt;- I tried to compile with&amp;nbsp;&lt;strong&gt;CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP&amp;nbsp;&lt;/strong&gt;mode but it gives compilation errors partition manager complains about the mcuboot secondary image in external flash so I am trying with other options.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff00;"&gt;&lt;em&gt;&lt;strong&gt;Why do you use CONFIG_FLASH_LOAD_OFFSET?&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- &lt;/strong&gt;I just followed this from one of the example I guess. Do you think this is the culprit?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL-653(nrf52833) failed to boot the FW from secondary slot of mcuboot which is located in external flash.</title><link>https://devzone.nordicsemi.com/thread/461919?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 09:35:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0951bb1-5662-4a00-a2af-1d96a84194b4</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Does it act different without the &amp;quot;MOVE_WITHOUT_SWAP&amp;quot; configuration?&lt;/p&gt;
&lt;p&gt;Why do you use CONFIG_FLASH_LOAD_OFFSET? This configuration is normally not needed.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>