Cannot find File after mounting FatFs with VFS in read-only mode.
Posted: Thu Jun 01, 2023 4:47 pm
Hello, I have a file that I can create and open no problem with a build that uses the
function , but if I switch to read only mode using the
function I get the following error: errno(2) = No such file or directory.
This is my config for the spiflash function:
This is my config for the rawflash function:
It mounts just fine but for some reason fopen() cannot find the file anymore. I know for sure that the flashing process or application code is not deleting the file. If I re-flash the spiflash build without the code for creating the file I can still access it. What am I doing wrong?
Code: Select all
esp_vfs_fat_spiflash_mount(PERM_STORE_MOUNT_POINT, STORAGE_LABEL,
&mount_config);
function , but if I switch to read only mode using the
Code: Select all
esp_vfs_fat_rawflash_mount(PERM_STORE_MOUNT_POINT, STORAGE_LABEL,
&mount_config);
function I get the following error: errno(2) = No such file or directory.
This is my config for the spiflash function:
Code: Select all
const esp_vfs_fat_mount_config_t mount_config = {
.max_files = 3,
.format_if_mount_failed = true,
.allocation_unit_size = CONFIG_WL_SECTOR_SIZE
};
Code: Select all
const esp_vfs_fat_mount_config_t mount_config = {
.max_files = 3,
.format_if_mount_failed = false,
};