Skip to content

Commit ff1bae8

Browse files
authored
Merge branch 'espressif:master' into master
2 parents 4f21eb9 + a6c3a9c commit ff1bae8

File tree

156 files changed

+9979
-745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+9979
-745
lines changed

COMPATIBILITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ Supported since ESP-IDF v5.0.
9797
| release/v5.2 | v5.2.2+ | v5.2 |
9898
| release/v5.3 and above | v5.3+ | v5.3 |
9999

100+
#### v2.0
101+
102+
| Release branch | Recommended | Required |
103+
|------------------------|-------------|----------|
104+
| release/v5.0 | v5.0.8+ | v5.0.8 |
105+
| release/v5.1 | v5.1.5+ | v5.1.5* |
106+
| release/v5.2 | v5.2.4+ | v5.2.4 |
107+
| release/v5.3 | v5.3.2+ | v5.3.2* |
108+
| release/v5.4 and above | v5.4+ | v5.4 |
109+
110+
Note: IDF v5.1.5 and v5.3.2 are compatible with C2 v2.0. However the chip revision check hasn't been updated on these releases. Enable `ESP32C2_REV2_DEVELOPMENT` config to bypass the outdated check.
111+
100112
### ESP32-C6
101113

102114
#### v0.0, v0.1
@@ -109,6 +121,16 @@ Supported since ESP-IDF v5.1.
109121

110122
Supported since ESP-IDF v5.1.
111123

124+
#### v1.2
125+
126+
| Release branch | Recommended | Required |
127+
|------------------------|-------------|----------|
128+
| release/v5.1 | v5.1.6+ | v5.1.6 |
129+
| release/v5.2 | v5.2.5+ | v5.2.5 |
130+
| release/v5.3 | v5.3.3+ | v5.3.3 |
131+
| release/v5.4 | v5.4.1+ | v5.4.1 |
132+
| release/v5.5 and above | v5.5+ | v5.5 |
133+
112134
## What If the ESP-IDF Version Is Lower than the `Required` Version?
113135

114136
Latest ESP-IDF versions can prevent from downloading to, or even execute binaries on unsupported chips. ESP-IDF of versions v4.4.5+, v5.0.1+, v5.1 and above have both esptool download check and bootloader loading check against the chip revision. While ESP-IDF v4.3.5 has only esptool downloading check.

COMPATIBILITY_CN.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@
9797
| release/v5.2 | v5.2.2+ | v5.1 |
9898
| release/v5.3 及以上 | v5.3+ | v5.3 |
9999

100+
#### v2.0
101+
102+
| 发布分支 | 推荐版本 | 需求版本 |
103+
|------------------------|-------------|----------|
104+
| release/v5.0 | v5.0.8+ | v5.0.8 |
105+
| release/v5.1 | v5.1.5+ | v5.1.5* |
106+
| release/v5.2 | v5.2.4+ | v5.2.4 |
107+
| release/v5.3 | v5.3.2+ | v5.3.2* |
108+
| release/v5.4 及以上 | v5.4+ | v5.4 |
109+
110+
提示: IDF v5.1.5 及 v5.3.2 与 C2 v2.0 兼容,但芯片版本检查尚未在这些发布版本更新。使能 `ESP32C2_REV2_DEVELOPMENT` 选项来跳过这些过时的检查。
111+
100112
### ESP32-C6
101113

102114
#### v0.0, v0.1
@@ -109,6 +121,16 @@
109121

110122
从 ESP-IDF v5.1 开始支持。
111123

124+
#### v1.2
125+
126+
| 发布分支 | 推荐版本 | 需求版本 |
127+
|------------------------|-------------|----------|
128+
| release/v5.1 | v5.1.6+ | v5.1.6 |
129+
| release/v5.2 | v5.2.5+ | v5.2.5 |
130+
| release/v5.3 | v5.3.3+ | v5.3.3 |
131+
| release/v5.4 | v5.4.1+ | v5.4.1 |
132+
| release/v5.5 及以上 | v5.5+ | v5.5 |
133+
112134

113135
## 如果 ESP-IDF 版本低于 `需求版本` 会出现什么情况?
114136

components/bootloader_support/src/bootloader_mem.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -12,14 +12,12 @@
1212
#include "bootloader_mem.h"
1313
#include "esp_cpu.h"
1414

