2021-05-13 05:04:31 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
2024-03-11 09:44:33 -04:00
|
|
|
|
|
|
|
set(srcs "")
|
2021-06-02 23:59:00 -04:00
|
|
|
set(priv_requires "")
|
2024-03-11 09:44:33 -04:00
|
|
|
|
|
|
|
if(BOOTLOADER_BUILD)
|
|
|
|
list(APPEND srcs "log_noos.c")
|
2021-05-13 05:04:31 -04:00
|
|
|
else()
|
2024-03-11 09:44:33 -04:00
|
|
|
list(APPEND srcs "log.c")
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
list(APPEND srcs "log_linux.c")
|
|
|
|
else()
|
|
|
|
list(APPEND srcs "log_freertos.c")
|
|
|
|
list(APPEND priv_requires soc hal esp_hw_support)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Buffer APIs call ESP_LOG_LEVEL -> esp_log_write, which can not used in bootloader.
|
|
|
|
list(APPEND srcs "src/buffer/log_buffers.c"
|
|
|
|
"src/util.c")
|
2021-05-13 05:04:31 -04:00
|
|
|
endif()
|
2019-11-21 12:40:59 -05:00
|
|
|
|
|
|
|
idf_component_register(SRCS ${srcs}
|
2019-04-28 03:38:23 -04:00
|
|
|
INCLUDE_DIRS "include"
|
2024-03-11 09:44:33 -04:00
|
|
|
PRIV_INCLUDE_DIRS "include/esp_private"
|
2019-11-21 12:40:59 -05:00
|
|
|
LDFRAGMENTS linker.lf
|
2021-05-13 05:04:31 -04:00
|
|
|
PRIV_REQUIRES ${priv_requires})
|