Skip to content

Commit 143372a

Browse files
committed
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 <[email protected]>
1 parent 466ad35 commit 143372a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ports/esp32/main/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 2)
113113
list(APPEND IDF_COMPONENTS esp_timer)
114114
endif()
115115

116+
if(IDF_VERSION_MINOR GREATER_EQUAL 3)
117+
list(APPEND IDF_COMPONENTS esp_hw_support)
118+
list(APPEND IDF_COMPONENTS esp_pm)
119+
list(APPEND IDF_COMPONENTS hal)
120+
endif()
121+
116122
# Register the main IDF component.
117123
idf_component_register(
118124
SRCS

ports/esp32/modesp32.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "driver/adc.h"
3636
#include "esp_heap_caps.h"
3737
#include "multi_heap.h"
38-
#include "../heap_private.h"
3938

4039
#include "py/nlr.h"
4140
#include "py/obj.h"
@@ -46,6 +45,13 @@
4645
#include "machine_rtc.h"
4746
#include "modesp32.h"
4847

48+
// These private includes are needed for idf_heap_info.
49+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
50+
#define MULTI_HEAP_FREERTOS
51+
#include "../multi_heap_platform.h"
52+
#endif
53+
#include "../heap_private.h"
54+
4955
STATIC mp_obj_t esp32_wake_on_touch(const mp_obj_t wake) {
5056

5157
if (machine_rtc_config.ext0_pin != -1) {

0 commit comments

Comments
 (0)