Skip to content

Commit de0a8c6

Browse files
committed
[esp32] Document disable_libc_locks_in_iram option
1 parent e7bbf63 commit de0a8c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

content/components/esp32.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ LWIP (Lightweight IP) behavior. Some options improve performance while others sa
164164
- **enable_lwip_check_thread_safety** (*Optional*, boolean): Enable LWIP thread safety checks to detect incorrect usage of
165165
the TCP/IP stack from multiple threads. This helps catch thread safety issues when core locking is enabled. Defaults to `true`.
166166

167+
- **disable_libc_locks_in_iram** (*Optional*, boolean): Disable placing libc lock functions in IRAM. This saves approximately
168+
1.6KB of IRAM by placing these functions in flash memory instead. This is safe for ESPHome since no IRAM interrupt service
169+
routines (ISRs that run while cache is disabled) use libc lock APIs. Defaults to `true` (IRAM placement disabled to save RAM).
170+
167171
Some options can be disabled to save flash memory without affecting typical ESPHome functionality. The performance
168172
options (defaulting to `true` ) improve socket operation performance but can be disabled if you need better
169173
multi-threaded scalability (which is uncommon since ESPHome uses an event loop).
@@ -182,6 +186,7 @@ esp32:
182186
enable_lwip_check_thread_safety: true # Thread safety validation
183187
184188
# Memory saving options
189+
disable_libc_locks_in_iram: true # Enabled by default, saves 1.6KB IRAM
185190
enable_lwip_dhcp_server: false # Disabled by default, only needed for AP mode
186191
enable_lwip_mdns_queries: false # Enabled by default, can disable if not using .local hostnames
187192
enable_lwip_bridge_interface: false # Disabled by default

0 commit comments

Comments
 (0)