mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
46 lines
1.2 KiB
CMake
46 lines
1.2 KiB
CMake
idf_build_get_property(target IDF_TARGET)
|
|
idf_build_get_property(esp_tee_build ESP_TEE_BUILD)
|
|
|
|
set(srcs)
|
|
set(includes "include")
|
|
set(requires soc hal esp_hal_gpspi)
|
|
set(priv_requires esp_hal_gpio)
|
|
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
|
|
list(APPEND includes "${target}/include")
|
|
endif()
|
|
|
|
if(NOT "${target}" STREQUAL "linux")
|
|
# TODO: IDF-15106 remove esp_hal_clock dependency
|
|
list(APPEND requires "esp_hal_clock")
|
|
endif()
|
|
|
|
if(esp_tee_build)
|
|
if(CONFIG_SECURE_TEE_EXT_FLASH_MEMPROT_SPI1)
|
|
list(APPEND srcs "spi_flash_hal.c" "spi_flash_hal_iram.c")
|
|
endif()
|
|
elseif(NOT BOOTLOADER_BUILD)
|
|
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
|
|
if(CONFIG_SOC_SPI_FLASH_SUPPORTED)
|
|
list(APPEND srcs "spi_flash_hal.c" "spi_flash_hal_iram.c")
|
|
endif()
|
|
if(CONFIG_SOC_FLASH_ENC_SUPPORTED)
|
|
list(APPEND srcs "spi_flash_encrypt_hal_iram.c")
|
|
endif()
|
|
endif()
|
|
|
|
if(CONFIG_SOC_GPSPI_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32)
|
|
list(APPEND srcs "spi_flash_hal_gpspi.c")
|
|
endif()
|
|
|
|
endif()
|
|
|
|
list(APPEND srcs "${target}/mspi_periph.c")
|
|
|
|
idf_component_register(
|
|
SRCS ${srcs}
|
|
INCLUDE_DIRS ${includes}
|
|
REQUIRES ${requires}
|
|
PRIV_REQUIRES ${priv_requires}
|
|
)
|