2024-04-08 08:08:23 -04:00
|
|
|
idf_build_get_property(arch IDF_TARGET_ARCH)
|
|
|
|
|
2023-05-14 22:32:28 -04:00
|
|
|
set(srcs "memory_checks.c"
|
2020-11-05 23:00:07 -05:00
|
|
|
"test_runner.c"
|
|
|
|
"test_utils.c")
|
|
|
|
|
|
|
|
if(CONFIG_IDF_TARGET_ESP32)
|
2022-01-17 01:45:56 -05:00
|
|
|
# ESP32's timer group doesn't have XTAL clock source,
|
|
|
|
# so we can't implement a timekeeping that can work during DFS
|
|
|
|
# but we can work around that by combining RMT and PCNT
|
|
|
|
# where PCNT can count the pulses generated by RMT, and RMT is clocked from REF_TICK
|
|
|
|
# REF_TICK won't be affected by DFS
|
2020-11-05 23:00:07 -05:00
|
|
|
list(APPEND srcs "ref_clock_impl_rmt_pcnt.c")
|
|
|
|
else()
|
|
|
|
list(APPEND srcs "ref_clock_impl_timergroup.c")
|
|
|
|
endif()
|
|
|
|
|
2024-04-08 08:08:23 -04:00
|
|
|
if("${arch}" STREQUAL "xtensa")
|
|
|
|
set(priv_requires perfmon esp_driver_pcnt esp_driver_gptimer esp_driver_rmt esp_netif)
|
|
|
|
else()
|
|
|
|
set(priv_requires esp_driver_pcnt esp_driver_gptimer esp_driver_rmt esp_netif)
|
|
|
|
endif()
|
|
|
|
|
2020-11-05 23:00:07 -05:00
|
|
|
idf_component_register(SRCS ${srcs}
|
2019-04-28 03:39:02 -04:00
|
|
|
INCLUDE_DIRS include
|
2022-10-14 08:15:32 -04:00
|
|
|
REQUIRES esp_partition idf_test cmock
|
2024-04-08 08:08:23 -04:00
|
|
|
PRIV_REQUIRES "${priv_requires}")
|
2022-07-06 16:17:27 -04:00
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|