summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-02-19 10:38:01 +1100
committerDamien George <damien@micropython.org>2021-02-19 10:58:52 +1100
commit143372ab5e41a609b5b7d8bb60af1a5fd478e7ea (patch)
tree1be19410496f8c061df96e35b6fdb32d51d04e99
parent466ad35a725742928ef7b12522cc75929083af35 (diff)
esp32: Add support to build with ESP-IDF v4.3 pre-release.
The esp32 port now builds against IDF v4.3-beta1, as well as v4.4-dev. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/esp32/main/CMakeLists.txt6
-rw-r--r--ports/esp32/modesp32.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt
index 52985383f..b6cf214bb 100644
--- a/ports/esp32/main/CMakeLists.txt
+++ b/ports/esp32/main/CMakeLists.txt
@@ -113,6 +113,12 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 2)
list(APPEND IDF_COMPONENTS esp_timer)
endif()
+if(IDF_VERSION_MINOR GREATER_EQUAL 3)
+ list(APPEND IDF_COMPONENTS esp_hw_support)
+ list(APPEND IDF_COMPONENTS esp_pm)
+ list(APPEND IDF_COMPONENTS hal)
+endif()
+
# Register the main IDF component.
idf_component_register(
SRCS
diff --git a/ports/esp32/modesp32.c b/ports/esp32/modesp32.c
index 28d1762d2..d7c6bf0fa 100644
--- a/ports/esp32/modesp32.c
+++ b/ports/esp32/modesp32.c
@@ -35,7 +35,6 @@
#include "driver/adc.h"
#include "esp_heap_caps.h"
#include "multi_heap.h"
-#include "../heap_private.h"
#include "py/nlr.h"
#include "py/obj.h"
@@ -46,6 +45,13 @@
#include "machine_rtc.h"
#include "modesp32.h"
+// These private includes are needed for idf_heap_info.
+#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
+#define MULTI_HEAP_FREERTOS
+#include "../multi_heap_platform.h"
+#endif
+#include "../heap_private.h"
+
STATIC mp_obj_t esp32_wake_on_touch(const mp_obj_t wake) {
if (machine_rtc_config.ext0_pin != -1) {