<?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>USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116185/usb-mass-storage-with-mcuboot</link><description>Hi Devzone, 
 I am facing an issue on my nrf52840-based custom board when I try to set up the USB mass storage class on an external NOR Flash as well as having MCUBoot enabled with the secondary slot partition on that same external flash. 
 I am able</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jan 2025 09:22:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116185/usb-mass-storage-with-mcuboot" /><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/516932?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 09:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fb111c9-882c-473f-a371-b67f155d1e45</guid><dc:creator>Nicolas Goualard</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply, I have been unable to work on this subject for a while.&lt;/p&gt;
&lt;p&gt;I tested using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    affiliation:
        - disk&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in my pm_static.yml and it seemed to solve the issue.&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/511355?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2024 15:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b639a63-b7d3-4404-891c-7898250d3175</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;Abhjith is out of office, and I will continue supporting you in his stead.&lt;/p&gt;
&lt;p&gt;I have encountered a similar issue in the past. Could you please change the&amp;nbsp;pm_static.yml to list the affiliation as followed instead?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  affiliation:
    - disk&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If that fixes it, then the root cause is some issue in processing the affiliation in Partition Manager script.&lt;/p&gt;
&lt;p&gt;If not, do you think you can help me&amp;nbsp;confirm the following steps can reproduce your issue?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start from hello_world&lt;/li&gt;
&lt;li&gt;Add your pm_static.yml&lt;/li&gt;
&lt;li&gt;Add your overlay&lt;/li&gt;
&lt;li&gt;Add&amp;nbsp;&lt;span&gt;CONFIG_APP_MSC_STORAGE_FLASH_FATFS&amp;nbsp;and&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If the steps&amp;nbsp;work, I will try to replicate the issue and investigate further.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hieu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/510638?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2024 09:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68873471-d027-4dda-8506-fb5ee279518d</guid><dc:creator>Nicolas Goualard</dc:creator><description>&lt;p&gt;But, shouldn&amp;#39;t it already be fitting in the flash ?&lt;/p&gt;
&lt;p&gt;0xdb000 (size of mcuboot_secondary) + 0xf25000 (size of storage_partition) = 0x1000000 (size of flash)&lt;/p&gt;
&lt;p&gt;Unless I am missing something ?&lt;/p&gt;
&lt;p&gt;I tried on the DK with storage_partition of size 0x25000, with the same result&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot_secondary:
  address: 0x00000
  region: external_flash
  size: 0xdb000

storage_partition:
  affiliation: disk
  extra_params: {
      disk_name: &amp;quot;NAND&amp;quot;,
      disk_cache_size: 4096,
      disk_sector_size: 512,
      disk_read_only: 0
  }
  address: 0xdb000
  region: external_flash
  size: 0x25000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Nicolas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/510534?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 15:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48895555-d875-4ff7-b9e0-165ec4f137bf</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Nicolas Goualard"]The external flash I am using is indeed 16MB[/quote]
&lt;p&gt;While reviewing the error messages in the build logs you shared, I suspect the issue might be with the &lt;code&gt;pm_static.yml&lt;/code&gt; file. Could you try reducing the &lt;code&gt;storage_partition&lt;/code&gt; size so that both &lt;code&gt;mcuboot_secondary&lt;/code&gt; and &lt;code&gt;storage_partition&lt;/code&gt; do not exceed &lt;code&gt;0x1000000&lt;/code&gt;? The two partitions you mentioned, from &lt;code&gt;0x00000&lt;/code&gt; to &lt;code&gt;0xF80000&lt;/code&gt;, exceed the available 16 MB by about 512 KB.&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
[quote user="Nicolas Goualard"]MCUBoot does not need to handle the storage_partition as far as I&amp;#39;m concerned, but maybe it is the case under the hood ? Having two separate partitions is not enough to differentiate between the two functionalities ?[/quote]
&lt;p&gt;I’m not entirely sure, but I believe having two separate partitions should work to distinguish between the MCUboot and flash disk for your application&amp;#39;s logging.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/510437?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 09:46:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b60093-4353-4c7a-9fa4-bc607bfc1995</guid><dc:creator>Nicolas Goualard</dc:creator><description>&lt;p&gt;Hi Abhijith, thanks for your answer,&lt;/p&gt;
&lt;p&gt;The external flash I am using is indeed 16MB.&lt;/p&gt;
&lt;p&gt;There is something I do not understand, I have a few more questions if you don&amp;#39;t mind.&lt;/p&gt;
&lt;p&gt;The end goal is for my application to:&lt;/p&gt;
&lt;p&gt;- be updateable, thus enabling MCUBoot and NSIB as a bootloader chain.&lt;/p&gt;
&lt;p&gt;- store log files generated by Zephyr&amp;#39;s logging subsystem with filesystem backend enabled. Using flash disk would make it easy to get those log files by plugging the device to a computer.&lt;/p&gt;
&lt;p&gt;MCUBoot does not need to handle the storage_partition as far as I&amp;#39;m concerned, but maybe it is the case under the hood ? Having two separate partitions is not enough to differentiate between the two functionalities ?&lt;/p&gt;
&lt;p&gt;Thanks in advance for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/510381?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2024 22:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:428a2a13-1e2a-4fe0-beb1-1ad2b9a2fa05</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for getting back to you a bit late. I have reviewed the information you provided, and thank you for explaining the issue in detail.&lt;/p&gt;
&lt;p&gt;What is the size of your flash? While checking the &lt;code&gt;pm_static.yml&lt;/code&gt; file you shared, I noticed that &lt;code&gt;mcuboot_secondary&lt;/code&gt; is set to 0xdb000 (approximately 900KB) and &lt;code&gt;storage_partition&lt;/code&gt; is set to 0xf25000 (approximately 15.5MB). So, the total required space would be around 16.4MB. I assume your flash size is larger than 16MB. If it is not, you may need to change the start address of the storage partition to a later position to avoid overlap.&lt;/p&gt;
&lt;p&gt;I also want to mention that integrating flash disk management directly with MCUboot is not officially supported and is considered a non-supported feature. Using MCUboot to manage complex flash disk features or a file system can be tricky and might lead to issues with security and performance. This is not a use case MCUboot was designed for, so I’m afraid the support I can provide for this issue is very limited. I apologize for that.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB Mass Storage with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/509708?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 15:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8712d5a8-9b8a-479e-bfd4-2cb676b61cc9</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I wanted to let you know that I’ve been assigned to this case. I’ll look into it and keep you updated.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>