Skip to content

Commit 3ba39e1

Browse files
committed
1 parent 4826ad7 commit 3ba39e1

File tree

11 files changed

+72
-69
lines changed

11 files changed

+72
-69
lines changed

cpu/esp32/Makefile.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/platform_port/include
7272
INCLUDES += -I$(ESP32_SDK_DIR)/components/heap/include
7373
INCLUDES += -I$(ESP32_SDK_DIR)/components/log/include
7474
INCLUDES += -I$(ESP32_SDK_DIR)/components/newlib/platform_include
75+
INCLUDES += -I$(ESP32_SDK_DIR)/components/nvs_flash/private_include
7576
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include
7677
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU_FAM)/include
7778

cpu/esp32/esp-idf/common/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ ESP32_SDK_SRC = \
2525
components/esp_system/port/soc/$(CPU_FAM)/cache_err_int.c \
2626
components/esp_system/port/soc/$(CPU_FAM)/clk.c \
2727
components/esp_system/port/soc/$(CPU_FAM)/reset_reason.c \
28+
components/esp_system/port/soc/$(CPU_FAM)/system_internal.c \
2829
components/esp_system/system_time.c \
2930
components/esp_timer/src/esp_timer.c \
3031
components/esp_timer/src/system_time.c \
3132
components/hal/cpu_hal.c \
3233
components/hal/mpu_hal.c \
34+
components/hal/soc_hal.c \
3335
components/hal/timer_hal.c \
3436
components/hal/uart_hal.c \
3537
components/hal/wdt_hal_iram.c \

pkg/esp32_sdk/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME=esp32_sdk
22
PKG_URL=https://github.com/espressif/esp-idf
3-
# v4.4.1
4-
PKG_VERSION=1329b19fe494500aeb79d19b27cfd99b40c37aec
3+
# v4.4.2
4+
PKG_VERSION=1b16ef6cfc2479a08136782f9dc57effefa86f66
55
PKG_LICENSE=Apache-2.0
66

77
include $(RIOTBASE)/pkg/pkg.mk

pkg/esp32_sdk/patches/0001-esp_hw_support-rename-rtc_init.patch

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From f3c3f97504da7d0bf25fa1e59d0350d130ca6eec Mon Sep 17 00:00:00 2001
1+
From e9c07c132c516a6eba1ade311f4fbcb2bdf632cd Mon Sep 17 00:00:00 2001
22
From: Benjamin Valentin <[email protected]>
3-
Date: Fri, 3 Jun 2022 00:02:07 +0200
4-
Subject: [PATCH] esp_hw_support: rename rtc_init
3+
Date: Tue, 18 Oct 2022 19:12:51 +0200
4+
Subject: [PATCH 1/27] esp_hw_support: rename rtc_init
55

