<?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>Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118765/little-fs-on-external-flash-with-nrf9161dk-and-ncs-2-8-0</link><description>Hi, 
 We are developing application software on the nrf9161dk that uses the little FS file system running on external FLASH. Most of the application development has been completed using NCS v2.4.0, and we are now porting the application to NCS v2.8.0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Feb 2025 17:34:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118765/little-fs-on-external-flash-with-nrf9161dk-and-ncs-2-8-0" /><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/524911?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 17:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c956edd-7589-459a-aec6-2abe00ef344d</guid><dc:creator>Neal Riedel</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Sorry for the slow response.&amp;nbsp; I didn&amp;#39;t see your post!&lt;/p&gt;
&lt;p&gt;I tried this fix and it solved the problem, both for the sample I posted and for our larger application.&lt;/p&gt;
&lt;p&gt;Thank you very much for your help!&lt;/p&gt;
&lt;p&gt;Neal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/523549?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 14:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:890674f2-c9d3-4552-9e28-fdc6b647f4b5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Try to set CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y in prj.conf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/522516?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 17:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:387dc8e2-7bd6-405b-acdf-2848dd8eb34b</guid><dc:creator>Neal Riedel</dc:creator><description>&lt;p&gt;Thanks, Sigurd.&amp;nbsp; Any help you can provide is greatly appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/522482?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 14:58:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56432b1f-f5eb-4b97-91bb-0451052dc4e0</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Neal Riedel"]Is it possible for you to provide a sample on the nrf9161dk that uses littlefs on the external flash with NCS v2.8.0?[/quote]
&lt;p&gt;I tried and I also get -2.&lt;/p&gt;
&lt;p&gt;I will have to dig some more into this &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/522312?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 22:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2239ca9-c80d-45ec-8783-0000fe6daf1f</guid><dc:creator>Neal Riedel</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thank you for your quick response.&amp;nbsp; I tried disabling the partition manager as you selected.&amp;nbsp; In addition, I changed main.c to remove the include of pm_config.h and updated the FLASH partition ID definition:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define FLASH_PARTITION_ID 		DT_N_S_soc_S_peripheral_50000000_S_spi_b000_S_gd25wb256e3ir_1_S_partitions_S_partition_0_PARTITION_ID&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I got the FLASH_PARTITION_ID value from inspecting the file&amp;nbsp;build/spi_flash_test/zephyr/include/generated/zephyr/devicetree_generated.h&lt;/p&gt;
&lt;p&gt;Unfortunately, the problem still exists.&amp;nbsp; The call to flash_area_open() returns &amp;quot;-2&amp;quot; indicating it cannot find the partition.&amp;nbsp; This is the same failure I had with the PM enabled.&lt;/p&gt;
&lt;p&gt;I think the problem is in the file zephyr/subsys/storage/flash_map/flash_map_default.c.&amp;nbsp; This file defines the default FLASH map that Zephyr uses to look for the partition ID:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* We iterate over all compatible &amp;#39;fixed-partitions&amp;#39; nodes and
 * use DT_FOREACH_CHILD to iterate over all the partitions for that
 * &amp;#39;fixed-partitions&amp;#39; node.  This way we build a global partition map
 */
const struct flash_area default_flash_map[] = {
	DT_INST_FOREACH_STATUS_OKAY(FOREACH_PARTITION)
};

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For some reason, it does not add the littlefs partition to this list.&lt;/p&gt;
&lt;p&gt;I also tried enabling the PM and using dynamic partitioning (i.e. I deleted the pm_static.yml file) as described in the sysbuild course.&amp;nbsp; I used &amp;quot;PM_littlefs_storage_ID&amp;quot; as the partition ID in main.c.&amp;nbsp; The result was that the littlefs file system is placed in on-chip FLASH.&amp;nbsp; This configuration works correctly.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, if I try to move it to external FLASH by building with&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;west build -b nrf9161dk -p -- -DCONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL=y&lt;/p&gt;
&lt;p&gt;The PM places the littlefs in external FLASH (as indicated by the partitions.yml file), but the sample does not work with the same &amp;quot;-2&amp;quot; error.&lt;/p&gt;
&lt;p&gt;Is it possible for you to provide a sample on the nrf9161dk that uses littlefs on the external flash with NCS v2.8.0?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Neal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/522186?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 12:41:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f619fcdf-a244-4f5b-add2-1ca823784dcb</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;With v2.8.0, you get the partition manager enabled by default. See some theory on this under our &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/"&gt;Sysbuild course&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;With the partition manager, DTS partitioning is mostly ignored.&lt;/p&gt;
&lt;p&gt;If you do not want nor need the partition manager, you can set SB_CONFIG_PARTITION_MANAGER=n in sysbuild.conf.&lt;/p&gt;
&lt;p&gt;Does that work?&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><item><title>RE: Little FS on external FLASH with nrf9161dk and NCS 2.8.0</title><link>https://devzone.nordicsemi.com/thread/522085?ContentTypeID=1</link><pubDate>Sat, 08 Feb 2025 19:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb58a75c-e74e-40a7-b600-b7b86a8329ca</guid><dc:creator>Neal Riedel</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_flash_5F00_test_5F00_9161.tgz"&gt;devzone.nordicsemi.com/.../spi_5F00_flash_5F00_test_5F00_9161.tgz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the source of the modified spi_flash_test application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>