diff options
| author | Damien George | 2021-02-15 21:00:09 +1100 |
|---|---|---|
| committer | Damien George | 2021-02-15 23:12:20 +1100 |
| commit | a91500217757d9f7dc9791f014cfb465955f7d42 (patch) | |
| tree | 759adfb59f1e67d042a3478f6a5c9340949a2a4b /ports/esp32 | |
| parent | d191d88cabec9bf328f6f46b11ce6642af70cfc7 (diff) | |
esp32: Add support to build with ESP-IDF v4.2.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32')
| -rw-r--r-- | ports/esp32/README.md | 2 | ||||
| -rw-r--r-- | ports/esp32/main/CMakeLists.txt | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ports/esp32/README.md b/ports/esp32/README.md index d8818ccad..c349f44b2 100644 --- a/ports/esp32/README.md +++ b/ports/esp32/README.md @@ -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. 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. To install the ESP-IDF the full instructions can be found at the 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) |
