<?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>MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows</link><description>Hello again folks, 
 Recently, I closed a ticket regarding MCUBoot, DFU, and the USB Mass Filesystem. Unfortunately, I&amp;#39;m still having problems. That ticket, for the curious, is here: In that ticket, the problem ended up being to do with the method of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Aug 2024 10:46:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows" /><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/499007?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 10:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b443af1-28fc-4a09-b6de-34cd95e69a14</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="FinnBiggs"]How did you know that the overflow was coming from the mcuboot partition, and not one of the others?[/quote]
&lt;p&gt;First and foremost experience.&lt;/p&gt;
&lt;p&gt;Secondly, if you change the app, the overflow stays the same, so it must be something else, and for the nRF52840, that can only be MCUboot.&lt;/p&gt;
&lt;p&gt;But if you read closely in the build log, you can see that the paths close before the flash overflow error, you will see the path to MCUboot ncs/bootloaders/mcuboot/boot/zephyr.&lt;/p&gt;
[quote user="FinnBiggs"]On that same note, why would the required size for that partition change?[/quote]
&lt;p&gt;Default size is 0xC000, which is true for &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/prj.conf"&gt;the default MCUboot configuration&lt;/a&gt;, plus eventual &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/tree/main/boot/zephyr/boards"&gt;board-specific MCUboot configurations&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you add more functionality to MCUboot, you may get a bigger MCUboot app.&lt;br /&gt;This is typically adding exeternal flash drivers, or Serial Recovery functionality.&lt;/p&gt;
&lt;p&gt;The flash overflow issue has two different solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increasing MCUboot partition size.&lt;/li&gt;
&lt;li&gt;Reducing MCUboot app size by disabling stuff in Kconfig
&lt;ul&gt;
&lt;li&gt;See for example &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/prj_minimal.conf"&gt;prj_minimal.conf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;At some point you will have optimied away everything you do not need, at which case the other option is the only left.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The latter is technically more clean if possible, but harder.&lt;/p&gt;
&lt;p&gt;Another point to make here is:&lt;br /&gt;MCUboot will inherit configurations from board files.&lt;br /&gt;This means that you could get into a state where MCUboot works for nRF52840 but fails for the Xiao.&lt;/p&gt;
&lt;p&gt;And this is a good seg-way to the issue.&lt;/p&gt;
&lt;p&gt;I propose the following steps, all for the Xiao:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify that MCUboot is the error
&lt;ol&gt;
&lt;li&gt;Build without and with MCUboot. Does it work without?&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Compare the following files between Xiao and nRF52840DK:
&lt;ol&gt;
&lt;li&gt;build/mcuboot/zephyr/zephyr.dts&lt;/li&gt;
&lt;li&gt;build/mcuboot/zephyr/.config&lt;/li&gt;
&lt;li&gt;Feel free to send me those files as well, and I can have a look.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;When comparing above, we can expect some differences based on the boards. But keep a lookout for differing configs that are not board specific.
&lt;ol&gt;
&lt;li&gt;A common thing is that some boards have logging configs in board config, such as enabling RTT, USB or UART or other stuff. And those are not nessecarily useful for MCUboot.&lt;/li&gt;
&lt;li&gt;I can also mention that MCUboot is known to be a bit unstable with RTT.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Try to fix things you found and see what happens&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If those steps does not work, I have the following questions for another potential path:&lt;/p&gt;
[quote user="FinnBiggs"]a JLink probe to recover back into its bootloader mode.[/quote]
&lt;p&gt;What is the &amp;quot;bootloader mode&amp;quot; here?&lt;/p&gt;
[quote user="FinnBiggs"]I&amp;#39;m extremely grateful for all the help you&amp;#39;ve provided on these last few responses. Can I send a cake or a box of pastries to your office as a thank you?[/quote]
&lt;p&gt;Thanks for the offer, but I decline.&lt;br /&gt;Still, it warms my heart to be able to help and to have thankful customers! It is what makes this job fun!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498929?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 01:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2085f5c-5450-45df-8743-366e01663eab</guid><dc:creator>FinnBiggs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I have good and bad news.&lt;/p&gt;
&lt;p&gt;The good news: your changes work perfectly on the Dev Kit.&lt;/p&gt;
&lt;p&gt;The bad news: the Xiao version fails with no build errors, serial/console output, or RTT output. For Xiao, this application builds correctly, but does not boot, and requires a JLink probe to recover back into its bootloader mode.&lt;/p&gt;
&lt;p&gt;I have no idea where to go from here - there&amp;#39;s not a ton of information I can send to you because I can&amp;#39;t get any output from this application on my target hardware.&lt;/p&gt;
&lt;p&gt;--------------------&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows/498878"]So if I missed any questions about theory, please let me know and I will explain.[/quote]
&lt;p&gt;There&amp;#39;s one aspect of your process where I got lost:&lt;/p&gt;
&lt;p&gt;How did you know that the overflow was coming from the mcuboot partition, and not one of the others?&lt;/p&gt;
&lt;p&gt;On that same note, why would the required size for that partition change?&lt;/p&gt;
&lt;p&gt;--------------------&lt;br /&gt;&lt;br /&gt; I&amp;#39;m extremely grateful for all the help you&amp;#39;ve provided on these last few responses. Can I send a cake or a box of pastries to your office as a thank you?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Finn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498878?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 13:53:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:795285b4-dd26-4cad-981f-cbe469a6ce73</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I must confess that I did not read all your explanations. So if I missed any questions about theory, please let me know and I will explain.&lt;/p&gt;
&lt;p&gt;However, I think I fixed the issue at hand.&lt;br /&gt;First, I will say that I just tested on the DK so far. I do got an Xiao laying around somewhere, but i think and hope that when we have solved the DK issue the Xiao will be good as well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BOOT_MAX_IMG_SECTORS=____ - too small?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This error message will also appear if the flash driver does not fail. &lt;br /&gt;This is a bug that is fixed in newer versions of MCUboot.&lt;/p&gt;
&lt;p&gt;But still, we need to know why the driver does not work. It is likely configured wrong.&lt;/p&gt;
&lt;p&gt;To find this, I built &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash"&gt;a working sample&lt;/a&gt; for the NRF52840DK, and&amp;nbsp; tested this to make sure.&lt;/p&gt;
&lt;p&gt;With two samples, I can compare configurations.&lt;br /&gt;Since it fails in MCUboot I will compare MCUboot configurations.&lt;br /&gt;So for each sample I compare the following files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;build/mcuboot/zephyr/zephyr.dts&lt;/li&gt;
&lt;li&gt;build/mcuboot/zephyr/.config&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this, I found that in .config, your sample is missing CONFIG_NORDIC_QSPI_NOR, so I added that.&lt;/p&gt;
&lt;p&gt;And for DTS, I found that &amp;quot;nordic,pm-ext-flash = &amp;amp;mx25r64;&amp;quot; is missing altogether.&lt;br /&gt;So I added &amp;quot;aosihfjkasbfjkbsakj&amp;quot; to the overlay file. And this did not give a build&amp;nbsp; error, meaning that the file itself is not parsed.&lt;/p&gt;
&lt;p&gt;We can fix this in two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Either move the file to child_image/mcuboot/nrf52840dk_nrf52840.overlay.
&lt;ul&gt;
&lt;li&gt;I think this should work at least&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Or to add the path of the mcuboot overlay to the build script.
&lt;ul&gt;
&lt;li&gt;This is the method I used&lt;/li&gt;
&lt;li&gt;This must use the full path, cause unintuitively it will use the relative path from &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/&lt;/a&gt; and not from your app.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mass_5F00_pm_5F00_dfu_5F00_urd_5F00_2024_2D00_08_2D00_19.zip"&gt;devzone.nordicsemi.com/.../mass_5F00_pm_5F00_dfu_5F00_urd_5F00_2024_2D00_08_2D00_19.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This fixes the &amp;quot;mcuboot cannot find&amp;nbsp; external flash&amp;quot; issue. I think that is the one issue you had here right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498468?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 13:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c1968d-c57c-44b6-bc51-386289608b14</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Thanks for the info.&lt;br /&gt;I will get back to you tomorrow or Monday on this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498374?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 02:20:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2660c83a-833d-41a3-9de0-0f619129039b</guid><dc:creator>FinnBiggs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Sorry to give you extra work! You&amp;#39;re right, I forgot to attach my restructured project. My bad.&lt;/p&gt;
&lt;p&gt;I also did considerable cleanup work in the config files, and I&amp;#39;ll include it at the end of this post.&lt;/p&gt;
&lt;p&gt;The build system now finds the child image.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think I was confused about the partitions&amp;#39; purpose, but they couldn&amp;#39;t increase in size from what I had without separating the mcuboot primary and secondary into different regions, which I was uncertain was permitted.&lt;/p&gt;
&lt;p&gt;The partitions in my previous structure fully occupied the 1MB flash_primary region, so to expand any one partition, the others would have to shrink or relocate.&lt;/p&gt;
&lt;p&gt;Luckily, the mcuboot primary and secondary CAN be separated (into flash_primary &amp;amp; external flash)!&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows/498220"]The flash overflow is in mcuboot. This means that moving or resizing mcuboot_primary/mcuboot_secondary will not matter too much. As long as there is space for the app inside them ofc.[/quote]
&lt;p&gt;I&amp;#39;m very curious - what informed you that the overflow was arising from mcuboot?&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows/498220"]Then I removed most things from pm_static.yml.[/quote]
&lt;p&gt;Very cool, thanks! I&amp;#39;m a fan of dynamic partitioning when it works&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/113318/mcuboot-exfat-usb-filesystem-and-flash-region-overflows/498220"]Let me know how this works on your&amp;nbsp; side.[/quote]
&lt;p&gt;Good news: this solves the flash overflow!&lt;/p&gt;
&lt;p&gt;Bad news: on dev kit, this breaks the DFU capability of the application in what seems to be a fairly complex way. (More in next section). It also causes the xiao boards to lock up, requiring a JLink erase and fresh flash of the xiao-ble-sense bootloader to recover.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;Once again, I took a serious amount of notes in trying to get to an answer, and although I&amp;#39;ll include them in the zip file, it&amp;#39;ll be better to highlight key findings in this post.&lt;/p&gt;
&lt;p&gt;When I build and flash your project (using SDK v2.5.0 - (is this right?)), I get the following behavior:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.5.0 ***
I: Starting bootloader
W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=64 - too small?
E: Image in the primary slot is not valid!
E: Unable to find bootable image
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Though I can build, I can&amp;#39;t boot the provided application.&lt;/p&gt;
&lt;p&gt;This took me on a fun series of tests. If 64 is too small, why not try bigger? I tried all of the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    CONFIG_BOOT_IMG_SECTORS = {
        absent (default), 
        64, 
        128, 
        256, 
        512, 
        1024,
        4096,
        8192, (this and all below are &amp;quot;BOOT_IMG_MAX_SECTORS=(number) - too small?&amp;quot;), 
        16384, (Ram overflow) (ld.bfd.exe: region `RAM&amp;#39; overflowed by 18368 bytes)
        -- (binary search back down to &amp;quot;can fit&amp;quot;) --
        12288 (too small),
        14336 (too small),
        15360 (`RAM&amp;#39; overflowed by 1984 bytes),
        14848 (too small)
    }
At which point I discontinued this effort.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;No number of sectors let me boot my application.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;When an easy fix didn&amp;#39;t appear, I turned to google to help ID the error.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Results about this problem are fairly sparse, but I did find this devZone post:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81563/device-firmware-update-dfu-with-mcuboot-bootloader-showing-failed-reading-sectors-boot_max_img_sectors-128---too-small"&gt;Device Firmware Update (DFU) with MCUBoot bootloader showing Failed reading sectors; BOOT_MAX_IMG_SECTORS=128 - too small?&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That thread suggested a good number of sectors (256, which I validate as a good size in my notes), which I fixed for the rest of the debugging.&lt;/p&gt;
&lt;p&gt;Another devzone user (Estnik) suggested:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#222222;color:#839496;float:none;font-family:-apple-system, BlinkMacSystemFont, &amp;#39;Segoe WPC&amp;#39;, &amp;#39;Segoe UI&amp;#39;, system-ui, Ubuntu, &amp;#39;Droid Sans&amp;#39;, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;I have come to realize that it has something to do with the overlay file and the build system. I use west build -b nrf52dk_nrf52832 -- -Dmcuboot_OVERLAY_CONFIG=&amp;lt;app_samples&amp;gt;/basic/blinky/usb_cdc_acm_log_recovery.conf to build my application. Even if I have a completely empty usb_cdc_acm_recovery.conf file, the issue occurs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Which seems like a good lead.&lt;/p&gt;
&lt;p&gt;Unfortunately, the solution there was to place the config options in mcuboot.conf, which solved Estnik&amp;#39;s issue, but doesn&amp;#39;t solve mine.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;I found a second source of information on this error:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://interrupt.memfault.com/blog/mcuboot-overview#resolving-flash-dependencies"&gt;https://interrupt.memfault.com/blog/mcuboot-overview#resolving-flash-dependencies&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Which suggests that the problem arises from a lack of flash dependencies.&lt;/p&gt;
&lt;p&gt;I wasn&amp;#39;t able to implement a lot what I read in this article. It seems one layer closer to the hardware than Nordic SDK, but I hope it might provide insight.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;Circling back to the devzone post, Hakon includes an example of blinky with mcuboot enabled.&lt;/p&gt;
&lt;p&gt;When I build that, I get what I assume are version difference errors. Those errors disappear when I replace the main with a stub that simply prints a message to console.&lt;/p&gt;
&lt;p&gt;That application&amp;#39;s structure is nearly identical to mine, but I can get that one to work.&lt;/p&gt;
&lt;p&gt;The output of that code is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;*** Booting nRF Connect SDK v2.5.0 ***&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Starting bootloader&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Boot source: none&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Image index: 0, Swap type: none&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Bootloader chainload address offset: 0x10000&lt;/code&gt;&lt;br /&gt;&lt;code&gt;I: Jumping to the first image slot&amp;yuml;*** Booting nRF Connect SDK v2.5.0 ***&lt;/code&gt;&lt;br /&gt;&lt;code&gt;BLINKY MCUBOOT WITH NO CODE&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is the config for that sample (and mcuboot.conf), and I&amp;#39;ve highlighted the items that seem like potential candidates for a fix.&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/pastedimage1723687188509v4.png" /&gt;&lt;/p&gt;
&lt;p&gt;Do you think either of these options could contribute to the &amp;quot;too small?&amp;quot; sector error?&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;For my two builds, with the new configuration, I have identical memory reports except for the size that&amp;#39;s left in external_flash, which is expected because the external flash hardware have different size.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:151px;max-width:447px;" alt=" " height="151" src="https://devzone.nordicsemi.com/resized-image/__size/894x302/__key/communityserver-discussions-components-files/4/pastedimage1723686878535v1.png" width="447" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So at least the structure of the partitioning is working well, now.&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;I was able to get the (mass_pm_dfu) application booting using only the dynamic partitioning once I closed and reopened vsCode. I don&amp;#39;t know why, but at least I was able to get past the bootloader chainload output.&lt;/p&gt;
&lt;p&gt;The output then became:&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/pastedimage1723687695196v5.png" /&gt;&lt;/p&gt;
&lt;p&gt;(And the warning is just how I&amp;#39;m version-stamping various DFUs)&lt;/p&gt;
&lt;p&gt;When I attempt to disregard the sector error and move past it (because, hey, if it works...)&lt;br /&gt;&lt;img style="max-height:264px;max-width:467px;" alt=" " height="264" src="https://devzone.nordicsemi.com/resized-image/__size/934x528/__key/communityserver-discussions-components-files/4/pastedimage1723687883185v8.png" width="467" /&gt;&lt;/p&gt;
&lt;p&gt;The DFU is actually blocked by a &amp;quot;Bad file number&amp;quot; on the terminal output, which happens just before a GATT Conn Timeout on the app that provides DFU (nrf Connect, Android app).&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;The previous version of this project had successful DFU updates on Dev Kit, but now I am unable to update on either device, though it will build for Xiao.&lt;/p&gt;
&lt;p&gt;Got advice? I&amp;#39;m not sure what the next steps for debugging are.&lt;/p&gt;
&lt;p&gt;And, before I post let me actually attach a zip file with my restructuring, notes, build commands, and cleanup! (Build commands are now located at scripts/dk_build.sh and scripts/xiao_build.sh)&lt;/p&gt;
&lt;p&gt;Thank you so much.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Finn&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mass_5F00_pm_5F00_dfu_5F00_finn_5F00_2024_2D00_08_2D00_14.zip"&gt;devzone.nordicsemi.com/.../mass_5F00_pm_5F00_dfu_5F00_finn_5F00_2024_2D00_08_2D00_14.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498220?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 09:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b50544-28e5-4dc1-9c20-fe4c0af9548d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Finn,&lt;/p&gt;
&lt;p&gt;You forgot to upload the new project I think.&lt;/p&gt;
&lt;p&gt;I will upload a fixed project at end of this message still. But first let me answer your questions:&lt;/p&gt;
[quote user="FinnBiggs"]As part of trying to get things working, I restructured the project to match the structure from the nrf connect sdk intermediate course lesson on FOTA[/quote]
&lt;p&gt;I like this. Maybe just because I am more familiar with this structure. But I like it.&lt;/p&gt;
[quote user="FinnBiggs"]The build system will not automatically find the child_image conf file
[/quote]
&lt;p&gt;It should. See my project.&lt;/p&gt;
[quote user="FinnBiggs"]When I set the CONFIG_CBPRINTF_NANO=n, I get the same amount of overflow as when it&amp;#39;s &amp;#39;y&amp;#39;.[/quote]
&lt;p&gt;Right yes I see that I was mistaken in my previous reply.&lt;/p&gt;
[quote user="FinnBiggs"]&lt;p&gt;Seems like the Nano option isn&amp;#39;t the right approach, which brings me to your second suggestion -- change the partitioning to increase mcuboot space.&lt;/p&gt;
&lt;p&gt;Is it permitted to separate the MCUBoot partitions? Otherwise, it&amp;#39;s not possible to make more space.&lt;/p&gt;[/quote]
&lt;p&gt;I think you are mixing up partitions here. Let me explain them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mcuboot: The bootloader MCUboot lives here. It is 0xC000 by default&lt;/li&gt;
&lt;li&gt;mcuboot_primary: The application lives here. It will be half of available space left after all other partitioning is done.&lt;/li&gt;
&lt;li&gt;mcuboot_secondary: Your update lives here. It will be the same size as mcuboot_primary.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The flash overflow is in mcuboot. This means that moving or resizing mcuboot_primary/mcuboot_secondary will not matter too much. As long as there is space for the app inside them ofc.&lt;/p&gt;
[quote user="FinnBiggs"]Would it be feasible to try moving mcuboot_secondary into external_flash?[/quote]
&lt;p&gt;It is very possible and maybe even recommended. But it won&amp;#39;t fix this issue specifically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;Fixed project&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is what I did:&lt;br /&gt;I took this one:&lt;/p&gt;
[quote user="FinnBiggs"]mass_pm_dfu_2024-08-02.zip[/quote]
&lt;p&gt;and reformatted it to use my preferred directory structure.&lt;/p&gt;
&lt;p&gt;Then I added a child image folder to add a pair of configurations to MCUboot.&lt;/p&gt;
&lt;p&gt;Then I removed most things from pm_static.yml. Why?&lt;br /&gt;In my mind, pm_static has two use-cases:&lt;br /&gt;1. To define custom partitions&lt;br /&gt;2. To freeze partitioning for release. (This can be done by copying build/partitions.yml when done developing) ((Freezing partitioning for release is a hard&amp;nbsp; requirement by DFU))&lt;/p&gt;
&lt;p&gt;For none of these, you need to define it all for developing. Instead I recommend only defining partitions as you need them, and then use Kconfig options to change sizes. This way, the build system will automatically partition your project for you, and you are not as limited in what you can do. See that I added CONFIG_PM_PARTITION_SIZE_MCUBOOT to the project to upscale MCUboot. (This upscaling should fix the flash overflow)&lt;br /&gt;And I use similar configurations for Settings.&lt;/p&gt;
&lt;p&gt;And here is the project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6165.mass_5F00_pm_5F00_dfu_5F00_urd_5F00_2024_2D00_08_2D00_14.zip"&gt;devzone.nordicsemi.com/.../6165.mass_5F00_pm_5F00_dfu_5F00_urd_5F00_2024_2D00_08_2D00_14.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know how this works on your&amp;nbsp; side.&lt;/p&gt;
[quote user="FinnBiggs"]Welcome back from vacation, I hope it was pleasant![/quote]
&lt;p&gt;Thanks, it was very nice indeed!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498140?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 00:15:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d36f44e-d2c8-4c59-9ab1-5585a31fbd15</guid><dc:creator>FinnBiggs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Welcome back from vacation, I hope it was pleasant!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been pushing at this with no luck. As part of trying to get things working, I restructured the project to match the structure from the nrf connect sdk intermediate course lesson on FOTA: (&lt;a id="" href="https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/lesson8/inter_less8_exer3_solution"&gt;https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/lesson8/inter_less8_exer3_solution&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;My new file tree:&lt;/p&gt;
&lt;pre id="tree-output" style="color:#ffffff;font-size:13px;font-style:normal;font-weight:400;letter-spacing:normal;padding-left:30px;text-align:start;text-indent:0px;text-transform:none;"&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;mass_pm_dfu/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ .vscode/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┗ settings.json&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ boards/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ nrf52840dk_nrf52840.conf&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ nrf52840dk_nrf52840.overlay&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ xiao_ble_sense.conf&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┗ xiao_ble_sense.overlay&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ child_image/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ mcuboot.conf&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ mcuboot_private.pem&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ nrf52840dk_nrf52840.overlay&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┗ xiao_ble_sense.overlay&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ scripts/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┣ dk_build.sh&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┗ xiao_build.sh&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ src/&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┃ ┗ main.c&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ CMakeLists.txt&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ Kconfig&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┣ pm_static.yml&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;┗ prj.conf&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The new build command is really annoying.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The build system will not automatically find the child_image conf file
&lt;ul&gt;
&lt;li&gt;I include the following build command&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-Dmcuboot_EXTRA_CONF_FILE=&amp;quot;$BASE_DIR/child_image/mcuboot.conf&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Much to my chagrin, the mcuboot_EXTRA_CONF_FILE seems to search at
&lt;ul&gt;
&lt;li&gt;C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;As a fix, I made bash scripts that passes the mcuboot_EXTRA_CONF_FILE with a $(pwd)&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div style="background-color:#002b36;color:#839496;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#cb4b16;"&gt;-Dmcuboot_EXTRA_CONF_FILE=&lt;/span&gt;&lt;span style="color:#2aa198;"&gt;&amp;quot;$(&lt;/span&gt;&lt;span style="color:#268bd2;"&gt;pwd&lt;/span&gt;&lt;span style="color:#2aa198;"&gt;)/child_image/mcuboot.conf&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;My recommendation for building this project is to run:
&lt;ul&gt;
&lt;li&gt;cd &amp;lt;PROJECT BASE DIRECTORY&amp;gt;&lt;/li&gt;
&lt;li&gt;./scripts/dk_build.sh&lt;/li&gt;
&lt;li&gt;./scripts/xiao_build.sh&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Or, direct CLI Build
&lt;ul&gt;
&lt;li&gt;cd into the project directory and run one of the following depending on build target&lt;/li&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt;# build nrf52840dk_nrf52840
west build \
    --build-dir build_dk \
    . --pristine \
    --board nrf52840dk_nrf52840 \
    --no-sysbuild \
-- \
    -DNCS_TOOLCHAIN_VERSION=NONE \
    -DEXTRA_CONF_FILE=boards/nrf52840dk_nrf52840.conf \
    -DDTC_OVERLAY_FILE=boards/nrf52840dk_nrf52840.overlay \
    -Dmcuboot_EXTRA_CONF_FILE=&amp;quot;$(pwd)/child_image/mcuboot.conf&amp;quot;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt;# build xiao_ble_sense
west build \
    --build-dir build_xiao \
    . --pristine \
    --board xiao_ble_sense \
    --no-sysbuild \
-- \
    -DNCS_TOOLCHAIN_VERSION=NONE \
    -DEXTRA_CONF_FILE=boards/xiao_ble_sense.conf \
    -DDTC_OVERLAY_FILE=boards/xiao_ble_sense.overlay \
    -Dmcuboot_EXTRA_CONF_FILE=&amp;quot;$(pwd)/child_image/mcuboot.conf&amp;quot;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I notice no difference in overflow amount when I include/exclude CONFIG_CBPRINTF_NANO=y. Intellisense seems to think that the option is already enabled.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;(That seems to be an option already handled in /c/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/prj.conf)&lt;/p&gt;
&lt;p&gt;When I set the CONFIG_CBPRINTF_NANO=n, I get the same amount of overflow as when it&amp;#39;s &amp;#39;y&amp;#39;.&lt;/p&gt;
&lt;p&gt;I do however notice a difference in the overflow amount as a result of the restructuring. Now, instead of a 2408B overflow, it&amp;#39;s 1560B.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;----------------------&lt;/p&gt;
&lt;p&gt;Seems like the Nano option isn&amp;#39;t the right approach, which brings me to your second suggestion -- change the partitioning to increase mcuboot space.&lt;/p&gt;
&lt;p&gt;Is it permitted to separate the MCUBoot partitions? Otherwise, it&amp;#39;s not possible to make more space.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:316px;max-width:495px;" height="316" src="https://devzone.nordicsemi.com/resized-image/__size/990x632/__key/communityserver-discussions-components-files/4/pastedimage1723594277966v1.png" width="495" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The flash_primary partition runs from&lt;code&gt; 0x0000000 to 0x000fffff&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Would it be feasible to try moving mcuboot_secondary into external_flash?&lt;/p&gt;
&lt;p&gt;Thank you very much, I appreciate your advice.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Finn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/498024?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 12:08:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6e828b9-e8c3-4076-8a5d-1c705720994c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Finn,&lt;/p&gt;
[quote user=""]the Xiao build overflows by the same exact same amount of space no matter what changes I make.[/quote]
&lt;p&gt;This is probably because MCUboot overflow.&lt;/p&gt;
&lt;p&gt;One trick to reduce space in MCUboot is to do this in MCUboot config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CBPRINTF_NANO=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That seems to fix the overflow for me, but I get some other errors. I hope that those other erros will not be present on your side. So test this one first.&lt;/p&gt;
&lt;p&gt;Alternativley you could change partitioning to increase MCUboot space&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/497836?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 13:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8dd56ee-ca9a-43b7-9111-7cd57ed40bf2</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Finn,&lt;/p&gt;
&lt;p&gt;I am back from vacation now, and am catching up today.&lt;br /&gt;I will get back to you later this week. Hopefully tomorrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/497288?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2024 09:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:638713ec-a5c4-4974-9caa-77b2571f510f</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Finn,&lt;/p&gt;
&lt;p&gt;Just letting you know that Sigurd is currently out of office, but will be back sometime next week. If your problem is urgent and doesn&amp;#39;t allow you to wait until then, let me know.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/496871?ContentTypeID=1</link><pubDate>Sat, 03 Aug 2024 00:22:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:201428df-2de0-4d1f-8dc6-9b5b1eb7bb0e</guid><dc:creator>FinnBiggs</dc:creator><description>&lt;p&gt;Argh!&lt;/p&gt;
&lt;p&gt;Sorry to leave you hanging on such a trivial issue -- I had some travel and personal things to take care of.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a follow up. Excluding those (mcuboot conf) files but adding the content I cared about (making sure xiao&amp;#39;s external flash was enabled via devicetree) gives the exact same behavior.&lt;/p&gt;
&lt;p&gt;Below is the filetree of the project (both builds)&lt;/p&gt;
&lt;pre style="border-radius:3px;color:#839496;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;margin-top:0px;overflow:auto;padding:16px;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;"&gt;&lt;code class="code-line code-active-line" style="background:none;border-radius:4px;display:inline-block;font-size:1em;line-height:1.357em;padding:0px;position:relative;" dir="auto" data-line="4"&gt;mass_pm_dfu/
┣ configuration/
┃ ┣ common/
┃ ┃ ┗ prj_mcuboot_smp.conf
┃ ┣ nrf52840dk_nrf52840/
┃ ┃ ┣ child_image/
┃ ┃ ┃ ┗ mcuboot/
┃ ┃ ┃   ┣ mcuboot_private.pem
┃ ┃ ┃   ┗ prj_mcuboot_smp.conf
┃ ┃ ┗ nrf52840dk_nrf52840.overlay
┃ ┗ xiao_ble_sense/
┃   ┣ child_image/
┃ ┃ ┃ ┗ mcuboot/
┃ ┃ ┃   ┣ mcuboot_private.pem
┃ ┃ ┃   ┗ prj_mcuboot_smp.conf
┃   ┗ xiao_ble_sense.overlay
┣ notes/
┃ ┣ filetree.md
┃ ┣ Notes.md
┃ ┗ screenshot_pm.png
┣ src/
┃ ┗ main.c
┣ CMakeLists.txt
┣ Kconfig
┣ pm_static.yml
┗ sample.yaml&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;ul&gt;
&lt;li&gt;Both board configurations use &lt;code&gt;/common/prj_mcuboot_smp.conf&lt;/code&gt; as their primary configurations&lt;/li&gt;
&lt;li&gt;Both boards use pm_static.yml as their partition manager&lt;/li&gt;
&lt;li&gt;The&amp;nbsp; /&amp;lt;board&amp;gt;/ subfolder-structures are identical
&lt;ul&gt;
&lt;li&gt;the /child_image/mcuboot/mrj_mcuboot_smp.conf are both blank&lt;/li&gt;
&lt;li&gt;the private keys are identical4&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The error is exactly the same (ro_data overflows by 2408 bytes)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Are the mcuboot conf files strictly necessary as long as I have all the values that I want?&lt;/p&gt;
&lt;p&gt;Anyways, here&amp;#39;s a new zip with those changes, and I&amp;#39;ll reattach the west build commands to reproduce as well.&lt;/p&gt;
&lt;p&gt;NOTE: I&amp;#39;ve added the west commands (though same command as before) to this zip under /cmds/xiao.sh and cmds/dk.sh&lt;br /&gt;&lt;br /&gt;If you have this folder open in your terminal, you can build either one with&lt;/p&gt;
&lt;p&gt;./cmds/xiao.sh&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;./cmds/dk.sh&lt;/p&gt;
&lt;p&gt;(Please check that the contents of the bash script match what you expect - I don&amp;#39;t want to be your security risk. If you like, just grab the text from those and run it)&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Finn&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mass_5F00_pm_5F00_dfu_5F00_2024_2D00_08_2D00_02.zip"&gt;devzone.nordicsemi.com/.../mass_5F00_pm_5F00_dfu_5F00_2024_2D00_08_2D00_02.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/495613?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2024 11:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f026bbd8-056e-4050-a09e-df6f60932d07</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;So let start with something a bit less complex, but which I think is wrong:&lt;/p&gt;
&lt;p&gt;Your MCUboot configuration does not seem to be included.&lt;br /&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/pastedimage1721907958757v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;You are missing &amp;quot;;&amp;quot; after &amp;quot;okay&amp;quot; in both of these, but you do not get an error?&lt;br /&gt;That would mean that the file is not included.&lt;/p&gt;
&lt;p&gt;To make sure that all your files are included, go through them one by one and add an obvious error + build them. This way, you should see that it crashes once per file, and thus you know that what you expect to be included really has been.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/495303?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 20:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63174a6c-1fa7-435f-83bd-8cd33632dba2</guid><dc:creator>FinnBiggs</dc:creator><description>&lt;p&gt;Hi again Sigurd,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m happy to provide a build command. The error you ran into was likely my fault -- I checked to see if I could build from the zip I sent, and it looks like having the build directories included there has some interaction with CMakeCache.txt that prevents a build.&lt;/p&gt;
&lt;p&gt;That cache problem can be fixed either by removing all build* directories, or by using the new zip at the end of this file (which is the old zip, but with the builds removed).&lt;/p&gt;
&lt;p&gt;For brevity, I&amp;#39;m going to say &amp;quot;dk&amp;quot; in place of &amp;quot;nrf52840dk_nrf52840&amp;quot;, and&amp;nbsp;&amp;quot;xiao&amp;quot; instead of &amp;quot;xiao_ble_sense&amp;quot;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My build configuration
&lt;ul&gt;
&lt;li&gt;Configuration file (both xiao and dk)
&lt;ul&gt;
&lt;li&gt;./configuration/common/prj_mcuboot_smp.conf&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Board
&lt;ul&gt;
&lt;li&gt;xiao
&lt;ul&gt;
&lt;li&gt;xiao_ble_sense&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;dk
&lt;ul&gt;
&lt;li&gt;nrf52840dk_nrf52840&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;DeviceTree Overlay
&lt;ul&gt;
&lt;li&gt;xiao
&lt;ul&gt;
&lt;li&gt;./configuration/xiao_ble_sense/xiao_ble_sense.overlay&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;dk
&lt;ul&gt;
&lt;li&gt;./configuration/nrf52840dk_nrf52840/nrf52840dk_nrf52840.overlay&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Optimization
&lt;ul&gt;
&lt;li&gt;xiao and dk
&lt;ul&gt;
&lt;li&gt;Default is fine&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;West commands
&lt;ul&gt;
&lt;li&gt;xiao
&lt;ul&gt;
&lt;li&gt;west build --build-dir ./build_xiao . --pristine --board xiao_ble_sense --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=./configuration/common/prj_mcuboot_smp.conf -DEXTRA_DTC_OVERLAY_FILE=configuration/xiao_ble_sense/xiao_ble_sense.overlay&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;dk
&lt;ul&gt;
&lt;li&gt;west build --build-dir ./build_dk . --pristine --board nrf52840dk_nrf52840 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=./configuration/common/prj_mcuboot_smp.conf -DEXTRA_DTC_OVERLAY_FILE=configuration/nrf52840dk_nrf52840/nrf52840dk_nrf52840.overlay&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for all your time.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Finn&lt;/p&gt;
&lt;p&gt;ATTACHED: mass_pm_dfu.zip (same project as before, but with build directories absent and some unused files deleted)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7587.mass_5F00_pm_5F00_dfu.zip"&gt;devzone.nordicsemi.com/.../7587.mass_5F00_pm_5F00_dfu.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As an aside, I had to delete and remake this reply. Putting the zip file in the middle of the text block caused a number of bizarre formatting problems that rendered my reply unreadable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, ExFat USB Filesystem, and Flash Region Overflows.</title><link>https://devzone.nordicsemi.com/thread/495198?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 12:19:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c795eff3-7e8b-41fc-843a-2d36f2e22fff</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Welcome back!&lt;/p&gt;
&lt;p&gt;Great job on the formatting on the ticket! As you say this project is starting to become complicated, so good formatting on the ticket will enable us to help you a loot faster than if not.&lt;/p&gt;
&lt;p&gt;I tried to build your project for the xiao baord and the nRF52840DK, but get a different error. So I think I am doing something wrong.&lt;br /&gt;Could you include build instructions, so I know I am getting to the right issue?&lt;br /&gt; I work from the CLI, so a single west command would be preffered, if not too much to ask.&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>