<?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>littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85123/littlefs-sample-on-nrf5340dk-not-running</link><description>Hello, 
 I would like to use littlefs on the nrf5340dk board with the OnBoard Flash. So I selected the Zephyr/samples/subsys/fs/littlefs sample Project with the nrf5340dk board. Unfortunately the sample Project contains only nrf52840dk_nrf52840 conf and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Feb 2022 08:28:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85123/littlefs-sample-on-nrf5340dk-not-running" /><item><title>RE: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354943?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7edc8970-4132-4100-8f0b-92af547de226</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="ErwinCes"] I thought a special device tree update would be required for my board too. But that&amp;#39;s wrong. All stuff is already in the provided device tree[/quote]
&lt;p&gt;There should be board overlays in the littlefs2.zip.&lt;br /&gt;&lt;br /&gt;You need the overlay to tell the nRF5340 to use the external flash for littlefs instead of internal flash.&lt;br /&gt;Here is the sample built without overlays, and you can see it use NRF_FLASH_DRV_NAME:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.7.99-ncs1  ***
Area 6 at 0xfa000 on NRF_FLASH_DRV_NAME for 24576 bytes
/lfs mount: 0
/lfs: bsize = 16 ; frsize = 4096 ; blocks = 6 ; bfree = 4
/lfs/boot_count stat: 0
	fn &amp;#39;boot_count&amp;#39; size 4
/lfs/boot_count read count 3: 4
/lfs/boot_count seek start: 0
/lfs/boot_count write new boot count 4: 4
/lfs/boot_count close: 0
/lfs opendir: 0
  F 4 boot_count
