esp-idf/components/ulp/CMakeLists.txt
Sudeep Mohanty 4fde033a5f ulp: Added support for RTC I2C driver for ULP RISC-V on esp32s2 and esp32s3
This commit adds support for using the RTC I2C peripheral on the ULP
RISC-V core for esp32s2 and esp32s3. It also adds an example to demonstrate the
usage of the RTC I2C peripheral.

This commit also modifies the rtc_i2c register structure files to enable
the use of bitfields in the ULP RISC-V RTC I2C driver.
2022-09-05 10:21:43 +02:00

44 lines
1.1 KiB
CMake

idf_build_get_property(target IDF_TARGET)
set(srcs "")
set(includes "")
if(CONFIG_SOC_ULP_SUPPORTED OR CONFIG_SOC_RISCV_COPROC_SUPPORTED)
list(APPEND srcs
"ulp_common/ulp_common.c")
list(APPEND includes
ulp_common/include
ulp_common/include/${target})
if(CONFIG_ULP_COPROC_TYPE_FSM)
list(APPEND srcs
"ulp_fsm/ulp.c"
"ulp_fsm/ulp_macro.c")
list(APPEND includes
ulp_fsm/include
ulp_fsm/include/${target})
elseif(CONFIG_ULP_COPROC_TYPE_RISCV)
list(APPEND srcs
"ulp_riscv/ulp_riscv.c"
"ulp_riscv/ulp_riscv_lock.c"
"ulp_riscv/ulp_riscv_adc.c"
"ulp_riscv/ulp_riscv_i2c.c")
list(APPEND includes
ulp_riscv/include
ulp_riscv/shared/include)
endif()
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES driver esp_adc)
if(CONFIG_SOC_ULP_SUPPORTED OR CONFIG_SOC_RISCV_COPROC_SUPPORTED)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
endif()