<?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>How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117093/how-to-configure-settings-api-to-work-on-a-specific-partition-defined-in-the-pm_static-yaml-file</link><description>I&amp;#39;m trying to get the settings api working with multiple partitions using little FS. Some of the implementation is specific to Nordic and was hoping to get an example of how to do it with the pm_static.yaml. The fs subsystem is working, but I&amp;#39;m not sure</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Jan 2025 22:21:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117093/how-to-configure-settings-api-to-work-on-a-specific-partition-defined-in-the-pm_static-yaml-file" /><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/518336?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2025 22:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5115337f-e740-4095-af91-2571c6fd6c6d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;v2.6.1 is optional to use sysbuild, so you also can use&amp;nbsp;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT=Y in the prj.conf.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="lcj"]&lt;p&gt;How would I get the board to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use littlefs vs NVS for everything (settings)?&lt;/li&gt;&lt;/ol&gt;[/quote]
&lt;p&gt;You can refer to &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/3098bb289f1050f5984e9fefdb1d12ea450234a4/samples/subsys/settings"&gt;samples/subsys/settings&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/fb23112160f8148d4729b3a262e6d532423db61c/tests/subsys/settings/file"&gt;tests/subsys/settings/file&lt;/a&gt;&amp;nbsp;&amp;nbsp;in the Zephyr tree.&amp;nbsp;&lt;/p&gt;
[quote user="lcj"]Use SPI vs QSPI[/quote]
&lt;p&gt;You can compare the differences by referring to the files under the&amp;nbsp;boards folder:&amp;nbsp;&lt;br /&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/pastedimage1736892413309v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517924?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2025 11:54:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f6351aa-8078-43dc-a81a-c0937bfbdb6f</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;With Sysbuild:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1736509847607v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It works:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1736509761709v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What is sysbuild vs build system defaults? I notice the build configuration looks different:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1736509942621v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;vs with build system defaults:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1736509988186v4.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why with sysbuild is it picking the external flash? Is it utilizing a .conf or .overlay not being included using build system defaults? If so, which one? Actually, I copied the .conf/.overlay in the boards file into another project and see the same result.&lt;/p&gt;
&lt;p&gt;How would I get the board to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use littlefs vs NVS for everything (settings)?&lt;/li&gt;
&lt;li&gt;Use SPI vs QSPI&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And where is the use of partition manager described along with settings like:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x200000
CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y
CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL=y
CONFIG_PM_PARTITION_SIZE_LITTLEFS=0x200000&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;If I&amp;#39;m putting using&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span&gt;CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;=0x200000&lt;/code&gt; and &lt;code&gt;CONFIG_PM_PARTITION_SIZE_LITTLEFS=0x200000&lt;/code&gt;, doesn&amp;#39;t that mean I&amp;#39;m setting the partition size? Why would I use those settings over the pm_static.yml?&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;And why do you put&amp;nbsp;&lt;span&gt;SB_CONFIG_BOOTLOADER_MCUBOOT&lt;/span&gt;&lt;span&gt;=y in sysbuild.conf? The Nordic video on &lt;a href="https://youtu.be/nmTRWR9b1AY?si=9YiQ5rRBmxK5M-Og&amp;amp;t=2697"&gt;Adding DFU&lt;/a&gt; shows using CONFIG_BOOTLOADER_MCUBOOT=Y in the prj.conf as does &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/exercise-3-fota-over-bluetooth-low-energy/"&gt;DevAcademy&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517811?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 22:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f0d631b-8e3b-4b71-b004-44c64bfebfe1</guid><dc:creator>lcj</dc:creator><description>&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/pastedimage1736461501274v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&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/pastedimage1736461532416v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517791?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 19:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f118d7f8-31d9-48cb-a999-0a9cca340f56</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="lcj"]Does the way you&amp;#39;re doing it mean the prj.conf and the&amp;nbsp;nrf5340dk_nrf5340_cpuapp.conf are both being used?[/quote]
&lt;p&gt;Yes.&amp;nbsp;&lt;br /&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/5314.pastedimage1736451456672v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user="lcj"]Are you using NVS and LittleFS? [/quote]
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;span&gt;non-volatile storage is used by Setting&lt;/span&gt; in that sample.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517565?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 23:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3038c3e9-5297-431a-b6c2-715d55c5bcd1</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I&amp;#39;m using the nRF Connect for VS Code. Does the way you&amp;#39;re doing it mean the prj.conf and the&amp;nbsp;nrf5340dk_nrf5340_cpuapp.conf are both being used?&lt;/p&gt;
&lt;p&gt;Are you using NVS and LittleFS? I see&amp;nbsp;&lt;code&gt;&lt;span&gt;CONFIG_FILE_SYSTEM_LITTLEFS&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;=y&lt;/code&gt; in the prj.conf.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Running &amp;quot;ninja partition_manager_report&amp;quot; in the build directory is giving me:&amp;nbsp;&lt;code&gt;zsh: command not found: ninja&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517562?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 22:39:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a1e8b78-81fa-4a3c-8239-7bc3d2e7ea0b</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="lcj"]Wouldn&amp;#39;t there be more blocks?[/quote]
&lt;p&gt;Could&amp;nbsp;you&amp;nbsp;build the code with sysbuild (&lt;span&gt;--sysbuild&lt;/span&gt;)?&lt;/p&gt;
&lt;p&gt;west command:&lt;br /&gt; &lt;code&gt;west build -p -b nrf5340dk_nrf5340_cpuapp -d build_nrf5340dk_nrf5340_cpuapp --sysbuild&amp;nbsp; &amp;amp;&amp;amp; west flash --build-dir build_nrf5340dk_nrf5340_cpuapp --recover&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The output log would look like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0xc000
I: littlefs partition at /lfs1slot
I: LittleFS version 2.5, disk version 2.0
I: FS at mx25r6435f@0:0x200000 is 512 0x1000-byte blocks with 512 cycle
I: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
I: Automount /lfs1 succeeded
*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Sample program to r/w files on littlefs
Area 8 at 0x200000 on mx25r6435f@0 for 2097152 bytes
/lfs1 automounted
/lfs1: bsize = 16 ; frsize = 4096 ; blocks = 512 ; bfree = 509