End of files
/lfs unmount: 0
[00:00:00.261,444] &amp;lt;inf&amp;gt; littlefs: LittleFS version 2.4, disk version 2.0
[00:00:00.261,596] &amp;lt;inf&amp;gt; littlefs: FS at NRF_FLASH_DRV_NAME:0xfa000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.261,627] &amp;lt;inf&amp;gt; littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.262,115] &amp;lt;inf&amp;gt; littlefs: /lfs mounted
[00:00:00.290,313] &amp;lt;inf&amp;gt; littlefs: /lfs unmounted
&lt;/pre&gt;&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: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354942?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a77ebc-3850-4b45-969a-80e463eaf102</guid><dc:creator>ErwinCes</dc:creator><description>&lt;p&gt;Great, it works for me too.&lt;/p&gt;
&lt;p&gt;I think I know my error: as there are special board files in the samble board directory I thought a special device tree update would be required for my board too. But that&amp;#39;s wrong. All stuff is already in the provided device tree (which makes sense). so no need to copy any device tree file.&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;Erwin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354939?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:17:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56541d81-b337-46bf-9697-ce46f983768e</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Yep, it is running without error on my nRF5340dk board. &lt;br /&gt;Here is the output I get:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.7.99-ncs1  ***
Area 0 at 0x0 on MX25R64 for 65536 bytes
/lfs1 automounted
52,563] lfs1: bsize = 16 ; frsize = 4096 ; blocks = 16 ; bfree = 14
[0m&amp;lt;inf&amp;gt; /lfs1/boot_count stat: 0
	fn &amp;#39;boot_count&amp;#39; size 4
littl/lfs1/boot_count read count 11: 4
/lfs1/boot_count seek start: 0
/lfs1/boot_count write new boot count 12: 4
efs:/lfs1/boot_count close: 0
 litt/lfs1 opendir: 0
lefs parti  F 4 boot_count
End of files
/lfs1 unmount: 0
tion at /lfs1
[00:00:00.252,563] &amp;lt;inf&amp;gt; littlefs: LittleFS version 2.4, disk version 2.0
[00:00:00.252,593] &amp;lt;inf&amp;gt; littlefs: FS at MX25R64:0x0 is 16 0x1000-byte blocks with 512 cycle
[00:00:00.252,624] &amp;lt;inf&amp;gt; littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.254,577] &amp;lt;inf&amp;gt; littlefs: /lfs1 mounted
[00:00:00.254,608] &amp;lt;inf&amp;gt; littlefs: Automount /lfs1 succeeded
[00:00:00.295,745] &amp;lt;inf&amp;gt; littlefs: /lfs1 unmounted
&lt;/pre&gt;&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: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354937?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05e1aa94-e042-42c1-80c4-4607d9a8dc53</guid><dc:creator>ErwinCes</dc:creator><description>&lt;p&gt;Before simply trying it: ist littlefs2.zip running on your side on a nrf5340dk board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354935?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c83a280-4ecd-408c-8603-401d70352812</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Good idea to upload your project!&lt;br /&gt;I tried to run your project,&amp;nbsp; and I get the same error as you.&lt;/p&gt;
[quote user=""]So I selected the Zephyr/samples/subsys/fs/littlefs sample Project with the nrf5340dk board.[/quote]
&lt;p&gt;Did you edit the project, other than changing the names of the overlay files?&lt;/p&gt;
&lt;p&gt;Anyhow, here is my edited littlefs project,&lt;/p&gt;
&lt;p&gt;Here is the littlefs sample(from zephyr) where I have only added overlay files:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/littlefs2.zip"&gt;devzone.nordicsemi.com/.../littlefs2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;EDIT: Clarified some of my writing&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: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354926?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 07:35:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24bf7f7d-c7ee-4d30-ab23-b42ff8d9ad2a</guid><dc:creator>ErwinCes</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I thought it doesn&amp;#39;t harm to upload the whole Project. It&amp;#39;s practically the sample Project except that I copied and renamed the conf and overlay file to the nrf5340 board.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1134.littlefs.zip"&gt;devzone.nordicsemi.com/.../1134.littlefs.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;May be someone gets it running on the development board.&lt;/p&gt;
&lt;p&gt;Erwin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354856?ContentTypeID=1</link><pubDate>Thu, 24 Feb 2022 14:50:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37aaacc9-6d12-4e92-9108-25bd6dfcd8fc</guid><dc:creator>ErwinCes</dc:creator><description>&lt;p&gt;Here is the output&lt;pre class="ui-code" data-mode="text"&gt;Area 0 at 0x0 on MX25R64 for 65536 bytes
/lfs1 automounted
FAIL: statvfs: -2
/lfs1 unmount: -22
[00:00:00.249,755] &#x1B;[0m&amp;lt;inf&amp;gt; littlefs: littlefs partition at /lfs1&#x1B;[0m
[00:00:00.249,786] &#x1B;[0m&amp;lt;inf&amp;gt; littlefs: LittleFS version 2.4, disk version 2.0&#x1B;[0m
[00:00:00.249,786] &#x1B;[1;31m&amp;lt;err&amp;gt; littlefs: can&amp;#39;t get flash device: MX25R64&#x1B;[0m
[00:00:00.249,816] &#x1B;[1;31m&amp;lt;err&amp;gt; fs: fs mount error (-19)&#x1B;[0m
[00:00:00.249,816] &#x1B;[1;31m&amp;lt;err&amp;gt; littlefs: Automount /lfs1 failed: -19&#x1B;[0m
[00:00:47.808,532] &#x1B;[1;31m&amp;lt;err&amp;gt; fs: mount point not found!!&#x1B;[0m
[00:00:47.810,211] &#x1B;[1;31m&amp;lt;err&amp;gt; fs: fs not mounted (mp == 0x20000138)&#x1B;[0m&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: littlefs sample on nrf5340dk not running</title><link>https://devzone.nordicsemi.com/thread/354851?ContentTypeID=1</link><pubDate>Thu, 24 Feb 2022 14:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92316eb8-44c2-4c33-91d5-3a727d18fb8b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Erwin&lt;/p&gt;
&lt;p&gt;I ran the littlefs sample with the added board files as you described. It seems to run fine at my end, but I might have missed something.&lt;br /&gt;You might have to reset the device once after flashing before it works.&lt;/p&gt;
&lt;p&gt;Could you send the serial log from the littlefs sample?&lt;br /&gt;(use insert-&amp;gt;code in the editor)&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>