mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Rename the internal ULP child-build marker to __ULP_BUILDV2 so component CMake files make the build-system scope explicit. Document that the marker is currently set only by the IDF_BUILD_V2 ULP child path.
57 lines
1.5 KiB
CMake
57 lines
1.5 KiB
CMake
idf_build_get_property(target IDF_TARGET)
|
|
if(${target} STREQUAL "linux")
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
endif()
|
|
|
|
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)
|