Page 1 of 1

Vfs max number of file system

Posted: Wed Nov 19, 2025 4:12 pm
by MattiaBerton
Hello,
I'm using an ESP32S3 with IDF 5.2. I see that 2 slots of the virtual filesystem are occupied from "dev console" and "dev uart". What are they used for? Can I remove them in order to reduce the max number of virtual file system? Where can I remove them, since I don't find anything in the sdkconfig?
Thanks,
Mattia Berton

Re: Vfs max number of file system

Posted: Thu Nov 20, 2025 2:19 am
by nopnop2002
What are they used for?
/dev/console sample code is here.
https://github.com/espressif/esp-idf/tr ... mihost_vfs


/dev/uart sample code is here.
https://github.com/espressif/esp-idf/tr ... art_select

Re: Vfs max number of file system

Posted: Thu Nov 20, 2025 9:14 am
by RathiSonika
1. /dev/uart : Provides UART devices as file-like interfaces (/dev/uart/N). It is what standard I/O (stdin/stdout/stderr) uses when the console is routed over UART.
2. /dev/console : The console VFS handles the standard C I/O streams (printf, scanf, etc.) and routes them to the selected backend (UART, USB-Serial-JTAG, etc.). It also manages newline handling, buffering, and similar console behaviors.

These two VFS drivers cannot be fully disabled via Kconfig — they are part of ESP-IDF’s core console/VFS subsystem.

Risks
* Removing dev_uart eliminates file-like access to UART and breaks UART-based console I/O.
* Removing dev_console disables standard C-library I/O.
* This can impact debugging, logging, and anything using printf, scanf, or fopen("/dev/...").

Recommendation
* If you only need to free VFS slots, adjust CONFIG_VFS_MAX_COUNT in sdkconfig.
* If console I/O isn’t needed (e.g., production firmware), set console output to None, which routes it to /dev/null without removing drivers.