<?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>Zephyr MSC example fails with &amp;#39;PM_storage_partition_ID&amp;#39; undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119472/zephyr-msc-example-fails-with-pm_storage_partition_id-undeclared-on-nrf52840dk</link><description>I&amp;#39;m trying to add MSC functionality to my project, but I&amp;#39;m encountering the following error: 
 
 To understand the cause of the error, I tried creating a new application from the Zephyr MSC example using the 52840DK board. However, without making any</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Mar 2025 14:33:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119472/zephyr-msc-example-fails-with-pm_storage_partition_id-undeclared-on-nrf52840dk" /><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525760?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 14:33:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7089e79f-e084-4252-bc53-2ab4cb75f6f4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I get this working with sysbuild if I disable the partition manager (that is the way things are moving anyway), and then the size from the device tree overlay file is also used. The partition manager is removed by making a file sysbuild.conf that contains this line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SB_CONFIG_PARTITION_MANAGER=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With that, and your increase in the parition size in the overlay, things work as expected on my end:&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/pastedimage1741098798847v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525661?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 08:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f88b1c03-5321-4616-ae08-6dbc818d34ae</guid><dc:creator>Andrea Verdecchia</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/119472/zephyr-msc-example-fails-with-pm_storage_partition_id-undeclared-on-nrf52840dk/525550"]This will disable the partition manager for the build[/quote]
&lt;p&gt;I have disabled the Partition Manager, and now I can compile the example and get it running. However, I have noticed that when I connect the board to the PC via USB, the visible memory is still 108KB, even though I modified the &lt;code data-start="228" data-end="247"&gt;storage_partition&lt;/code&gt; in the overlay to 8MB (which is the external memory size of the 52840DK)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://i.ibb.co/998gWQQw/Screenshot-2025-03-04-093740.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;mx25r64 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		storage_partition: partition@0 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x00000000 0x00800000&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;while the application outputs the correct values to me&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.374,664] &amp;lt;inf&amp;gt; flashdisk: Initialize device NAND
[00:00:00.374,664] &amp;lt;inf&amp;gt; flashdisk: offset 0, sector size 512, page size 4096, volume size 8388608
Area 0 at 0x0 on mx25r6435f@0 for 8388608 bytes
Mount /NAND:: 0
/NAND:: bsize = 512 ; frsize = 512 ; blocks = 216 ; bfree = 213
/NAND: opendir: 0
  D 0 SYSTEM~1
End of files
[00:00:00.430,664] &amp;lt;inf&amp;gt; main: The device is put in USB mass storage mode.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;1) Why the PC see only 108KB?&lt;br data-start="49" data-end="52" /&gt;2) If I have an application that necessarily uses &lt;code data-start="99" data-end="109"&gt;sysbuild&lt;/code&gt; and the Partition Manager, and I want to implement USB MSC, how can I make them coexist? Do you have any advice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525550?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 14:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79ebed6c-d5d7-4825-8800-c35a42a4e047</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not aware of any sample or specific intructions on this. That said, it seems the main issue is that the MSC sample does not work with the partition manager, and when building with sysbuild that is included. I suggest you make a file called sysbuild.conf in the same folder as prj.conf, and add this line to the new file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SB_CONFIG_PARTITION_MANAGER=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will disable the partition manager for the build&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525526?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 13:37:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff7fdbae-e8a1-48e3-a903-441f672a08b3</guid><dc:creator>Andrea Verdecchia</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/119472/zephyr-msc-example-fails-with-pm_storage_partition_id-undeclared-on-nrf52840dk/525522"]Sysbuild is used by default for nrf samples, but this sample is part of&amp;nbsp;vanilla&amp;nbsp;Zephyr, and there sysbild is not yet supported by default. (Nordic contributes extensively to vanilla Zephyr (including this specific sample), but the Zephyr samples are not officially supported in the same way as the samples under the nrf repository is.)[/quote]
&lt;p&gt;So, if I wanted to implement MSC using sysbuild, where can I find an example, tutorial, or reference guide?&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/119472/zephyr-msc-example-fails-with-pm_storage_partition_id-undeclared-on-nrf52840dk/525522"]Regarding the term &amp;quot;NAND&amp;quot;, I agree that is odd and misleading, as the internal flash is &amp;quot;NOR&amp;quot; (at the same time newer devices use other technologies than flash enteirly, so that could also become misleading at some point). This has been used for a long time in this sample though, and I am not able to find out why.&amp;nbsp;[/quote]
&lt;p&gt;Okay, I got it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525522?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 13:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:666cd999-0e5e-45f4-813c-60ac94ec273f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sysbuild is used by default for nrf samples, but this sample is part of&amp;nbsp;vanilla&amp;nbsp;Zephyr, and there sysbild is not yet supported by default. (Nordic contributes extensively to vanilla Zephyr (including this specific sample), but the Zephyr samples are not officially supported in the same way as the samples under the nrf repository is.)&lt;/p&gt;
&lt;p&gt;Regarding the term &amp;quot;NAND&amp;quot;, I agree that is odd and misleading, as the internal flash is &amp;quot;NOR&amp;quot; (at the same time newer devices use other technologies than flash enteirly, so that could also become misleading at some point). This has been used for a long time in this sample though, and I am not able to find out why.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525516?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 13:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d038665f-4027-4ac2-a071-cb67484bd3c8</guid><dc:creator>Andrea Verdecchia</dc:creator><description>&lt;p data-start="0" data-end="5"&gt;Hi,&lt;/p&gt;
&lt;p data-start="7" data-end="144"&gt;Regarding specifying the storage, I believe what I have already set with&lt;/p&gt;
&lt;p data-start="7" data-end="144"&gt;&lt;code data-start="82" data-end="120"&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p data-start="7" data-end="144"&gt;&lt;code data-start="82" data-end="120"&gt;&lt;/code&gt;should be sufficient.&lt;/p&gt;
&lt;p data-start="146" data-end="400"&gt;As for compiling without sysbuild (since it is not mentioned on the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/subsys/usb/mass/README.html#usb-mass"&gt;example page&lt;/a&gt;), this indeed solves the compilation issue. However, I would like to ask: how can I use MSC with sysbuild, considering that it is expected to be the default in the future?&lt;/p&gt;
&lt;p data-start="402" data-end="527"&gt;I also have a curiosity: why does the code use the term &lt;strong data-start="458" data-end="466"&gt;NAND&lt;/strong&gt; when the external flashes supported by Zephyr are &lt;strong data-start="517" data-end="524"&gt;NOR &lt;/strong&gt;(&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88000/what-about-the-actual-flash-support-in-nrf-connect-sdk"&gt;I asked about it in the past&lt;/a&gt;)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr MSC example fails with 'PM_storage_partition_ID' undeclared on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/525510?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 13:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69810582-da03-4eb1-a354-022647699d55</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How did you build the sample? The sample only works without sysbuild (so either check the &amp;quot;No sysbuild&amp;quot; radio button at the bottom when making a build configuration in VS Code, or use --no-sysbuild if building with west direclty from the command line.&lt;/p&gt;
&lt;p&gt;Also, you need to specify the storage as explained in the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/subsys/usb/mass/README.html#usb-mass"&gt;sample documentation.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is an example configuration from VS Code:&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/pastedimage1741006841846v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>