Maximum number of open files

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Maximum number of open files

Postby gunar.kroeger » Thu Oct 31, 2019 2:03 pm

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?
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Maximum number of open files

Postby PeterR » Thu Oct 31, 2019 4:13 pm

SPIFFS, FATFS?
& I also believe that IDF CAN should be fixed.

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: Maximum number of open files

Postby gunar.kroeger » Thu Oct 31, 2019 4:18 pm

FATFS on sdcard through spi
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Maximum number of open files

Postby PeterR » Fri Nov 01, 2019 7:27 pm

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.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: dssman and 87 guests