mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 23:40:21 +08:00
36f07f5c44
When ESP32's flat build mode is selected with the external PSRAM on USER_HEAP mode, the ROM strdup internally calls malloc which may be mapped to a different heap than lib_free, causing cross-heap allocation issues and system crashes. This commit adds a new Kconfig option ESP32_DONT_USE_ROM_LIBC to allow using NuttX libc instead of ROM newlib functions. When USER_HEAP mode is selected, this option is automatically enabled. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>