Listing dir /lfs1 ...
[FILE] boot_count (size = 1)
[FILE] pattern.bin (size = 547)
/lfs1/boot_count read count:1 (bytes: 1)
/lfs1/boot_count write new boot count 2: [wr:1]
------ FILE: /lfs1/pattern.bin ------
02 55 55 55 55 55 55 55 03 55 55 55 55 55 55 55
04 55 55 55 55 55 55 55 05 55 55 55 55 55 55 55
06 55 55 55 55 55 55 55 07 55 55 55 55 55 55 55
08 55 55 55 55 55 55 55 09 55 55 55 55 55 55 55
0a 55 55 55 55 55 55 55 0b 55 55 55 55 55 55 55
0c 55 55 55 55 55 55 55 0d 55 55 55 55 55 55 55
0e 55 55 55 55 55 55 55 0f 55 55 55 55 55 55 55
10 55 55 55 55 55 55 55 11 55 55 55 55 55 55 55
12 55 55 55 55 55 55 55 13 55 55 55 55 55 55 55
14 55 55 55 55 55 55 55 15 55 55 55 55 55 55 55
16 55 55 55 55 55 55 55 17 55 55 55 55 55 55 55
18 55 55 55 55 55 55 55 19 55 55 55 55 55 55 55
1a 55 55 55 55 55 55 55 1b 55 55 55 55 55 55 55
1c 55 55 55 55 55 55 55 1d 55 55 55 55 55 55 55
1e 55 55 55 55 55 55 55 1f 55 55 55 55 55 55 55
20 55 55 55 55 55 55 55 21 55 55 55 55 55 55 55
22 55 55 55 55 55 55 55 23 55 55 55 55 55 55 55
24 55 55 55 55 55 55 55 25 55 55 55 55 55 55 55
26 55 55 55 55 55 55 55 27 55 55 55 55 55 55 55
28 55 55 55 55 55 55 55 29 55 55 55 55 55 55 55
2a 55 55 55 55 55 55 55 2b 55 55 55 55 55 55 55
2c 55 55 55 55 55 55 55 2d 55 55 55 55 55 55 55
2e 55 55 55 55 55 55 55 2f 55 55 55 55 55 55 55
30 55 55 55 55 55 55 55 31 55 55 55 55 55 55 55
32 55 55 55 55 55 55 55 33 55 55 55 55 55 55 55
34 55 55 55 55 55 55 55 35 55 55 55 55 55 55 55
36 55 55 55 55 55 55 55 37 55 55 55 55 55 55 55
38 55 55 55 55 55 55 55 39 55 55 55 55 55 55 55
3a 55 55 55 55 55 55 55 3b 55 55 55 55 55 55 55
3c 55 55 55 55 55 55 55 3d 55 55 55 55 55 55 55
3e 55 55 55 55 55 55 55 3f 55 55 55 55 55 55 55
40 55 55 55 55 55 55 55 41 55 55 55 55 55 55 55

