<?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>Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104108/can-usb-msd-and-usb-dfu-coexist-in-the-same-project</link><description>I&amp;#39;m trying to add the DFU feature in my USB MSD project but when I append the DFU configurations in the prj.conf I can&amp;#39;t compile. 
 The starting configuration is 
 
 The configuration with the DFU is 
 
 Now if I compile with the last configuration I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Sep 2023 14:55:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104108/can-usb-msd-and-usb-dfu-coexist-in-the-same-project" /><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/448000?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 14:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0fda08c-1427-4582-8b73-9e41dc879427</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Thoraz"]I have the same problem if I create a new DFU sample project (nothing about MSD) with no changes&amp;nbsp;except for my custom board and the&amp;nbsp;&lt;span&gt;CONFIG_PINCTRL&lt;/span&gt;&lt;span&gt;=y in the conf.prj . Maybe is off topic here, but I&amp;#39;m beginning to wonder if the definition of my board device tree is wrong somehow.&lt;/span&gt;[/quote]
&lt;p&gt;Since this new question is not related to MSD,&amp;nbsp;I would suggest that you open a new ticket.&lt;br /&gt;&lt;br /&gt;You can read more about custom boards in the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/board_support.html#custom-boards"&gt;documentation&lt;/a&gt;. There are some additional resources about&amp;nbsp;&lt;a href="https://nrfconnect.github.io/vscode-nrf-connect/guides/bd_boards_devices.html"&gt;boards and devices&lt;/a&gt;,&amp;nbsp;&lt;a href="https://nrfconnect.github.io/vscode-nrf-connect/reference/ui_sidebar_welcome.html#create-a-new-board"&gt;creating new board&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/porting/board_porting.html#board-porting-guide"&gt;board porting guide&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447877?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 08:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fe2dc0e-ee93-4947-ab4c-09d6afe742c3</guid><dc:creator>Andrea Verdecchia</dc:creator><description>[quote userid="111786" url="~/f/nordic-q-a/104108/can-usb-msd-and-usb-dfu-coexist-in-the-same-project/447764"]Hi,&lt;br /&gt;&lt;br /&gt;It seems that FAT FS on external flash is currently not working with partition manager.&amp;nbsp;&lt;br /&gt;You can find more information in this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98797/mass-example-with-external-flash-not-working-with-config_bootloader_mcuboot-y"&gt;discussion&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,[/quote]
&lt;p&gt;Hi dejans, ok for your precious information, but what about this&amp;nbsp;&lt;/p&gt;
[quote userid="112991" url="~/f/nordic-q-a/104108/can-usb-msd-and-usb-dfu-coexist-in-the-same-project/447638"]I&amp;#39;ve just tried to create a &lt;a href="https://github.com/AndrewLivesChaos/dfu_test"&gt;new DFU project&lt;/a&gt; from template. I didn&amp;#39;t change nothing, only added my custom board and the&amp;nbsp;&amp;nbsp;&lt;span&gt;CONFIG_PINCTRL&lt;/span&gt;&lt;span&gt;=y in the conf.prj . Nothing else. And I can&amp;#39;t build again. It seems that the qspi for the NOR flash is involved in some way. Is it possible?&lt;/span&gt;[/quote]
&lt;p&gt;?&lt;/p&gt;
&lt;p&gt;I have the same problem if I create a new DFU sample project (nothing about MSD) with no changes&amp;nbsp;except for my custom board and the&amp;nbsp;&lt;span&gt;CONFIG_PINCTRL&lt;/span&gt;&lt;span&gt;=y in the conf.prj . Maybe is off topic here, but I&amp;#39;m beginning to wonder if the definition of my board device tree is wrong somehow.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447788?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2023 15:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18bef413-4d7f-413a-b124-6b5509de87c1</guid><dc:creator>Andrea Verdecchia</dc:creator><description>&lt;p&gt;Ok,&amp;nbsp;I&amp;#39;ll have a look. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447764?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2023 14:13:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39ce6db2-55a0-48dc-b253-ceb6a411da09</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It seems that FAT FS on external flash is currently not working with partition manager.&amp;nbsp;&lt;br /&gt;You can find more information in this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98797/mass-example-with-external-flash-not-working-with-config_bootloader_mcuboot-y"&gt;discussion&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447638?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2023 07:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a26449c-d028-42c2-ac04-35d69de59492</guid><dc:creator>Andrea Verdecchia</dc:creator><description>&lt;p&gt;I&amp;#39;ve just tried to create a &lt;a href="https://github.com/AndrewLivesChaos/dfu_test"&gt;new DFU project&lt;/a&gt; from template. I didn&amp;#39;t change nothing, only added my custom board and the&amp;nbsp;&amp;nbsp;&lt;span&gt;CONFIG_PINCTRL&lt;/span&gt;&lt;span&gt;=y in the conf.prj . Nothing else. And I can&amp;#39;t build again. It seems that the qspi for the NOR flash is involved in some way. Is it possible? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But if I exclude commenting on the QSPI part in my device tree file&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;qspi {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;qspi_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;qspi_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;

	mt25qu512: mt25qu512@0 {
		compatible = &amp;quot;nordic,qspi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		writeoc = &amp;quot;pp4io&amp;quot;;
		readoc = &amp;quot;read4o&amp;quot;;
		sck-frequency = &amp;lt;8000000&amp;gt;;
		jedec-id = [20 bb 20];
		sfdp-bfp = [
			e5 20 fb ff  ff ff ff 1f  29 eb 27 6b  27 3b 27 bb
			ff ff ff ff  ff ff 27 bb  ff ff 29 eb  0c 20 10 d8
			0f 52 00 00  24 4a 99 00  8b 8e 03 e1  ac 01 27 38
			7a 75 7a 75  fb bd d5 5c  4a 0f 82 ff  81 bd 3d 36
		];
		size = &amp;lt;536870912&amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt;10000&amp;gt;;
		t-exit-dpd = &amp;lt;35000&amp;gt;;
	};
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and I don&amp;#39;t use the overlay file&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;mt25qu512 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		flash_storage_partition: partition@0 {
			label = &amp;quot;flash-storage&amp;quot;;
			reg = &amp;lt;0x00000000 0x04000000&amp;gt;;
		};
	};
};

