2020-12-29 13:20:24 +08:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
2020-04-17 16:34:56 -03:00
|
|
|
|
2023-08-28 14:02:08 +08:00
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
|
|
endif()
|
|
|
|
|
2021-12-23 11:42:47 +05:30
|
|
|
set(srcs "")
|
2022-01-21 14:43:48 +05:30
|
|
|
set(includes "")
|
|
|
|
|
2024-04-18 15:13:55 +08:00
|
|
|
if(CONFIG_ULP_COPROC_ENABLED OR CONFIG_IDF_DOC_BUILD)
|
2023-09-08 10:10:07 +08:00
|
|
|
list(APPEND includes
|
2024-03-08 14:22:07 +08:00
|
|
|
ulp_common/include)
|
2023-09-08 10:10:07 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ULP_COPROC_TYPE_FSM OR (CONFIG_IDF_DOC_BUILD AND CONFIG_SOC_ULP_FSM_SUPPORTED))
|
|
|
|
list(APPEND includes
|
|
|
|
ulp_fsm/include
|
|
|
|
ulp_fsm/include/${target})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ULP_COPROC_TYPE_RISCV OR CONFIG_IDF_DOC_BUILD)
|
|
|
|
list(APPEND includes
|
|
|
|
ulp_riscv/include
|
|
|
|
ulp_riscv/shared/include)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ULP_COPROC_TYPE_LP_CORE OR CONFIG_IDF_DOC_BUILD)
|
|
|
|
list(APPEND includes
|
|
|
|
lp_core/include
|
|
|
|
lp_core/shared/include)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ULP_COPROC_TYPE_FSM OR CONFIG_ULP_COPROC_TYPE_RISCV)
|
2020-12-29 13:20:24 +08:00
|
|
|
|
2021-12-23 11:42:47 +05:30
|
|
|
list(APPEND srcs
|
2022-09-02 16:18:14 +08:00
|
|
|
"ulp_common/ulp_common.c"
|
|
|
|
"ulp_common/ulp_adc.c")
|
2022-01-21 14:43:48 +05:30
|
|
|
|
|
|
|
if(CONFIG_ULP_COPROC_TYPE_FSM)
|
|
|
|
list(APPEND srcs
|
|
|
|
"ulp_fsm/ulp.c"
|
|
|
|
"ulp_fsm/ulp_macro.c")
|
|
|
|
|
|
|
|
elseif(CONFIG_ULP_COPROC_TYPE_RISCV)
|
2021-12-23 11:42:47 +05:30
|
|
|
list(APPEND srcs
|
2022-02-28 18:12:28 +08:00
|
|
|
"ulp_riscv/ulp_riscv.c"
|
2022-08-03 13:59:44 +08:00
|
|
|
"ulp_riscv/ulp_riscv_lock.c"
|
2022-08-09 15:46:14 +02:00
|
|
|
"ulp_riscv/ulp_riscv_i2c.c")
|
2021-12-23 11:42:47 +05:30
|
|
|
endif()
|
2020-12-29 13:20:24 +08:00
|
|
|
endif()
|
2021-12-23 11:42:47 +05:30
|
|
|
|
2023-02-27 17:03:42 +08:00
|
|
|
if(CONFIG_ULP_COPROC_TYPE_LP_CORE)
|
|
|
|
list(APPEND srcs
|
2023-04-26 13:58:19 +08:00
|
|
|
"lp_core/lp_core.c"
|
2024-03-08 14:22:07 +08:00
|
|
|
"lp_core/shared/ulp_lp_core_memory_shared.c")
|
2023-11-02 16:34:40 +08:00
|
|
|
|
2024-03-08 14:22:07 +08:00
|
|
|
if(CONFIG_SOC_ULP_LP_UART_SUPPORTED)
|
|
|
|
list(APPEND srcs "lp_core/lp_core_uart.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_LP_I2C_SUPPORTED)
|
2023-11-02 16:34:40 +08:00
|
|
|
list(APPEND srcs "lp_core/lp_core_i2c.c")
|
|
|
|
endif()
|
2024-03-08 14:22:07 +08:00
|
|
|
|
|
|
|
if(CONFIG_SOC_LP_TIMER_SUPPORTED)
|
|
|
|
list(APPEND srcs "lp_core/shared/ulp_lp_core_lp_timer_shared.c")
|
|
|
|
endif()
|
2024-06-19 10:09:40 +02:00
|
|
|
|
|
|
|
if(CONFIG_SOC_LP_SPI_SUPPORTED)
|
|
|
|
list(APPEND srcs "lp_core/lp_core_spi.c")
|
|
|
|
endif()
|
2024-07-01 12:11:41 +08:00
|
|
|
|
|
|
|
if(CONFIG_SOC_LP_CORE_SUPPORT_ETM)
|
|
|
|
list(APPEND srcs "lp_core/lp_core_etm.c")
|
|
|
|
endif()
|
2023-02-27 17:03:42 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-23 11:42:47 +05:30
|
|
|
idf_component_register(SRCS ${srcs}
|
2022-02-28 18:12:28 +08:00
|
|
|
INCLUDE_DIRS ${includes}
|
2022-07-15 12:52:44 +08:00
|
|
|
REQUIRES driver esp_adc)
|