CMakeLists.txt 1.0 KB

123456789101112131415161718192021222324252627282930
  1. set(srcs "ccomp_timer.c"
  2. "memory_checks.c"
  3. "test_runner.c"
  4. "test_utils.c")
  5. if(CONFIG_IDF_TARGET_ESP32)
  6. # ESP32's timer group doesn't have XTAL clock source,
  7. # so we can't implement a timekeeping that can work during DFS
  8. # but we can work around that by combining RMT and PCNT
  9. # where PCNT can count the pulses generated by RMT, and RMT is clocked from REF_TICK
  10. # REF_TICK won't be affected by DFS
  11. list(APPEND srcs "ref_clock_impl_rmt_pcnt.c")
  12. else()
  13. list(APPEND srcs "ref_clock_impl_timergroup.c")
  14. endif()
  15. if(CONFIG_IDF_TARGET_ARCH_RISCV)
  16. list(APPEND srcs "ccomp_timer_impl_riscv.c")
  17. endif()
  18. if(CONFIG_IDF_TARGET_ARCH_XTENSA)
  19. list(APPEND srcs "ccomp_timer_impl_xtensa.c")
  20. endif()
  21. idf_component_register(SRCS ${srcs}
  22. INCLUDE_DIRS include
  23. PRIV_INCLUDE_DIRS private_include
  24. REQUIRES spi_flash idf_test cmock
  25. PRIV_REQUIRES perfmon driver esp_netif)
  26. target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")