CMakeLists.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. idf_build_get_property(target IDF_TARGET)
  2. if(${target} STREQUAL "linux")
  3. return() # This component is not supported by the POSIX/Linux simulator
  4. endif()
  5. set(srcs "")
  6. set(includes "")
  7. if(CONFIG_ULP_COPROC_ENABLED OR (CONFIG_IDF_DOC_BUILD AND CONFIG_SOC_ULP_SUPPORTED))
  8. list(APPEND includes
  9. ulp_common/include
  10. ulp_common/include/${target})
  11. endif()
  12. if(CONFIG_ULP_COPROC_TYPE_FSM OR (CONFIG_IDF_DOC_BUILD AND CONFIG_SOC_ULP_FSM_SUPPORTED))
  13. list(APPEND includes
  14. ulp_fsm/include
  15. ulp_fsm/include/${target})
  16. endif()
  17. if(CONFIG_ULP_COPROC_TYPE_RISCV OR CONFIG_IDF_DOC_BUILD)
  18. list(APPEND includes
  19. ulp_riscv/include
  20. ulp_riscv/shared/include)
  21. endif()
  22. if(CONFIG_ULP_COPROC_TYPE_LP_CORE OR CONFIG_IDF_DOC_BUILD)
  23. list(APPEND includes
  24. lp_core/include
  25. lp_core/shared/include)
  26. endif()
  27. if(CONFIG_ULP_COPROC_TYPE_FSM OR CONFIG_ULP_COPROC_TYPE_RISCV)
  28. list(APPEND srcs
  29. "ulp_common/ulp_common.c"
  30. "ulp_common/ulp_adc.c")
  31. if(CONFIG_ULP_COPROC_TYPE_FSM)
  32. list(APPEND srcs
  33. "ulp_fsm/ulp.c"
  34. "ulp_fsm/ulp_macro.c")
  35. elseif(CONFIG_ULP_COPROC_TYPE_RISCV)
  36. list(APPEND srcs
  37. "ulp_riscv/ulp_riscv.c"
  38. "ulp_riscv/ulp_riscv_lock.c"
  39. "ulp_riscv/ulp_riscv_i2c.c")
  40. endif()
  41. endif()
  42. if(CONFIG_ULP_COPROC_TYPE_LP_CORE)
  43. list(APPEND srcs
  44. "lp_core/lp_core.c"
  45. "lp_core/shared/ulp_lp_core_memory_shared.c"
  46. "lp_core/shared/ulp_lp_core_lp_timer_shared.c"
  47. "lp_core/lp_core_i2c.c"
  48. "lp_core/lp_core_uart.c")
  49. endif()
  50. idf_component_register(SRCS ${srcs}
  51. INCLUDE_DIRS ${includes}
  52. REQUIRES driver esp_adc)