Files
esp-idf/components/esp_hal_emac/CMakeLists.txt
Ondrej Kosta edbf8856ae feat(esp_eth): add ESP32-S31 EMAC support
Add internal EMAC support for ESP32-S31, including:
- HAL/LL layer: emac_ll, emac_hal, emac_clk, emac_periph for S31
- SOC layer: register structs, soc_caps, peripherals linker script,
  interrupt definitions
- MAC driver: clock source configuration via Kconfig, GPIO/DMA
  adaptations, PHY register defs for clause-45 MDIO
- Ethernet examples updated for S31 (basic, build-test-rules, PTP
  readme)
- Refactored existing ESP32/ESP32-P4 EMAC code for shared patterns
  (emac_clk extraction, struct alignment, periph descriptor cleanup)
2026-05-21 15:59:42 +08:00

22 lines
630 B
CMake

idf_build_get_property(target IDF_TARGET)
if(${target} STREQUAL "linux")
return() # This component is not supported by the POSIX/Linux simulator
endif()
# target specific include must be added before the generic one
set(includes)
list(APPEND includes "include")
set(srcs)
if(CONFIG_SOC_EMAC_SUPPORTED)
list(APPEND srcs "emac_hal.c")
list(APPEND srcs "${target}/emac_periph.c")
list(APPEND srcs "${target}/emac_clk.c")
list(APPEND includes "${target}/include")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES soc hal esp_hal_gpio)