/ {
	msc_disk0 {
		compatible = &amp;quot;zephyr,flash-disk&amp;quot;;
		partition = &amp;lt;&amp;amp;flash_storage_partition&amp;gt;;
		disk-name = &amp;quot;NAND&amp;quot;;
		cache-size = &amp;lt;4096&amp;gt;;
	};
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it builds successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe there is something wrong in the definition of my custom board?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447577?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 19:28:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe6ec375-0e76-455c-a63c-aa72e0b95fba</guid><dc:creator>Andrea Verdecchia</dc:creator><description>&lt;p&gt;Thanks Dejan for your response. Perhaps I should have specified that I&amp;#39;m working on a custom board which mounts an external NOR flash (interfaced througth qspi, as in the 52840 DK) for the MDS feature. So I&amp;#39;m working with a custom device tree in VS Code nRF Connect environment. Maybe is better if I share with you my whole project &lt;a href="https://github.com/AndrewLivesChaos/mass_test"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you say to replace CONFIG_DISK_DRIVER_FLASH=y with CONFIG_DISK_DRIVER_RAM=y, doesn&amp;#39;t it means to use the RAM instead of external NOR flash? Can you explain your replacing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can USB MSD and USB DFU coexist in the same project?</title><link>https://devzone.nordicsemi.com/thread/447548?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 16:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff5ebcf2-f06b-47eb-aeec-219aeb36727f</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I have tried to reproduce your issue using NCS v2.3.0. Build failed when I used your configuration, but I did not see the same error as you when CONFIG_DISK_DRIVER_FLASH=y was included in prj.conf. I got mass sample to successfully build with your configuration by replacing&amp;nbsp;&lt;span&gt;CONFIG_DISK_DRIVER_FLASH=y with&amp;nbsp;CONFIG_DISK_DRIVER_RAM=y. I used following build command:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build --build-dir &amp;lt;your_project_folder&amp;gt;/build &amp;lt;your_project_folder&amp;gt; --pristine --board nrf52840dk_nrf52840 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=&amp;quot;NONE&amp;quot; -DCONF_FILE=&amp;quot;&amp;lt;your_project_folder&amp;gt;/prj.conf&amp;quot; -DDTC_OVERLAY_FILE=&amp;quot;boards/nrf52840dk_nrf52840.overlay&amp;quot;&lt;/pre&gt;&lt;br /&gt;Additionally, I needed to replace #include&amp;lt;zephyr/usb/class/usbd_msc.h&amp;gt; with&amp;nbsp;#include&amp;lt;zephyr/usb/class/usb_msc.h&amp;gt; in the main.c file.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>