Skip to content

Commit 573b432

Browse files
committed
esp32: Add support for IDF v4.2.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 5f0d3b2 commit 573b432

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ports/esp32/main/CMakeLists.txt

+12
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 1)
108108
list(APPEND IDF_COMPONENTS esp_netif)
109109
endif()
110110

111+
if(IDF_VERSION_MINOR GREATER_EQUAL 2)
112+
list(APPEND IDF_COMPONENTS esp_system)
113+
list(APPEND IDF_COMPONENTS esp_timer)
114+
endif()
115+
111116
# Register the main IDF component.
112117
idf_component_register(
113118
SRCS
@@ -169,5 +174,12 @@ foreach(comp ${IDF_COMPONENTS})
169174
endif()
170175
endforeach()
171176

177+
if(IDF_VERSION_MINOR GREATER_EQUAL 2)
178+
# These paths cannot currently be found by the IDF_COMPONENTS search loop above,
179+
# so add them explicitly.
180+
list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/${IDF_TARGET}/include)
181+
list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/include)
182+
endif()
183+
172184
# Include the main MicroPython cmake rules.
173185
include(${MICROPY_DIR}/py/mkrules.cmake)

0 commit comments

Comments
 (0)