15-
#if SOC_APM_SUPPORTED
1615
#include "hal/apm_hal.h"
17-
#endif
1816

1917
void bootloader_init_mem(void)
2018
{
2119

22-
#if !defined(BOOTLOADER_BUILD) && defined(SOC_APM_SUPPORTED)
20+
#if !defined(BOOTLOADER_BUILD)
2321
/* By default, these access path filters are enable and allow the
2422
* access to masters only if they are in TEE mode. Since all masters
2523
* except HP CPU boots in REE mode, default setting of these filters

components/bt/CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,12 +870,27 @@ if(CONFIG_BT_ENABLED)
870870

871871
endif()
872872

873+
874+
set(bt_priv_requires
875+
nvs_flash
876+
soc
877+
esp_pm
878+
esp_phy
879+
esp_coex
880+
mbedtls
881+
esp_driver_uart
882+
vfs
883+
esp_ringbuf
884+
esp_driver_spi
885+
esp_driver_gpio
886+
esp_gdbstub
887+
)
888+
873889
idf_component_register(SRCS "${srcs}"
874890
INCLUDE_DIRS "${include_dirs}"
875891
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
876892
REQUIRES esp_timer esp_wifi
877-
PRIV_REQUIRES nvs_flash soc esp_pm esp_phy esp_coex mbedtls esp_driver_uart vfs esp_ringbuf
878-
esp_driver_spi esp_driver_gpio
893+
PRIV_REQUIRES "${bt_priv_requires}"
879894
LDFRAGMENTS "${ldscripts}")
880895

881896
if(CONFIG_BT_ENABLED)

components/bt/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ menu "Bluetooth"
8181
So this option will disable the PMP (ESP_SYSTEM_PMP_IDRAM_SPLIT)
8282

8383
menu "Common Options"
84-
visible if (BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED)
85-
8684
source "$IDF_PATH/components/bt/common/Kconfig.in"
8785
endmenu
8886

components/bt/common/Kconfig.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
config BT_ALARM_MAX_NUM
22
int "Maximum number of Bluetooth alarms"
33
default 50
4+
depends on (BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED)
45
help
56
This option decides the maximum number of alarms which
67
could be used by Bluetooth host.

components/bt/common/ble_log/ble_log_spi_out.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ IRAM_ATTR static void esp_timer_cb_flushout(void)
176176
if (trans_head->trans.length) {
177177
spi_out_append_trans();
178178
}
179-
} else {
180-
// Restart flushout timer
179+
}
180+
181+
// Restart flushout timer if not active
182+
if (!esp_timer_is_active(flushout_timer_handle)) {
181183
esp_timer_start_once(flushout_timer_handle, SPI_OUT_FLUSHOUT_TIMEOUT);
182184
}
183185

@@ -193,6 +195,9 @@ IRAM_ATTR static void esp_timer_cb_ts_sync(void)
193195
uint32_t lc_ts = 0;
194196
uint32_t esp_ts = 0;
195197

198+
// Toggle sync IO
199+
sync_io_level = !sync_io_level;
200+
196201
// Enter critical
197202
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
198203
portENTER_CRITICAL_SAFE(&spinlock);
@@ -205,7 +210,7 @@ IRAM_ATTR static void esp_timer_cb_ts_sync(void)
205210
lc_ts = r_os_cputime_get32();
206211
#endif // CONFIG_IDF_TARGET_ESP32C2
207212

208-
// Toggle Sync IO
213+
// Set sync IO level
209214
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, (uint32_t)sync_io_level);
210215

211216
// Get ESP timestamp
@@ -219,9 +224,6 @@ IRAM_ATTR static void esp_timer_cb_ts_sync(void)
219224
memcpy(sync_frame + 1, &lc_ts, sizeof(lc_ts));
220225
memcpy(sync_frame + 5, &esp_ts, sizeof(esp_ts));
221226
ble_log_spi_out_write(BLE_LOG_SPI_OUT_SOURCE_SYNC, sync_frame, 9);
222-
223-
// Update IO level
224-
sync_io_level = !sync_io_level;
225227
}
226228
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED
227229

@@ -351,6 +353,10 @@ void ble_log_spi_out_ts_sync_stop(void)
351353
if (esp_timer_is_active(ts_sync_timer_handle)) {
352354
esp_timer_stop(ts_sync_timer_handle);
353355
}
356+
357+
// Set sync IO to low level
358+
sync_io_level = 0;
359+
gpio_set_level(CONFIG_BT_BLE_LOG_SPI_OUT_SYNC_IO_NUM, (uint32_t)sync_io_level);
354360
}
355361
}
356362
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_TS_SYNC_ENABLED

components/bt/common/ble_log/include/ble_log/ble_log_spi_out.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#ifndef __BT_SPI_OUT_H__
77
#define __BT_SPI_OUT_H__
88

9+
#include <stdarg.h>
910
#include <string.h>
1011
#include "driver/spi_master.h"
1112
#include "driver/gpio.h"
@@ -19,6 +20,7 @@
1920
#define BLE_LOG_SPI_OUT_SOURCE_NIMBLE 3
2021
#define BLE_LOG_SPI_OUT_SOURCE_HCI_UPSTREAM 4
2122
#define BLE_LOG_SPI_OUT_SOURCE_HCI_DOWNSTREAM 5
23+
#define BLE_LOG_SPI_OUT_SOURCE_USER 0x10
2224
#define BLE_LOG_SPI_OUT_SOURCE_SYNC 0xFE
2325
#define BLE_LOG_SPI_OUT_SOURCE_LOSS 0xFF
2426

components/bt/controller/esp32c2/bt.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
393393
portENTER_CRITICAL_SAFE(&spinlock);
394394
esp_panic_handler_feed_wdts();
395395
ble_log_async_output_dump_all(true);
396-
stop_write = true;
397396
esp_bt_ontroller_log_deinit();
398-
portEXIT_CRITICAL_SAFE(&spinlock);
397+
stop_write = true;
399398

400399
buffer = (const uint8_t *)mapped_ptr;
400+
esp_panic_handler_feed_wdts();
401401
if (is_filled) {
402402
read_index = next_erase_index;
403403
} else {
@@ -409,14 +409,15 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
409409
while (read_index != write_index) {
410410
esp_rom_printf("%02x ", buffer[read_index]);
411411
if (print_len > max_print_len) {
412-
vTaskDelay(2);
412+
esp_panic_handler_feed_wdts();
413413
print_len = 0;
414414
}
415415

416416
print_len++;
417417
read_index = (read_index + 1) % MAX_STORAGE_SIZE;
418418
}
419419
esp_rom_printf(":DUMP_END]\r\n");
420+
portEXIT_CRITICAL_SAFE(&spinlock);
420421
esp_partition_munmap(mmap_handle);
421422
err = esp_bt_controller_log_init(log_output_mode);
422423
assert(err == ESP_OK);
@@ -430,13 +431,17 @@ static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, b
430431
esp_bt_controller_log_storage(len, addr, end);
431432
#endif //CONFIG_BT_LE_CONTROLLER_LOG_STORAGE_ENABLE
432433
} else {
434+
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
435+
portENTER_CRITICAL_SAFE(&spinlock);
436+
esp_panic_handler_feed_wdts();
433437
for (int i = 0; i < len; i++) {
434438
esp_rom_printf("%02x ", addr[i]);
435439
}
436440

437441
if (end) {
438442
esp_rom_printf("\n");
439443
}
444+
portEXIT_CRITICAL_SAFE(&spinlock);
440445
}
441446
}
442447

components/bt/controller/esp32c5/Kconfig.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@ menu "Controller debug features"
396396
config BT_LE_ASSERT_WHEN_ABNORMAL_DISCONN_ENABLED
397397
bool "When ACL disconnects abnormally, assertion processing is performed(Experimental)"
398398
default n
399+
400+
config BT_LE_DEBUG_REMAIN_SCENE_ENABLED
401+
bool "Remain scene with GDB to capture relevant status info(Experimental)"
402+
default n
403+
help
404+
Retain scene with GDB to capture info, requires disabling WDT (CONFIG_ESP_INT_WDT, CONFIG_ESP_TASK_WDT_EN).
399405
endmenu
400406

401407
config BT_LE_LL_RESOLV_LIST_SIZE

0 commit comments

Comments
 (0)