filesystem fatfs function unavailable
Posted: Tue Aug 20, 2024 11:17 pm
I was reading from the doc about fatfs, and I found out about these two functions that I need to use to preallocate a contiguous file on my sd card, since I'm working on a tiny database project and I want my file to be contiguous for performance reasons.
The problem is that the provided includes from #include "esp_vfs_fat.h" and from #include "ff.h" don't seem to work, and I can't find out why, originally I was trying to use the "f_expand()" function right from the fatfs doc:
but even after trying to include the correct files, functions from the "esp_vfs_fat.h" header like "esp_vfs_fat_sdspi_mount()" will work, but the function which I need "esp_vfs_fat_create_contiguous_file()" from that same header won't work, even if I included the headers. same thing for f_expand() with fatfs, I am able to f_open() a file for example, but it seems impossible to call f_expand(),
which I currently really need since I wanted to directly overwrite over my file sectors using the sdmmc_write_sectors function from the espressif drivers and I can't do that with a fragmented file.
I even tried to downgrade the esp extension in visual studio from 5.3 to 5.0 with no success
Thanks for any help, that would be really appreciated!
The problem is that the provided includes from #include "esp_vfs_fat.h" and from #include "ff.h" don't seem to work, and I can't find out why, originally I was trying to use the "f_expand()" function right from the fatfs doc:
Code: Select all
The f_expand function prepares or allocates a contiguous data area to the file.
FRESULT f_expand (
FIL* fp, /* [IN] File object */
FSIZE_t fsz, /* [IN] File size expanded to */
BYTE opt /* [IN] Allocation mode */
);
which I currently really need since I wanted to directly overwrite over my file sectors using the sdmmc_write_sectors function from the espressif drivers and I can't do that with a fragmented file.
I even tried to downgrade the esp extension in visual studio from 5.3 to 5.0 with no success
Thanks for any help, that would be really appreciated!