FatFS partition of size < 1M ?
Posted: Sun Dec 17, 2017 5:11 pm
Hi,
I'm in need of storing JSON <4k of data to disk. A such I wanted to create a partition with a size of 10k. However, any call to esp_vfs_fat_spiflash_mount with a partition size of less than 1M fails.
A working partition table looks like this:
Removing just 4K bytes:
...causes this:
Is there a way to use fat-partitions of smaller than 1M size? I really don't want to waste nearly a mega byte for 4K of data that will be written a few times during setup then only read. I do understand that some overhead is needed to allow for wear leveling, but this much seems wasteful.
I'm in need of storing JSON <4k of data to disk. A such I wanted to create a partition with a size of 10k. However, any call to esp_vfs_fat_spiflash_mount with a partition size of less than 1M fails.
A working partition table looks like this:
Code: Select all
nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 0x150000
app_storage, data, fat, , 0x100000
Removing just 4K bytes:
Code: Select all
nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 0x150000
app_storage, data, fat, , 0xFF000
...causes this:
Code: Select all
E (200) wl_partition: erase_range - start_address=0x000fac00, size=0x00002000, result=0x00000102
E (206) wl_flash: initSections(257): result = 0x00000102
E (212) wl_flash: init(161): result = 0x00000102
E (218) wear_levelling: wl_mount: init instance=0x00000000, result=0x102
E (225) vfs_fat_spiflash: failed to mount wear levelling layer. result = 258