OVMS3-idf/components/soc/CMakeLists.txt
Darian Leung 91841a53ff WDT: Add LL and HAL for watchdog timers
This commit updates the watchdog timers (MWDT and RWDT)
in the following ways:

- Add seprate LL for MWDT and RWDT.
- Add a combined WDT HAL for all Watchdog Timers
- Update int_wdt.c and task_wdt.c to use WDT HAL
- Remove most dependencies on LL or direct register access
  in other components. They will now use the WDT HAL
- Update use of watchdogs (including RTC WDT) in bootloader and
  startup code to use the HAL layer.
2020-03-26 02:14:02 +08:00

53 lines
2.4 KiB
CMake

idf_build_get_property(target IDF_TARGET)
idf_component_register(SRCS "src/cpu_util.c"
"src/memory_layout_utils.c"
"src/lldesc.c"
"src/hal/cpu_hal.c"
"src/hal/rmt_hal.c"
"src/hal/rtc_io_hal.c"
"src/hal/dac_hal.c"
"src/hal/adc_hal.c"
"src/hal/spi_hal.c"
"src/hal/spi_hal_iram.c"
"src/hal/spi_slave_hal.c"
"src/hal/spi_slave_hal_iram.c"
"src/hal/touch_sensor_hal.c"
"src/soc_include_legacy_warn.c"
"src/hal/pcnt_hal.c"
"src/hal/i2s_hal.c"
"src/hal/sigmadelta_hal.c"
"src/hal/timer_hal.c"
"src/hal/ledc_hal.c"
"src/hal/ledc_hal_iram.c"
"src/hal/i2c_hal.c"
"src/hal/i2c_hal_iram.c"
"src/hal/gpio_hal.c"
"src/hal/uart_hal.c"
"src/hal/uart_hal_iram.c"
"src/hal/spi_flash_hal.c"
"src/hal/spi_flash_hal_iram.c"
"src/hal/mpu_hal.c"
"src/hal/soc_hal.c"
"src/hal/wdt_hal_iram.c"
"src/compare_set.c"
PRIV_REQUIRES ${target}
LDFRAGMENTS linker.lf)
if(CONFIG_IDF_TARGET_ESP32)
target_sources(${COMPONENT_LIB} PRIVATE "src/hal/can_hal.c"
"src/hal/mcpwm_hal.c"
"src/hal/sdio_slave_hal.c")
elseif(CONFIG_IDF_TARGET_ESP32S2)
target_sources(${COMPONENT_LIB} PRIVATE "src/hal/spi_flash_hal_gpspi.c")
endif()
# Since there can be chip-specific HAL headers which can include the common
# HAL header via include_next, process the build scripts here first so that
# include directories appear first in the compile command.
add_subdirectory(src/${target})
target_include_directories(${COMPONENT_LIB} PUBLIC include)
add_subdirectory(soc)
target_link_libraries(${COMPONENT_LIB} PUBLIC "soc_${target}")