Mechanics, limitation and how to modify the partition size of FATfs

kcsumpete
Posts: 1
Joined: Fri Sep 11, 2020 1:02 am

Mechanics, limitation and how to modify the partition size of FATfs

Postby kcsumpete » Fri Sep 11, 2020 1:13 am

Hi guys

viewtopic.php?t=3970
https://www.esp32.com/viewtopic.php?t=6878
viewtopic.php?t=1897
https://docs.espressif.com/projects/esp ... lling.html

based off the above info, some NVS basics and mechanics were explained in details. Is it the same for FATfs ?

Since i need to resize the partition size I modified the sector size from 4096 to 512 in the menuconfig wear level options. My question is whether the partition size will be adjusted automatically after doing this change, or it has to be done manually in the csv file. Are there any guides as to how to set the size of the partition ? I am trying out different partition sizes, and there really doesn't seem to be any guide indicating how to calculate the max/min sizes of the FAT partition.

On the side note, I would like to know if I adjust the partition size to 512kb after modifying the sector size to 512, what is the largest file size i can write to this partition( how to calculate the overhead of a file), how are the rewrites/updating done on the file ( does it erase the whole file and rewrite the new content back to the partition ) or does it compare the modified sectors and write to those sectors on demand ?

In addition, let's say I have a file that is 2kb large , and based on 4096 WL sector , is the whole 4096 sector erased and then rewritten when i update the file, or are there different mechanics to how the file is updated? thx for any clues.

Who is online

Users browsing this forum: No registered users and 146 guests