
I wrote a FAT32 driver years back that handled many files and used under 2K, a couple 512 byte buffers and some overhead....
Thanks!
RichardS
I think this does not work if its Arduino IDE related, I find no reference in any files to change.... I will keep looking, let me know if this does work with Arduino IDE.ESP_igrr wrote:By default, sd_card example in IDF uses 27K as you have mentioned.
First of all, if you only need 1 file and not 5 files open at the same time, you can modify ".max_files = 5" to ".max_files = 1" in the example source code.
Next, if you are not using wear_levelling library in your application, you can go into menuconfig > Component config > Wear levelling and change sector size from 4096 bytes to 512 bytes. Then FATFS will only support 512-byte sectors, which will reduce size of scratch buffers in FATFS library.
With these two changes the example will use around 3K or heap.
Users browsing this forum: No registered users and 93 guests