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
Vfs max number of file system
-
nopnop2002
- Posts: 347
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Vfs max number of file system
/dev/console sample code is here.What are they used for?
https://github.com/espressif/esp-idf/tr ... mihost_vfs
/dev/uart sample code is here.
https://github.com/espressif/esp-idf/tr ... art_select
-
RathiSonika
- Espressif staff

- Posts: 27
- Joined: Thu Jun 22, 2023 2:58 pm
Re: Vfs max number of file system
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.
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.
Who is online
Users browsing this forum: ChatGPT-User and 3 guests