Merge branch 'fix/psram_dependency' into 'master'

fix(build_system): cleaned up esp_psram dependencies

See merge request espressif/esp-idf!51934
This commit is contained in:
Marius Vikhammer
2026-08-25 10:39:01 +08:00
20 changed files with 115 additions and 64 deletions
+9 -1
View File
@@ -195,7 +195,15 @@ endif()
if(NOT BOOTLOADER_BUILD)
if(CONFIG_SPIRAM)
idf_component_optional_requires(PRIVATE esp_psram)
if(IDF_BUILD_V2)
# esp_psram is not required by any component unconditionally, so nothing else
# brings it into the build. Include it here, so that PSRAM support (and its
# startup hook) is part of any build which enables CONFIG_SPIRAM.
idf_component_include(esp_psram)
target_link_libraries(${COMPONENT_TARGET} PRIVATE idf::esp_psram)
else()
idf_component_optional_requires(PRIVATE esp_psram)
endif()
endif()
endif()