Page 1 of 1

Maximum number of open files

Posted: Thu Oct 31, 2019 2:03 pm
by gunar.kroeger
What is the maximum number of open files that we can have at the same time with esp-idf, and what are the configurations to get to this value?

currently we can't open more than 5. Is there a way to increase this number?

Re: Maximum number of open files

Posted: Thu Oct 31, 2019 4:13 pm
by PeterR
SPIFFS, FATFS?

Re: Maximum number of open files

Posted: Thu Oct 31, 2019 4:18 pm
by gunar.kroeger
FATFS on sdcard through spi

Re: Maximum number of open files

Posted: Fri Nov 01, 2019 7:27 pm
by PeterR
So,

Code: Select all

esp_vfs_fat_mount_config_t mount_config;
mount_config.max_files = (bigger number);
esp_err_t err = esp_vfs_fat_spiflash_mount(FATFS_BASE_PATH, "storage", &mount_config, &s_wl_handle);
You can mount FAT using other devices but you get the idea.
Make sure the rest of the mount_config structure suites your need.

EDIT: If you are using SD then you will need to use the MMC mount function instead, which ever function you use ATM.