mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(ulp): build legacy ULP APIs through CMake v2 shim
This commit is contained in:
@@ -8,6 +8,22 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
|
||||
list(APPEND includes "${target}/include")
|
||||
endif()
|
||||
|
||||
# TODO(IDF-15990): potentially remove __ULP_BUILD handling from esp_hal_uart
|
||||
if(__ULP_BUILD)
|
||||
# LP-core UART and print code includes UART HAL headers from
|
||||
# ulp/lp_core/lp_core/lp_core_uart.c and
|
||||
# ulp/lp_core/lp_core/lp_core_print.c.
|
||||
set(ulp_srcs)
|
||||
if(ULP_TYPE STREQUAL "lp_core" AND CONFIG_SOC_UART_SUPPORTED)
|
||||
list(APPEND ulp_srcs "uart_hal.c" "uart_hal_iram.c")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${ulp_srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
REQUIRES esp_common soc hal)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_UART_SUPPORTED)
|
||||
list(APPEND srcs "uart_hal.c" "uart_hal_iram.c" "${target}/uart_periph.c")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user