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.
68 lines
2.2 KiB
CMake
68 lines
2.2 KiB
CMake
idf_build_get_property(target IDF_TARGET)
|
|
idf_build_get_property(non_os_build NON_OS_BUILD)
|
|
|
|
# TODO(IDF-15954): potentially remove __ULP_BUILDV2 handling from log
|
|
if(__ULP_BUILDV2)
|
|
# LP-core UART wakeup support builds components/esp_driver_uart/src/uart_wakeup.c,
|
|
# which includes ESP log headers.
|
|
idf_component_register(INCLUDE_DIRS "include"
|
|
PRIV_INCLUDE_DIRS "include/esp_private"
|
|
REQUIRES esp_rom)
|
|
return()
|
|
endif()
|
|
|
|
if(non_os_build)
|
|
set(system_target "noos")
|
|
else()
|
|
if(${target} STREQUAL "linux")
|
|
set(system_target "linux")
|
|
else()
|
|
set(system_target "os")
|
|
endif()
|
|
endif()
|
|
|
|
set(srcs "src/${system_target}/log_timestamp.c"
|
|
"src/log_timestamp_common.c"
|
|
"src/${system_target}/log_lock.c"
|
|
"src/buffer/log_buffers.c"
|
|
"src/${system_target}/util.c"
|
|
"src/util.c"
|
|
"src/log_format_text.c"
|
|
"src/log_print.c"
|
|
"src/log.c")
|
|
|
|
if((NOT non_os_build AND CONFIG_LOG_MODE_TEXT_EN) OR (non_os_build AND CONFIG_BOOTLOADER_LOG_MODE_TEXT_EN))
|
|
list(APPEND srcs "src/log_format_text.c")
|
|
endif()
|
|
|
|
if((NOT non_os_build AND CONFIG_LOG_MODE_BINARY_EN) OR (non_os_build AND CONFIG_BOOTLOADER_LOG_MODE_BINARY_EN))
|
|
list(APPEND srcs "src/log_format_binary.c")
|
|
endif()
|
|
|
|
set(priv_requires hal)
|
|
|
|
if(NOT non_os_build)
|
|
list(APPEND priv_requires soc esp_hw_support)
|
|
|
|
list(APPEND srcs "src/os/log_write.c")
|
|
|
|
list(APPEND srcs "src/log_level/log_level.c"
|
|
"src/log_level/tag_log_level/tag_log_level.c")
|
|
|
|
if(CONFIG_LOG_TAG_LEVEL_IMPL_LINKED_LIST OR CONFIG_LOG_TAG_LEVEL_IMPL_CACHE_AND_LINKED_LIST)
|
|
list(APPEND srcs "src/log_level/tag_log_level/linked_list/log_linked_list.c")
|
|
endif()
|
|
|
|
if(CONFIG_LOG_TAG_LEVEL_CACHE_ARRAY)
|
|
list(APPEND srcs "src/log_level/tag_log_level/cache/log_array.c")
|
|
elseif(CONFIG_LOG_TAG_LEVEL_CACHE_BINARY_MIN_HEAP)
|
|
list(APPEND srcs "src/log_level/tag_log_level/cache/log_binary_heap.c")
|
|
endif()
|
|
endif()
|
|
|
|
idf_component_register(SRCS ${srcs}
|
|
INCLUDE_DIRS "include"
|
|
PRIV_INCLUDE_DIRS "include/esp_private"
|
|
LDFRAGMENTS linker.lf
|
|
PRIV_REQUIRES ${priv_requires})
|