Skip to content

Commit cd7b1a6

Browse files
committed
cpu/esp32/esp-idf: migration to ESP-IDF v5.4
1 parent c93a346 commit cd7b1a6

File tree

3 files changed

+31
-48
lines changed

3 files changed

+31
-48
lines changed

cpu/esp32/esp-idf/esp_idf.mk

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# common definitions for all ESP-IDF modules
22

33
# additional include pathes required by ESP-IDF module
4+
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/bootloader_flash/include
45
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include
5-
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include_bootloader
6-
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/$(CPU_FAM)/include
6+
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/private_include
77
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/include
88
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/include
99
INCLUDES += -I$(ESP32_SDK_DIR)/components/efuse/$(CPU_FAM)/private_include
10+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_app_format/include
11+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_driver_gpio/include
12+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/ldo/include
13+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/include
1014
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)
11-
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)/private_include
12-
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_ipc/include
15+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_mm/include
1316
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_pm/include
14-
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_system/port/public_compat
17+
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_system/port/include/private
1518
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_timer/include
1619
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_timer/private_include
20+
INCLUDES += -I$(ESP32_SDK_DIR)/components/freertos/esp_additions/include
21+
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/platform_port/include/hal
22+
INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU_FAM)/include
1723
INCLUDES += -I$(ESP32_SDK_DIR)/components/newlib/priv_include
1824
INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include
1925

@@ -22,8 +28,12 @@ ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
2228
INCLUDES += -I$(ESP32_SDK_DIR)/components/xtensa/$(CPU_FAM)/include
2329
endif
2430

25-
ifneq (,$(filter esp32c3 esp32h2 esp32s3,$(CPU_FAM)))
26-
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/port/$(CPU_FAM)/private_include
31+
ifeq (esp32s3,$(CPU_FAM))
32+
INCLUDES += -I$(ESP32_SDK_DIR)/components/spi_flash/include/spi_flash
33+
endif
34+
35+
ifneq (,$(filter periph_i2c%,$(USEMODULE)))
36+
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/i2c/include
2737
endif
2838

2939
SRC := $(addprefix $(ESP32_SDK_DIR)/,$(ESP32_SDK_SRC))

cpu/esp32/esp-idf/esp_idf_cflags.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@ CFLAGS += -Wno-enum-compare
3434
# those are false positives.
3535
CFLAGS += -Wno-cast-align
3636

37-
# TODO: required to be able to compile with GCC 12.1, remove them after upgrade to ESP-IDF 5.1
38-
CFLAGS += -Wno-attributes
37+
# TODO: required to be able to compile with GCC 14.0, remove them later
3938
CFLAGS += -Wno-enum-conversion
40-
CFLAGS += -Wno-error=format=
41-
CFLAGS += -Wno-format
42-
CFLAGS += -Wno-use-after-free
4339
CFLAGS += -Wno-incompatible-pointer-types
40+
CFLAGS += -Wno-unused-function
4441

4542
# additional CFLAGS required for RISC-V architecture
4643
ifneq (,$(filter riscv32%,$(TARGET_ARCH)))

cpu/esp32/esp-idf/esp_idf_support.c

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,6 @@
3636
ESP_EVENT_DEFINE_BASE(IP_EVENT);
3737
#endif
3838

39-
/* Global variables required by ESP-IDF */
40-
uint8_t *g_wpa_anonymous_identity;
41-
int g_wpa_anonymous_identity_len;
42-
43-
uint8_t *g_wpa_username;
44-
int g_wpa_username_len;
45-
46-
uint8_t *g_wpa_password;
47-
int g_wpa_password_len;
48-
49-
uint8_t *g_wpa_new_password;
50-
int g_wpa_new_password_len;
51-
52-
const uint8_t *g_wpa_client_cert;
53-
int g_wpa_client_cert_len;
54-
55-
const uint8_t *g_wpa_private_key;
56-
int g_wpa_private_key_len;
57-
58-
const uint8_t *g_wpa_private_key_passwd;
59-
int g_wpa_private_key_passwd_len;
60-
61-
const uint8_t *g_wpa_ca_cert;
62-
int g_wpa_ca_cert_len;
63-
64-
char *g_wpa_ttls_phase2_type;
65-
bool g_wpa_suiteb_certification;
66-
67-
char *g_wpa_phase1_options;
68-
69-
uint8_t *g_wpa_pac_file;
70-
int g_wpa_pac_file_len;
71-
7239
/*
7340
* provided by: /path/to/esp-idf/components/log/log_freertos.c
7441
*/
@@ -88,7 +55,7 @@ static esp_log_level_entry_t _log_levels[] = {
8855
};
8956

9057
/*
91-
* provided by: /path/to/esp-idf/component/log/log.c
58+
* provided by: /path/to/esp-idf/components/log/log.c
9259
*/
9360
void IRAM_ATTR esp_log_write(esp_log_level_t level,
9461
const char* tag, const char* format, ...)
@@ -100,7 +67,7 @@ void IRAM_ATTR esp_log_write(esp_log_level_t level,
10067
}
10168

10269
/*
103-
* provided by: /path/to/esp-idf/component/log/log.c
70+
* provided by: /path/to/esp-idf/components/log/log.c
10471
*/
10572
void IRAM_ATTR esp_log_writev(esp_log_level_t level,
10673
const char *tag,
@@ -134,7 +101,7 @@ void IRAM_ATTR esp_log_writev(esp_log_level_t level,
134101
}
135102

136103
/*
137-
* provided by: /path/to/esp-idf/component/log/log.c
104+
* provided by: /path/to/esp-idf/components/log/log.c
138105
*/
139106
void esp_log_level_set(const char* tag, esp_log_level_t level)
140107
{
@@ -152,3 +119,12 @@ void esp_log_level_set(const char* tag, esp_log_level_t level)
152119

153120
_log_levels[i].level = level;
154121
}
122+
123+
/*
124+
* provided by: /path/to/esp-idf/components/newlib/time.c
125+
*/
126+
void esp_newlib_time_init(void)
127+
{
128+
extern void esp_time_impl_init(void);
129+
esp_time_impl_init();
130+
}

0 commit comments

Comments
 (0)