Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Oct 21, 2025

Description:

Documents the new advanced ESP-IDF framework configuration options for disabling unused VFS (Virtual File System) features, saving approximately 5 KB of flash memory by default.

This documentation PR adds details for three new options under esp32.framework.advanced:

  • disable_vfs_support_termios (default: true) - Disables VFS support for termios functions, saving ~1.8 KB
  • disable_vfs_support_select (default: true) - Disables VFS support for select() with file descriptors, saving ~2.7 KB
  • disable_vfs_support_dir (default: true) - Disables VFS support for directory functions, saving ~0.5 KB

These optimizations are safe because:

  • ESPHome doesn't use termios functions on ESP32 (only in host UART driver)
  • ESPHome uses lwip_select() for socket operations, which works independently of VFS select
  • ESPHome doesn't use directory operations on ESP32
  • Components that require VFS features (e.g., OpenThread) automatically enable them via require_vfs_select() or require_vfs_dir() helpers
  • Socket operations continue to work normally with VFS select disabled

Related issue (if applicable): N/A

Pull request in esphome with YAML changes (if applicable):

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

Copilot AI review requested due to automatic review settings October 21, 2025 06:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Documents new ESP-IDF framework configuration options that disable unused VFS (Virtual File System) features on ESP32, saving approximately 4.5 KB of flash memory by default.

  • Added documentation for disable_vfs_support_termios and disable_vfs_support_select options
  • Explained why these optimizations are safe for ESPHome use cases
  • Updated example configuration to demonstrate the new options

@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 6e7d905
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/68f735319055870008ebe63d
😎 Deploy Preview https://deploy-preview-5507--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jesserockz jesserockz merged commit a30054b into next Oct 21, 2025
4 checks passed
@jesserockz jesserockz deleted the esp32_vfs_unused branch October 21, 2025 21:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants