55# export ARDUINO_SKIP_IDF_VERSION_CHECK=1
66# idf.py build
77
8- set (min_supported_idf_version "5.1 .0" )
9- set (max_supported_idf_version "5.1 .99" )
8+ set (min_supported_idf_version "5.3 .0" )
9+ set (max_supported_idf_version "5.3 .99" )
1010set (idf_version "${IDF_VERSION_MAJOR} .${IDF_VERSION_MINOR} .${IDF_VERSION_PATCH} " )
1111
1212if ("${idf_version} " AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK} " )
@@ -45,9 +45,11 @@ set(CORE_SRCS
4545 cores/esp32/esp32-hal-timer.c
4646 cores/esp32/esp32-hal-tinyusb.c
4747 cores/esp32/esp32-hal-touch.c
48+ cores/esp32/esp32-hal-touch-ng.c
4849 cores/esp32/esp32-hal-uart.c
4950 cores/esp32/esp32-hal-rmt.c
5051 cores/esp32/Esp.cpp
52+ cores/esp32/freertos_stats.cpp
5153 cores/esp32/FunctionalInterrupt.cpp
5254 cores/esp32/HardwareSerial.cpp
5355 cores/esp32/HEXBuilder.cpp
@@ -93,6 +95,7 @@ set(ARDUINO_ALL_LIBRARIES
9395 HTTPUpdate
9496 Insights
9597 LittleFS
98+ Matter
9699 NetBIOS
97100 Network
98101 OpenThread
@@ -165,6 +168,11 @@ set(ARDUINO_LIBRARY_OpenThread_SRCS
165168 libraries/OpenThread/src/OThreadCLI.cpp
166169 libraries/OpenThread/src/OThreadCLI_Util.cpp)
167170
171+ set (ARDUINO_LIBRARY_Matter_SRCS
172+ libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp
173+ libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp
174+ libraries/Matter/src/Matter.cpp)
175+
168176set (ARDUINO_LIBRARY_PPP_SRCS
169177 libraries/PPP/src/PPP.cpp
170178 libraries/PPP/src/ppp.c)
@@ -307,7 +315,7 @@ endforeach()
307315set (includedirs variants/${CONFIG_ARDUINO_VARIANT} / cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS} )
308316set (srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS} )
309317set (priv_includes cores/esp32/libb64)
310- set (requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning)
318+ set (requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser esp_ringbuf esp_driver_gptimer esp_driver_usb_serial_jtag driver espressif__network_provisioning)
311319set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES} )
312320
313321if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)
@@ -318,6 +326,10 @@ if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThre
318326 endif ()
319327endif ()
320328
329+ if (IDF_TARGET STREQUAL "esp32p4" )
330+ list (APPEND requires esp_driver_touch_sens)
331+ endif ()
332+
321333idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires} )
322334
323335if (NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK} " )
@@ -357,9 +369,15 @@ function(maybe_add_component component_name)
357369 endif ()
358370endfunction ()
359371
360- if (IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
372+ if (IDF_TARGET MATCHES "esp32s2|esp32s3|esp32p4 " AND CONFIG_TINYUSB_ENABLED)
361373 maybe_add_component(arduino_tinyusb)
362374endif ()
363375if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
364376 maybe_add_component(esp_https_ota)
365377endif ()
378+ if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ESP_SR)
379+ maybe_add_component(espressif__esp_sr)
380+ endif ()
381+ if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_Matter)
382+ maybe_add_component(espressif__esp_matter)
383+ endif ()
0 commit comments