Flash configuration (LittleFS backend)

Asset Tracker Template

tags
Asset Tracker Template

The littlefs_storage partition (size and host flash chip) is defined in devicetree. app/boards/att_flash_partitions.dtsi declares the partition on external SPI-NOR and the lfs1 zephyr,fstab,littlefs entry (mount point /att_storage, automount). Board overlays thingy91x_nrf9151_ns.overlay and nrf9151dk_nrf9151_ns.overlay include that file.

To resize the partition, edit the second reg cell of littlefs_storage in att_flash_partitions.dtsi, and shrink external_flash_partition by the same amount. To move the partition to internal flash, declare a littlefs_storage node under the partitions node of &flash0 instead. The 1 MiB internal flash of the nRF9151 is already used heavily by slot0_partition, so use external flash for any non-trivial storage size.