feat(ulp): build legacy ULP APIs through CMake v2 shim

This commit is contained in:
Renz Bagaporo
2026-07-29 13:08:22 +09:00
parent 82b28b2641
commit 288b9a6e00
21 changed files with 465 additions and 46 deletions
+16
View File
@@ -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()