Files
esp-idf/components/esp_hal_dma/CMakeLists.txt
armando 6e3abd12a1 refactor(spi_flash): move os layer to esp_mspi and chip configs to spi_flash
Also fixes the implicit dependency on esp_partition.
2026-09-09 14:17:00 +08:00

54 lines
1.4 KiB
CMake

idf_build_get_property(target IDF_TARGET)
set(srcs)
set(public_include "include")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
list(APPEND public_include "${target}/include")
endif()
# TODO(IDF-15991): potentially remove __ULP_BUILDV2 handling from esp_hal_dma
if(__ULP_BUILDV2)
# LP-core SPI uses components/esp_hal_gpspi/include/hal/spi_slave_hd_hal.h,
# whose public headers include DMA HAL descriptor types.
idf_component_register(INCLUDE_DIRS ${public_include}
REQUIRES soc hal)
return()
endif()
if(CONFIG_SOC_GDMA_SUPPORTED)
list(APPEND srcs "gdma_hal_top.c" "${target}/gdma_periph.c")
if(CONFIG_SOC_GDMA_SUPPORT_CRC)
list(APPEND srcs "gdma_hal_crc_gen.c")
endif()
if(CONFIG_SOC_AHB_GDMA_VERSION EQUAL 1)
list(APPEND srcs "gdma_hal_ahb_v1.c")
endif()
if(CONFIG_SOC_AHB_GDMA_VERSION EQUAL 2)
list(APPEND srcs "gdma_hal_ahb_v2.c")
endif()
if(CONFIG_SOC_AXI_GDMA_SUPPORTED)
list(APPEND srcs "gdma_hal_axi.c")
endif()
endif()
if(CONFIG_SOC_DW_GDMA_SUPPORTED)
list(APPEND srcs "dw_gdma_hal.c")
endif()
if(CONFIG_SOC_DMA2D_SUPPORTED)
list(APPEND srcs "dma2d_hal.c" "${target}/dma2d_periph.c")
endif()
if(CONFIG_SOC_CP_DMA_SUPPORTED)
list(APPEND srcs "cp_dma_hal.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${public_include}
REQUIRES soc hal)