66
Rename `rtc_init` to `rtc_init_module` due to name conflicts with RIOT `periph/rtc` module.
77
---
@@ -36,7 +36,7 @@ index e66a493b..7f1d1915 100644
3636
CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU | RTC_CNTL_TXRF_I2C_PU |
3737
RTC_CNTL_RFRX_PBUS_PU | RTC_CNTL_CKGEN_I2C_PU | RTC_CNTL_PLL_I2C_PU);
3838
diff --git a/components/esp_hw_support/port/esp32c3/rtc_init.c b/components/esp_hw_support/port/esp32c3/rtc_init.c
39-
index 388399f1..f6fdc692 100644
39+
index d0ee4788..332cd901 100644
4040
--- a/components/esp_hw_support/port/esp32c3/rtc_init.c
4141
+++ b/components/esp_hw_support/port/esp32c3/rtc_init.c
4242
@@ -25,7 +25,7 @@ static void set_ocode_by_efuse(int calib_version);
@@ -62,7 +62,7 @@ index 7b684d3d..ff0b5f49 100644
6262
CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU);
6363
REG_SET_FIELD(RTC_CNTL_TIMER1_REG, RTC_CNTL_PLL_BUF_WAIT, cfg.pll_wait);
6464
diff --git a/components/esp_hw_support/port/esp32s2/rtc_init.c b/components/esp_hw_support/port/esp32s2/rtc_init.c
65-
index 7932a89a..8910f7a2 100644
65+
index 50c6e7e5..43c3ceba 100644
6666
--- a/components/esp_hw_support/port/esp32s2/rtc_init.c
6767
+++ b/components/esp_hw_support/port/esp32s2/rtc_init.c
6868
@@ -24,7 +24,7 @@ __attribute__((unused)) static const char *TAG = "rtc_init";
@@ -75,7 +75,7 @@ index 7932a89a..8910f7a2 100644
7575
CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU);
7676
REG_SET_FIELD(RTC_CNTL_TIMER1_REG, RTC_CNTL_PLL_BUF_WAIT, cfg.pll_wait);
7777
diff --git a/components/esp_hw_support/port/esp32s3/rtc_init.c b/components/esp_hw_support/port/esp32s3/rtc_init.c
78-
index ed44fd7b..f0b7f5c8 100644
78+
index d878d2a9..04c07096 100644
7979
--- a/components/esp_hw_support/port/esp32s3/rtc_init.c
8080
+++ b/components/esp_hw_support/port/esp32s3/rtc_init.c
8181
@@ -31,7 +31,7 @@ static const char *TAG = "rtcinit";
@@ -101,11 +101,11 @@ index 3b3f2b73..c891224a 100644
101101
#if (CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS || CONFIG_ESP32_APP_INIT_CLK)
102102
/* Check the bootloader set the XTAL frequency.
103103
diff --git a/components/esp_system/port/soc/esp32c3/clk.c b/components/esp_system/port/soc/esp32c3/clk.c
104-
index d2181b58..36ab8a40 100644
104+
index 5f867751..868c04db 100644
105105
--- a/components/esp_system/port/soc/esp32c3/clk.c
106106
+++ b/components/esp_system/port/soc/esp32c3/clk.c
107-
@@ -72,7 +72,7 @@ static const char *TAG = "clk";
108-
if (rst_reas == RESET_REASON_CHIP_POWER_ON) {
107+
@@ -76,7 +76,7 @@ static const char *TAG = "clk";
108+
) {
109109
cfg.cali_ocode = 1;
110110
}
111111
- rtc_init(cfg);
@@ -127,20 +127,20 @@ index 7ea2dde1..0061e39b 100644
127127
assert(rtc_clk_xtal_freq_get() == RTC_XTAL_FREQ_32M);
128128

129129
diff --git a/components/esp_system/port/soc/esp32s2/clk.c b/components/esp_system/port/soc/esp32s2/clk.c
130-
index 68ad39c1..4fa1aac0 100644
130+
index f1eb0bee..0c70bd0e 100644
131131
--- a/components/esp_system/port/soc/esp32s2/clk.c
132132
+++ b/components/esp_system/port/soc/esp32s2/clk.c
133-
@@ -72,7 +72,7 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk);
134-
if (rst_reas == RESET_REASON_CHIP_POWER_ON) {
135-
cfg.cali_ocode = 1;
133+
@@ -78,7 +78,7 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk);
134+
esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
135+
}
136136
}
137137
- rtc_init(cfg);
138138
+ rtc_init_module(cfg);
139139

140140
rtc_clk_fast_freq_set(RTC_FAST_FREQ_8M);
141141

142142
diff --git a/components/esp_system/port/soc/esp32s3/clk.c b/components/esp_system/port/soc/esp32s3/clk.c
143-
index 15610ae9..a5b2ddf3 100644
143+
index ca2f2828..ebe579ec 100644
144144
--- a/components/esp_system/port/soc/esp32s3/clk.c
145145
+++ b/components/esp_system/port/soc/esp32s3/clk.c
146146
@@ -73,7 +73,7 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk);
@@ -153,10 +153,10 @@ index 15610ae9..a5b2ddf3 100644
153153
assert(rtc_clk_xtal_freq_get() == RTC_XTAL_FREQ_40M);
154154

155155
diff --git a/components/soc/esp32/include/soc/rtc.h b/components/soc/esp32/include/soc/rtc.h
156-
index bbbf3c75..3b983466 100644
156+
index b336cb2a..5b3cd8c9 100644
157157
--- a/components/soc/esp32/include/soc/rtc.h
158158
+++ b/components/soc/esp32/include/soc/rtc.h
159-
@@ -685,7 +685,7 @@ typedef struct rtc_config_s {
159+
@@ -674,7 +674,7 @@ typedef struct rtc_config_s {
160160
* Initialize RTC clock and power control related functions
161161
* @param cfg configuration options as rtc_config_t
162162
*/
@@ -166,10 +166,10 @@ index bbbf3c75..3b983466 100644
166166
#define RTC_VDDSDIO_TIEH_1_8V 0 //!< TIEH field value for 1.8V VDDSDIO
167167
#define RTC_VDDSDIO_TIEH_3_3V 1 //!< TIEH field value for 3.3V VDDSDIO
168168
diff --git a/components/soc/esp32c3/include/soc/rtc.h b/components/soc/esp32c3/include/soc/rtc.h
169-
index dccd7a07..f4b4aa44 100644
169+
index 5222da63..7308b669 100644
170170
--- a/components/soc/esp32c3/include/soc/rtc.h
171171
+++ b/components/soc/esp32c3/include/soc/rtc.h
172-
@@ -831,7 +831,7 @@ typedef struct {
172+
@@ -820,7 +820,7 @@ typedef struct {
173173
* Initialize RTC clock and power control related functions
174174
* @param cfg configuration options as rtc_config_t
175175
*/
@@ -179,10 +179,10 @@ index dccd7a07..f4b4aa44 100644
179179
/**
180180
* Structure describing vddsdio configuration
181181
diff --git a/components/soc/esp32h2/include/soc/rtc.h b/components/soc/esp32h2/include/soc/rtc.h
182-
index 5585986e..7a1dd718 100644
182+
index 596e1305..c41d4325 100644
183183
--- a/components/soc/esp32h2/include/soc/rtc.h
184184
+++ b/components/soc/esp32h2/include/soc/rtc.h
185-
@@ -925,7 +925,7 @@ typedef struct {
185+
@@ -913,7 +913,7 @@ typedef struct {
186186
* Initialize RTC clock and power control related functions
187187
* @param cfg configuration options as rtc_config_t
188188
*/
@@ -192,10 +192,10 @@ index 5585986e..7a1dd718 100644
192192
/**
193193
* Structure describing vddsdio configuration
194194
diff --git a/components/soc/esp32s2/include/soc/rtc.h b/components/soc/esp32s2/include/soc/rtc.h
195-
index 11b13fb6..73caf339 100644
195+
index 12cb8ba1..07d65474 100644
196196
--- a/components/soc/esp32s2/include/soc/rtc.h
197197
+++ b/components/soc/esp32s2/include/soc/rtc.h
198-
@@ -854,7 +854,7 @@ typedef struct {
198+
@@ -845,7 +845,7 @@ typedef struct {
199199
* Initialize RTC clock and power control related functions
200200
* @param cfg configuration options as rtc_config_t
201201
*/
@@ -205,10 +205,10 @@ index 11b13fb6..73caf339 100644
205205
/**
206206
* Structure describing vddsdio configuration
207207
diff --git a/components/soc/esp32s3/include/soc/rtc.h b/components/soc/esp32s3/include/soc/rtc.h
208-
index aa09874f..eb8bbed6 100644
208+
index 479e2c20..4b1c7289 100644
209209
--- a/components/soc/esp32s3/include/soc/rtc.h
210210
+++ b/components/soc/esp32s3/include/soc/rtc.h
211-
@@ -849,7 +849,7 @@ typedef struct {
211+
@@ -842,7 +842,7 @@ typedef struct {
212212
* Initialize RTC clock and power control related functions
213213
* @param cfg configuration options as rtc_config_t
214214
*/

pkg/esp32_sdk/patches/0006-compilation-include-missing-header-files.patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 0647c9d01c3e433d1b3abaf4774523ac0ef90a3c Mon Sep 17 00:00:00 2001
1+
From f1703a742dc3c5ee251cd5bae46197d8bbcfb603 Mon Sep 17 00:00:00 2001
22
From: Benjamin Valentin <[email protected]>
33
Date: Thu, 2 Jun 2022 23:45:01 +0200
4-
Subject: [PATCH] compilation: include missing header files
4+
Subject: [PATCH 06/27] compilation: include missing header files
55

66
---
77
components/efuse/src/esp_efuse_api.c | 1 +
@@ -11,7 +11,7 @@ Subject: [PATCH] compilation: include missing header files
1111
4 files changed, 4 insertions(+)
1212

1313
diff --git a/components/efuse/src/esp_efuse_api.c b/components/efuse/src/esp_efuse_api.c
14-
index a89205fc..1b90deaf 100644
14+
index 968d9543..bb11377d 100644
1515
--- a/components/efuse/src/esp_efuse_api.c
1616
+++ b/components/efuse/src/esp_efuse_api.c
1717
@@ -19,6 +19,7 @@ const static char *TAG = "efuse";
@@ -35,7 +35,7 @@ index 6ce93cc5..a40b821e 100644
3535
#include "esp_attr.h"
3636
#include <stdint.h>
3737
diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c
38-
index f5a6b292..6f9fd2b1 100644
38+
index 9ef2c72c..a0550389 100644
3939
--- a/components/esp_hw_support/sleep_modes.c
4040
+++ b/components/esp_hw_support/sleep_modes.c
4141
@@ -26,6 +26,7 @@
@@ -47,16 +47,16 @@ index f5a6b292..6f9fd2b1 100644
4747
#include "soc/soc_caps.h"
4848
#include "regi2c_ctrl.h"
4949
diff --git a/components/nvs_flash/src/nvs_encrypted_partition.cpp b/components/nvs_flash/src/nvs_encrypted_partition.cpp
50-
index 26e8a331..4de077b9 100644
50+
index 653fbefa..d614fa61 100644
5151
--- a/components/nvs_flash/src/nvs_encrypted_partition.cpp
5252
+++ b/components/nvs_flash/src/nvs_encrypted_partition.cpp
53-
@@ -13,6 +13,7 @@
54-
// limitations under the License.
55-
53+
@@ -7,6 +7,7 @@
5654
#include <cstring>
57-
+#include "nvs.hpp"
5855
#include "nvs_encrypted_partition.hpp"
5956
#include "nvs_types.hpp"
57+
+#include "nvs.hpp"
58+
59+
namespace nvs {
6060

6161
--
6262
2.34.1
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 25509b8b61b329d3c4ae5b3874704dae55d62ccd Mon Sep 17 00:00:00 2001
2-
From: Gunar Schorcht <[email protected]>
3-
Date: Tue, 8 Mar 2022 11:34:13 +0100
4-
Subject: [PATCH 15/17] driver/i2c: remove the include gpio.h in i2c.h header
1+
From 30efe1c3049b34bba70d6496d3d5f6d0489433ae Mon Sep 17 00:00:00 2001
2+
From: Benjamin Valentin <[email protected]>
3+
Date: Tue, 18 Oct 2022 19:17:28 +0200
4+
Subject: [PATCH 15/27] driver/i2c: remove the include gpio.h in i2c.h header
55

66
Including driver/i2c.h by RIOT code leads to type conflicts with RIOT gpio_t type.
77
---
@@ -10,19 +10,19 @@ Including driver/i2c.h by RIOT code leads to type conflicts with RIOT gpio_t typ
1010
2 files changed, 1 insertion(+), 1 deletion(-)
1111

1212
diff --git a/components/driver/i2c.c b/components/driver/i2c.c
13-
index 438d1efc12d..be26fdeffc3 100644
13+
index d7bf4b95..072d039f 100644
1414
--- a/components/driver/i2c.c
1515
+++ b/components/driver/i2c.c
16-
@@ -21,6 +21,7 @@
17-
#include "hal/i2c_hal.h"
18-
#include "hal/gpio_hal.h"
19-
#include "soc/i2c_periph.h"
20-
+#include "driver/gpio.h"
21-
#include "driver/i2c.h"
22-
#include "driver/periph_ctrl.h"
16+
@@ -26,6 +26,7 @@
2317
#include "esp_rom_gpio.h"
18+
#include "esp_rom_sys.h"
19+
#include <sys/param.h>
20+
+#include "driver/gpio.h"
21+
22+
static const char *I2C_TAG = "i2c";
23+
2424
diff --git a/components/driver/include/driver/i2c.h b/components/driver/include/driver/i2c.h
25-
index 22dcc8ab241..e668bba2acd 100644
25+
index 57d9091e..c55e5f4f 100644
2626
--- a/components/driver/include/driver/i2c.h
2727
+++ b/components/driver/include/driver/i2c.h
2828
@@ -19,7 +19,6 @@ extern "C" {
@@ -34,5 +34,5 @@ index 22dcc8ab241..e668bba2acd 100644
3434
#include "hal/i2c_types.h"
3535

3636
--
37-
2.17.1
37+
2.34.1
3838

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
From cd8688a55e62094cb6605ee8594985f862d57a95 Mon Sep 17 00:00:00 2001
2-
From: Gunar Schorcht <[email protected]>
3-
Date: Tue, 8 Mar 2022 11:35:11 +0100
4-
Subject: [PATCH 16/17] driver/i2c.h: expose i2c_hw_fsm_reset to RIOT code
1+
From 716cd97fba672809fd007d70b5f43b5dc4eda039 Mon Sep 17 00:00:00 2001
2+
From: Benjamin Valentin <[email protected]>
3+
Date: Tue, 18 Oct 2022 19:20:41 +0200
4+
Subject: [PATCH 16/27] driver/i2c.h: expose i2c_hw_fsm_reset to RIOT code
55

66
---
77
components/driver/i2c.c | 4 ++--
88
1 file changed, 2 insertions(+), 2 deletions(-)
99

1010
diff --git a/components/driver/i2c.c b/components/driver/i2c.c
11-
index be26fdeffc3..cff410b9d1b 100644
11+
index d7bf4b95..946d1e12 100644
1212
--- a/components/driver/i2c.c
1313
+++ b/components/driver/i2c.c
14-
@@ -209,7 +209,7 @@ static i2c_clk_alloc_t i2c_clk_alloc[I2C_SCLK_MAX] = {
14+
@@ -208,7 +208,7 @@ static i2c_clk_alloc_t i2c_clk_alloc[I2C_SCLK_MAX] = {
1515
static i2c_obj_t *p_i2c_obj[I2C_NUM_MAX] = {0};
1616
static void i2c_isr_handler_default(void *arg);
1717
static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num);
18-
-static esp_err_t IRAM_ATTR i2c_hw_fsm_reset(i2c_port_t i2c_num);
19-
+esp_err_t IRAM_ATTR i2c_hw_fsm_reset(i2c_port_t i2c_num);
18+
-static esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num);
19+
+esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num);
2020

2121
static void i2c_hw_disable(i2c_port_t i2c_num)
2222
{
23-
@@ -595,7 +595,7 @@ static esp_err_t i2c_master_clear_bus(i2c_port_t i2c_num)
23+
@@ -605,7 +605,7 @@ static esp_err_t i2c_master_clear_bus(i2c_port_t i2c_num)
2424
* If we remove the power supply for the slave during I2C is reading, or directly connect SDA or SCL to ground,
2525
* this would cause the I2C FSM get stuck in wrong state, all we can do is to reset the I2C hardware in this case.
2626
**/
2727
-static esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num)
2828
+esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num)
2929
{
30-
#if !SOC_I2C_SUPPORT_HW_FSM_RST
31-
int scl_low_period, scl_high_period;
30+
// A workaround for avoiding cause timeout issue when using
31+
// hardware reset.
3232
--
33-
2.17.1
33+
2.34.1
3434

pkg/esp32_sdk_lib_bt_esp32/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME=esp32_sdk_lib_bt_esp32
22
PKG_URL=https://github.com/espressif/esp32-bt-lib
3-
# This is a version in the v4.4.1 release branch
4-
PKG_VERSION=b877f7e1fc98dccfcf4dbf31f215c5cb44ec3f0d
3+
# This is a version in the v4.4.2 release branch
4+
PKG_VERSION=9bc3e81aa1b556c23d4ef6933042bfd24b86d1ab
55
PKG_LICENSE=Apache-2.0
66

77
include $(RIOTBASE)/pkg/pkg.mk

pkg/esp32_sdk_lib_bt_esp32c3/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME=esp32_sdk_lib_bt_esp32c3
22
PKG_URL=https://github.com/espressif/esp32c3-bt-lib
3-
# This is a version in the v4.4.1 release branch
4-
PKG_VERSION=98dcc9591365b5ac486a9f0b474c36bf8c4ca97b
3+
# This is a version in the v4.4.2 release branch
4+
PKG_VERSION=d1c2082e5633a89c6fd6051c7761c1e697cb7a2e
55
PKG_LICENSE=Apache-2.0
66

77
include $(RIOTBASE)/pkg/pkg.mk

pkg/esp32_sdk_lib_phy/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME=esp32_sdk_lib_phy
22
PKG_URL=https://github.com/espressif/esp-phy-lib
3-
# This is a version in the v4.4.1 release branch
4-
PKG_VERSION=dcbe6085e0215e2ea6a2e43b1106bdb15807f398
3+
# This is a version in the v4.4.2 release branch
4+
PKG_VERSION=ff0d771b8e33e320e11634567ee53b9cd78e6be1
55
PKG_LICENSE=Apache-2.0
66

77
include $(RIOTBASE)/pkg/pkg.mk

0 commit comments

Comments
 (0)