aboutsummaryrefslogtreecommitdiff
path: root/ports/esp32/main/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/main/CMakeLists.txt')
-rw-r--r--ports/esp32/main/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt
index 2455a4cdd..52985383f 100644
--- a/ports/esp32/main/CMakeLists.txt
+++ b/ports/esp32/main/CMakeLists.txt
@@ -108,6 +108,11 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 1)
list(APPEND IDF_COMPONENTS esp_netif)
endif()
+if(IDF_VERSION_MINOR GREATER_EQUAL 2)
+ list(APPEND IDF_COMPONENTS esp_system)
+ list(APPEND IDF_COMPONENTS esp_timer)
+endif()
+
# Register the main IDF component.
idf_component_register(
SRCS
@@ -169,5 +174,12 @@ foreach(comp ${IDF_COMPONENTS})
endif()
endforeach()
+if(IDF_VERSION_MINOR GREATER_EQUAL 2)
+ # These paths cannot currently be found by the IDF_COMPONENTS search loop above,
+ # so add them explicitly.
+ list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/${IDF_TARGET}/include)
+ list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/include)
+endif()
+
# Include the main MicroPython cmake rules.
include(${MICROPY_DIR}/py/mkrules.cmake)