CMakeLists.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. idf_build_get_property(target IDF_TARGET)
  2. set(srcs "wdt_hal_iram.c"
  3. "mpu_hal.c")
  4. set(includes "${target}/include" "include")
  5. if(NOT BOOTLOADER_BUILD)
  6. list(APPEND srcs
  7. "cpu_hal.c"
  8. "rmt_hal.c"
  9. "rtc_io_hal.c"
  10. "spi_hal.c"
  11. "spi_hal_iram.c"
  12. "spi_slave_hal.c"
  13. "spi_slave_hal_iram.c"
  14. "i2s_hal.c"
  15. "sigmadelta_hal.c"
  16. "timer_hal.c"
  17. "ledc_hal.c"
  18. "ledc_hal_iram.c"
  19. "i2c_hal.c"
  20. "i2c_hal_iram.c"
  21. "gpio_hal.c"
  22. "uart_hal.c"
  23. "uart_hal_iram.c"
  24. "spi_flash_hal.c"
  25. "spi_flash_hal_iram.c"
  26. "soc_hal.c"
  27. "interrupt_controller_hal.c"
  28. "sha_hal.c"
  29. "aes_hal.c"
  30. "twai_hal.c"
  31. "twai_hal_iram.c"
  32. "adc_hal.c")
  33. if(${target} STREQUAL "esp32")
  34. list(APPEND srcs
  35. "dac_hal.c"
  36. "mcpwm_hal.c"
  37. "pcnt_hal.c"
  38. "sdio_slave_hal.c"
  39. "touch_sensor_hal.c"
  40. "esp32/adc_hal.c"
  41. "esp32/brownout_hal.c"
  42. "esp32/interrupt_descriptor_table.c"
  43. "esp32/touch_sensor_hal.c"
  44. "esp32/gpio_hal_workaround.c")
  45. if(NOT BOOTLOADER_BUILD AND CONFIG_ETH_USE_ESP32_EMAC)
  46. list(APPEND srcs "esp32/emac_hal.c")
  47. endif()
  48. endif()
  49. if(${target} STREQUAL "esp32s2")
  50. list(APPEND srcs
  51. "dac_hal.c"
  52. "pcnt_hal.c"
  53. "spi_flash_hal_gpspi.c"
  54. "spi_slave_hd_hal.c"
  55. "touch_sensor_hal.c"
  56. "esp32s2/adc_hal.c"
  57. "esp32s2/brownout_hal.c"
  58. "esp32s2/cp_dma_hal.c"
  59. "esp32s2/systimer_hal.c"
  60. "esp32s2/touch_sensor_hal.c"
  61. "esp32s2/dac_hal.c"
  62. "esp32s2/interrupt_descriptor_table.c"
  63. "esp32s2/usb_hal.c"
  64. "esp32s2/usbh_hal.c")
  65. endif()
  66. if(${target} STREQUAL "esp32s3")
  67. list(APPEND srcs
  68. "dac_hal.c"
  69. "gdma_hal.c"
  70. "pcnt_hal.c"
  71. "spi_flash_hal_gpspi.c"
  72. "spi_slave_hd_hal.c"
  73. "touch_sensor_hal.c"
  74. "esp32s3/brownout_hal.c"
  75. "esp32s3/interrupt_descriptor_table.c"
  76. "esp32s3/systimer_hal.c"
  77. "esp32s3/touch_sensor_hal.c")
  78. endif()
  79. if(${target} STREQUAL "esp32c3")
  80. list(APPEND srcs
  81. "ds_hal.c"
  82. "gdma_hal.c"
  83. "esp32c3/adc_hal.c"
  84. "esp32c3/brownout_hal.c"
  85. "esp32c3/systimer_hal.c"
  86. "esp32c3/hmac_hal.c"
  87. "spi_flash_hal_gpspi.c"
  88. "spi_slave_hd_hal.c"
  89. "esp32c3/rtc_cntl_hal.c")
  90. endif()
  91. endif()
  92. idf_component_register(SRCS ${srcs}
  93. INCLUDE_DIRS ${includes}
  94. PRIV_INCLUDE_DIRS ${priv_include}
  95. REQUIRES soc
  96. LDFRAGMENTS linker.lf)