42 55 55 55 55 55 55 55 43 55 55 55 55 55 55 55
44 55 55 55 55 55 55 55 45 55 55 55 55 55 55 55
46 55 ab 
I: /lfs1 unmounted
/lfs1 unmount: 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Executing &amp;quot;ninja partition_manager_report&amp;quot; under the build folder would get the memory layout like this:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1736375840160v6.png" alt=" " /&gt;&lt;/p&gt;
[quote user="lcj"]How do you have settings running without something like this in the prj.conf:[/quote]
&lt;p&gt;I use&amp;nbsp;&lt;span&gt;non-volatile storage (&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_SETTINGS_NVS"&gt;&lt;code&gt;&lt;span&gt;CONFIG_SETTINGS_NVS&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;) by setting in the&amp;nbsp;nrf5340dk_nrf5340_cpuapp.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2019 Peter Bigot Consulting, LLC
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
#

# Need this when storage is on flash
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Need this when storage is on MX25R64
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

################################################################################
# Settings - Used to store real-time device configuration to flash.
CONFIG_NVS=y 
CONFIG_SETTINGS=y 
CONFIG_SETTINGS_NVS=y
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x200000 
CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y
CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL=y
CONFIG_PM_PARTITION_SIZE_LITTLEFS=0x200000&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MCUBoot is enabled by&amp;nbsp;SB_CONFIG_BOOTLOADER_MCUBOOT=y in the&amp;nbsp;sysbuild.conf.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517528?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 15:26:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27903972-218f-4101-891a-9e545236f4a7</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I get:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;(3.8.0)&amp;#160;xxx build % ninja partition_manager_report
zsh: command not found: ninja&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also prints are:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;I: littlefs partition at /lfs1
I: LittleFS version 2.5, disk version 2.0
I: FS at flash-controller@39000:0xf8000 is 8 0x1000-byte blocks with 512 cycle
I: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
I: Automount /lfs1 succeeded
*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Sample program to r/w files on littlefs
Area 0 at 0xf8000 on flash-controller@39000 for 32768 bytes
/lfs1 automounted
/lfs1: bsize = 16 ; frsize = 4096 ; blocks = 8 ; bfree = 5&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t there be more blocks?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How do you have settings running without something like this in the prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
CONFIG_SETTINGS_FS=y
CONFIG_SETTINGS_FS_DIR=&amp;quot;/lfs/settings&amp;quot;
CONFIG_SETTINGS_FS_FILE=&amp;quot;/lfs/settings/run&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;or MCUBoot without:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable MCUboot and FOTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE=&amp;quot;mcuboot/root-rsa-2048.pem&amp;quot;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517487?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 13:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1ac9ad6-79cf-40b0-b42f-9b5754687d8e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Executing &amp;quot;ninja partition_manager_report&amp;quot; under the build folder would show the memory layout, as my figure in the previous reply. My example is already enabled&amp;nbsp;&lt;span&gt;External Flash/Settings/MCUBoot as the memory layout indicates.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517468?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 12:57:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ea9456-1498-42fa-8710-baa3a8663cca</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I redownloaded the file and ran it successfully. I can also do that with the generic littlefs same. Now I need it to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use External Flash on the DK&lt;/li&gt;
&lt;li&gt;Use Settings&lt;/li&gt;
&lt;li&gt;Use MCUBoot&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517348?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 00:39:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b7998b7-1288-447e-ac27-bde2da7021a2</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;Did you have:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PARTITION_MANAGER_ENABLED=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to build and got when building:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/flash_map_partition_manager.c:12:10: fatal error: pm_config.h: No such file or directory
   12 | #include &amp;lt;pm_config.h&amp;gt;
      |          ^~~~~~~~~~~~~
compilation terminated.
[59/168] Building C object CMakeFiles/app.dir/src/main.c.obj
/Users/xxx/Downloads/littlefs/src/main.c: In function &amp;#39;littlefs_flash_erase&amp;#39;:
/Users/xxx/Downloads/littlefs/src/main.c:259:22: warning: implicit declaration of function &amp;#39;flash_area_flatten&amp;#39;; did you mean &amp;#39;flash_area_align&amp;#39;? [-Wimplicit-function-declaration]
  259 |                 rc = flash_area_flatten(pfa, 0, pfa-&amp;gt;fa_size);
      |                      ^~~~~~~~~~~~~~~~~~
      |                      flash_area_align
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/580e4ef81c/bin/cmake --build /Users/leojunquera/Downloads/littlefs/build&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/517322?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 19:06:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2d8cddd-1f60-47ea-857c-fa1d2ab642e2</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="lcj"]My intent was to start with littlefs, get partition manger working, get external flash working, get settings working, then get MCU Boot working. [/quote]
&lt;p&gt;Are you able to run my uploaded example without issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/516833?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 14:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16f45b3b-f047-42e5-87c1-66442e23e3f5</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I don&amp;#39;t know if I should start a new thread on this given that the request has changed based on the feedback but, if I am going to use dynamic partitioning using partition manger as recommended here and on &lt;a href="https://youtu.be/nmTRWR9b1AY?si=PLP6ppxMm6saVVkN&amp;amp;t=1878"&gt;this Nordic video&lt;/a&gt; (&amp;quot;I recommend that, while developing, you use dynamic partitioning&amp;quot;). I want to use partition manager for setting up partitions to support littlefs, settings, and MCU boot using external flash on the nRF5340 DK.&lt;/p&gt;
&lt;p&gt;I started as &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&amp;nbsp;did with the littlefs sample. I added CONFIG_PARTITION_MANAGER_ENABLED=y&amp;nbsp; to the prj.conf.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2019 Peter Bigot Consulting, LLC
#
# SPDX-License-Identifier: Apache-2.0
#

