提交 a9150021 编写于 作者: D Damien George

esp32: Add support to build with ESP-IDF v4.2.

Signed-off-by: NDamien George <damien@micropython.org>
上级 d191d88c
...@@ -28,7 +28,7 @@ manage the ESP32 microcontroller, as well as a way to manage the required ...@@ -28,7 +28,7 @@ manage the ESP32 microcontroller, as well as a way to manage the required
build environment and toolchains needed to build the firmware. build environment and toolchains needed to build the firmware.
The ESP-IDF changes quickly and MicroPython only supports certain versions. The ESP-IDF changes quickly and MicroPython only supports certain versions.
Currently MicroPython supports v4.0.2 and v4.1.1, Currently MicroPython supports v4.0.2, v4.1.1 and v4.2,
although other IDF v4 versions may also work. although other IDF v4 versions may also work.
To install the ESP-IDF the full instructions can be found at the To install the ESP-IDF the full instructions can be found at the
......
...@@ -108,6 +108,11 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 1) ...@@ -108,6 +108,11 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 1)
list(APPEND IDF_COMPONENTS esp_netif) list(APPEND IDF_COMPONENTS esp_netif)
endif() 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. # Register the main IDF component.
idf_component_register( idf_component_register(
SRCS SRCS
...@@ -169,5 +174,12 @@ foreach(comp ${IDF_COMPONENTS}) ...@@ -169,5 +174,12 @@ foreach(comp ${IDF_COMPONENTS})
endif() endif()
endforeach() 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 the main MicroPython cmake rules.
include(${MICROPY_DIR}/py/mkrules.cmake) include(${MICROPY_DIR}/py/mkrules.cmake)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册