Target-specific defaults

Asset Tracker Template

tags
Asset Tracker Template

The block size comes from the mounted filesystem through fs_statvfs(). On the template's targets, the filesystem uses external SPI-NOR with CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096, which is 0x1000. The following table illustrates the minimal sizing for a small configuration of three data types with eight records per type. The shipped default is 1 MiB with up to 256 records per type, which needs far more blocks. To size that configuration, use the preceding formula, or read the LittleFS partition size verified log line that the LittleFS backend writes when it checks the sizing at initialization.

Target Block size Example blocks needed Example minimal partition
nRF9151 DK and Thingy:91 X, external SPI-NOR 0x1000 (4096 B) 8 + 3 metadata 0x2c000 (~176 KiB)
Internal flash, not recommended 0x1000 8 + 3 metadata 0x2c000

The default 1 MiB partition, 0x00100000, on both boards leaves ample margin for all enabled data types at CONFIG_APP_STORAGE_MAX_RECORDS_PER_TYPE=256.