# Optionally force the file system to be recreated
#CONFIG_APP_WIPE_STORAGE=y

# fs_dirent structures are big.
CONFIG_MAIN_STACK_SIZE=4096

# Let __ASSERT do its job
CONFIG_DEBUG=y

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

CONFIG_FLASH=y
CONFIG_FLASH_MAP=y

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

CONFIG_SPI=y
CONFIG_PARTITION_MANAGER_ENABLED=y
#CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and got this error on build:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;fatal error: pm_config.h: No such file or directory
   12 | #include &amp;lt;pm_config.h&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My intent was to start with littlefs, get partition manger working, get external flash working, get settings working, then get MCU Boot working. I got stuck on the first step.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/516424?ContentTypeID=1</link><pubDate>Sat, 28 Dec 2024 20:34:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b15b576-9511-4e0f-8027-2837fbcf126b</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;Does it basically make mcuboot partitions for primary and secondary and everything else is just mount point we use for settings and mcuboot?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I guess I need to delete the pm_static.yml file:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;littlefs_storage:
  address: 0x0
  region: external_flash
  size: 0x200000
lvgl_raw_partition:
  address: 0x200000
  region: external_flash
  size: 0x200000
settings_storage:
  address: 0x400000
  size: 0x100000
  region: external_flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And the code in the overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/delete-node/ &amp;amp;storage_partition;

&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;;

		littlefs_storage: partition@0 {
			label = &amp;quot;littlefs_storage&amp;quot;;
			reg = &amp;lt;0x00000000 0x00200000&amp;gt;;
		};
		lvgl_raw_partition: partition@200000 {
			label = &amp;quot;lvgl_raw_partition&amp;quot;;
			reg = &amp;lt;0x00200000 0x00200000&amp;gt;;
		};
        settings_partition: partition@400000 {
            label = &amp;quot;settings_partition&amp;quot;;
            reg = &amp;lt;0x400000 0x100000 &amp;gt;;
        };
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I made the changes and with this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    LOG_DBG(&amp;quot;%s: bsize = %lu ; frsize = %lu ;blocks = %lu ; bfree = %lu&amp;quot;, 
		mp-&amp;gt;mnt_point,sbuf.f_bsize, 
		sbuf.f_frsize,sbuf.f_blocks, sbuf.f_bfree);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The output is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;filesystem_manager_init: /lfs: bsize = 16 ; frsize = 4096 ;blocks = 6 ; bfree = 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which doesn&amp;#39;t seem right. This is a nRF5340 DK with external flash. When I do it with the manual partitions I get:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;filesystem_manager_init: /lfs: bsize = 16 ; frsize = 4096 ;blocks = 512 ; bfree = 492&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I would like some way to use the&amp;nbsp;1 MB flash on the nRF5340 and the&amp;nbsp;&lt;span&gt;64 megabit external flash memory for mcu boot primary/secondary, files, and settings.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried with the littlefs sample and got this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/lfs: bsize = 16 ; frsize = 4096 ; blocks = 8 ; bfree = 6&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;From the code:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	LOG_PRINTK(&amp;quot;%s: bsize = %lu ; frsize = %lu ;&amp;quot;
		   &amp;quot; blocks = %lu ; bfree = %lu\n&amp;quot;,
		   mountpoint-&amp;gt;mnt_point,
		   sbuf.f_bsize, sbuf.f_frsize,
		   sbuf.f_blocks, sbuf.f_bfree);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which does not seem to be the external flash drive on the dk which should be 64megabit, right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is the right way to configure external flash for lfs, settings, and MCUboot? Should I use partition manager or have a pm_static.yml?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/515198?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 21:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05b93751-979b-4ff8-a1bb-806caf45aea4</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="lcj"]If I want to manage the partition size, so I can accurately relay how much space can support a device (like sensor log file size along with settings along with mcuboot)[/quote]
