Unable to Mount LittleFS File System On External Flash On NRF54L15-DK

Hi everyone,

I'm new to both nRF Connect SDK and Zephyr RTOS, and I’m trying to modify the official LittleFS FileSystem Sample to mount an external SPI flash as the storage backend.

So far, I haven't been successful in getting it to work.

I've attached the relevant files:

  • .overlay file with external flash node

  • prj.conf with the necessary config options

  • boards/<board_name>.yaml if needed

I'd really appreciate any advice, corrections, or working examples from anyone who has managed to get LittleFS working on external flash (especially using nordic,pm-ext-flash or similar).

Thanks in advance for your help!

Best regards,
Khalil

pm_static.yaml

nrf54l15dk_nrf54l15_cpuapp.conf2860.nrf54l15dk_nrf54l15_cpuapp.overlay

  • Hello Khalil,

    Could you please follow these steps:

    1. Remove your pm_static.yml from the project
    2. Build pristine once
    3. Verify that features in this build work. Stop here if this step failed.
    4. Copy the partitions.yml from that build directory as a new pm_static.yml
    5. Reconfigure the littlefs partition to external flash, remember to add some properties under the partitions as followed:
      affiliation:
        -disk
      extra_params: {
          disk_name: "littlefs",
          disk_cache_size: 4096,
          disk_sector_size: 512,
          disk_read_only: 0
        }

      Here is an example:
      littlefs_storage:
        address: 0xe7600
        end_address: 0x800000
        region: external_flash
        device: mx25r6435f
        size: 0x718000
        affiliation:
          -disk
        extra_params: {
            disk_name: "littlefs",
            disk_cache_size: 4096,
            disk_sector_size: 512,
            disk_read_only: 0
          }

    Hieu

Related