<?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>External flash partitions (LittleFS) not detected with nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118417/external-flash-partitions-littlefs-not-detected-with-nrf5340</link><description>Hi, 
 I have a firmware project that was originally developed for an nRF52833. It successfully mounts LittleFS on 3 partitions in external flash. For the nRF52833 I was simply able to define these partitions in my DTS without using the Partition Manager</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jan 2025 09:27:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118417/external-flash-partitions-littlefs-not-detected-with-nrf5340" /><item><title>RE: External flash partitions (LittleFS) not detected with nRF5340</title><link>https://devzone.nordicsemi.com/thread/520667?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2025 09:27:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4c92e8-71d3-40bb-b546-44a505d7e303</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;I would recommend you to take a look at the demo Vidar posted here&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/110364/nrf5340-dk-partition-manager-for-external-flash"&gt;nRF5340-DK: Partition Manager for external flash&lt;/a&gt;&amp;nbsp;&lt;br /&gt;I think it is exactly what you need&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External flash partitions (LittleFS) not detected with nRF5340</title><link>https://devzone.nordicsemi.com/thread/520620?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 19:19:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:303c9158-437d-4b33-b46a-01bc933e8f28</guid><dc:creator>Parker Lloyd</dc:creator><description>&lt;p&gt;Hi Runar,&lt;/p&gt;
&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;I have not explicitly enabled mcumgr. I have attached my prj.conf to this reply. I suspect some other config is enabling the Partition Manager without me knowing.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7455.prj.conf"&gt;devzone.nordicsemi.com/.../7455.prj.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After building the application for the nRF5340, I can see it identifying the partitions in the build files.&lt;/p&gt;
&lt;p&gt;Here is my partitions.yml&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xfe000
  end_address: 0x100000
  placement:
    after:
    - settings_storage
  region: flash_primary
  size: 0x2000
app:
  address: 0x0
  end_address: 0xfc000
  region: flash_primary
  size: 0xfc000
display_partition:
  address: 0x370000
  end_address: 0x7fc000
  placement:
    after: user_partition
    within: littlefs_storage
  region: external_flash
  size: 0x48c000
external_flash:
  address: 0x1000000
  end_address: 0x800000
  region: external_flash
  size: -0x800000
littlefs_storage:
  address: 0x0
  end_address: 0x800000
  placement:
    before: end
  region: external_flash
  size: 0x800000
log_partition:
  address: 0x7fc000
  end_address: 0x800000
  placement:
    after: display_partition
    within: littlefs_storage
  region: external_flash
  size: 0x4000
otp:
  address: 0xff8100
  end_address: 0xff83fc
  region: otp
  size: 0x2fc
rpmsg_nrf53_sram:
  address: 0x20070000
  end_address: 0x20080000
  placement:
    before:
    - end
  region: sram_primary
  size: 0x10000
settings_storage:
  address: 0xfc000
  end_address: 0xfe000
  placement:
    align:
      start: 0x4000
    before:
    - end
  region: flash_primary
  size: 0x2000
sram_primary:
  address: 0x20000000
  end_address: 0x20070000
  region: sram_primary
  size: 0x70000
user_partition:
  address: 0x0
  end_address: 0x370000
  placement:
    within: littlefs_storage
  region: external_flash
  size: 0x370000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is my regions.yml&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;external_flash:
  base_address: 0x0
  default_driver_kconfig: CONFIG_PM_EXTERNAL_FLASH_HAS_DRIVER
  device: DT_CHOSEN(nordic_pm_ext_flash)
  dynamic_partition: null
  name: external_flash
  placement_strategy: start_to_end
  size: 0x800000
flash_primary:
  base_address: 0x0
  default_driver_kconfig: CONFIG_SOC_FLASH_NRF
  device: flash_controller
  dynamic_partition: null
  name: flash_primary
  placement_strategy: complex
  size: 0x100000
otp:
  base_address: 0xff8100
  default_driver_kconfig: &amp;#39;&amp;#39;
  device: &amp;#39;&amp;#39;
  dynamic_partition: null
  name: otp
  placement_strategy: start_to_end
  size: 0x2fc
sram_primary:
  base_address: 0x20000000
  default_driver_kconfig: &amp;#39;&amp;#39;
  device: &amp;#39;&amp;#39;
  dynamic_partition: sram_primary
  name: sram_primary
  placement_strategy: complex
  size: 0x80000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My partitions.yml seems to indicate that the partitions are indeed contained within littlefs_storage for the build. I suspect I may need to change my application code to properly access the partitions.&amp;nbsp;My original code for the nRF52833 relied on the DTS partition nodes to access the partitions:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define USER_PARTITION_NODE    DT_NODELABEL( user_lfs )

FS_FSTAB_DECLARE_ENTRY( USER_PARTITION_NODE );

static struct fs_mount_t *user_mp    = &amp;amp;FS_FSTAB_ENTRY( USER_PARTITION_NODE );
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am still using this code for the nRF5340. Does this need to change?&lt;/p&gt;
&lt;p&gt;I am unsure what you mean by this:&lt;br /&gt;&lt;span&gt;Have you remembered to add the including flash config to the childimage for mcuboot?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Does Nordic have a simple example project that shows how to configure LittleFS partitions on external flash while using the Partition Manager?&lt;/p&gt;
&lt;p&gt;Parker&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External flash partitions (LittleFS) not detected with nRF5340</title><link>https://devzone.nordicsemi.com/thread/520498?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 07:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e480fa6-2540-40ca-bb11-aab591138085</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m looking into your issue. If you enable mcumgr then you need to use partition manager as it will ignore any changes you have done in the devicetree.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you remembered to add the including flash config to the childimage for mcuboot?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>