&lt;p&gt;I can understand your situation.&amp;nbsp;There are c&lt;span&gt;ommon variants of the Kconfig option&lt;/span&gt;&lt;span&gt;&amp;nbsp;to adjust the partition size. See&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/scripts/partition_manager/partition_manager.html#configuring_dynamic_partitions"&gt;Configuring dynamic partitions&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would still suggest letting the&amp;nbsp;&lt;span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/scripts/partition_manager/partition_manager.html"&gt;Partition Manager&lt;/a&gt; generate the partition file (under the build folder), and then duplicate and rename it to pm_static.yaml.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="lcj"]&lt;div&gt;&lt;span&gt;I want to have multiple partitions and use them for:&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Files&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Settings&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;MCUBoot&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;and be able to configure it so the setting subsystem will work.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is my example project&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/littlefs.7z"&gt;devzone.nordicsemi.com/.../littlefs.7z&lt;/a&gt; based on the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/a8ca36c91a813597f57d1f16a26292232827b74d/samples/subsys/fs/littlefs"&gt;littlefs&lt;/a&gt;&amp;nbsp;sample to enable mcuboot/Setting/LittleFileSystem and set the&amp;nbsp;littlefs_storage and&amp;nbsp;settings_storage on the nRF5340DK external flash. The memory layout generated by&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/scripts/partition_manager/partition_manager.html"&gt;Partition Manager&lt;/a&gt; looks like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1734385384505v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/514989?ContentTypeID=1</link><pubDate>Sat, 14 Dec 2024 14:14:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1535aba-5387-45a9-963f-50d21fa4c0a0</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;If I want to manage the partition size, so I can accurately relay how much space can support a device (like sensor log file size along with settings along with mcuboot) I would think the best approach would be to specify the partition. As nice has handling the partition automatically would be, it might not be right for every circumstance. I am using the nRF5340 DK currently and have a setting:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NORDIC_QSPI_NOR=y&lt;/pre&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;in the prj.conf.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The link you provided is helpful, and I will re-read it, but I have found it complex to implement what I am looking to do with it and some of the other materials on the same topic. I have communicated with some people who have more experience than I and they found it challenging as well. I thought this forum might be better if I asked a specific enough question.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I want to have multiple partitions and use them for:&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Files&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Settings&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;MCUBoot&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;and be able to configure it so the setting subsystem will work. I will need to move from the DK to custom hardware so I think it&amp;#39;s important to understand how this works and configure it cleanly.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/514346?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 17:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afe36b1b-6be0-499d-b10d-b039bf605a5c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What NCS version are you using? Are you using QSPI or SPI external flash?&lt;/p&gt;
&lt;p&gt;The Partition Manager will handle the partition automatically. See the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/scripts/partition_manager/partition_manager.html#external_flash_memory_partitions"&gt;External flash memory partitions&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_partitioning.html#ug-bootloader-external-flash"&gt;&lt;span&gt;Using external flash memory partitions&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;for more details on using external flash memory with MCUboot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/514114?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 19:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72a97a40-1a06-4b3d-a68a-9f6ea674892e</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I have littlefs working for one of the partitions. I would like to keep that working. I&amp;nbsp;would like to get multiple partitions to work. One specifically for settings and another for MCU Boot. This is a step in that direction. I want to get the 2nd partition running for settings and have the settings subsystem us it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure Settings API to work on a specific partition defined in the pm_static.yaml file</title><link>https://devzone.nordicsemi.com/thread/514094?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 16:31:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3252c60-e2b6-4284-9aea-0ec0dcb441ee</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]but I&amp;#39;m not sure how to configure the settings_storage partition to be used for settings.[/quote]
&lt;p&gt;You can enable&amp;nbsp;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL to let the partition manager decide automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, the error looks like it concerns the file system.&amp;nbsp;&lt;span&gt;The error &amp;quot;fs: file open error (-2)&amp;quot; corresponds to ENOENT (No such file or directory) and typically indicates that the file you&amp;#39;re trying to open does not exist or cannot be found.&amp;nbsp;&lt;/span&gt;You can take a look at the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/a8ca36c91a813597f57d1f16a26292232827b74d/samples/subsys/fs/littlefs"&gt;littlefs&lt;/a&gt;&amp;nbsp;sample.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>