Skip to content

Commit a814af1

Browse files
authored
Merge branch 'espressif:master' into master
2 parents c6c2833 + 94cfe39 commit a814af1

File tree

587 files changed

+15909
-5174
lines changed

Some content is hidden

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

587 files changed

+15909
-5174
lines changed

.flake8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ select =
5353
E133, # closing bracket is missing indentation
5454
E201, # whitespace after '('
5555
E202, # whitespace before ')'
56-
E203, # whitespace before ':'
5756
E211, # whitespace before '('
5857
E221, # multiple spaces before operator
5958
E222, # multiple spaces after operator
6059
E223, # tab before operator
6160
E224, # tab after operator
62-
E225, # missing whitespace around operator
6361
E226, # missing whitespace around arithmetic operator
6462
E227, # missing whitespace around bitwise or shift operator
6563
E228, # missing whitespace around modulo operator
@@ -125,6 +123,7 @@ select =
125123

126124
ignore =
127125
E221, # multiple spaces before operator
126+
E225, # missing whitespace around operator
128127
E231, # missing whitespace after ',', ';', or ':'
129128
E241, # multiple spaces after ','
130129
W503, # line break before binary operator

.pre-commit-config.yaml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44
default_stages: [pre-commit]
55

66
repos:
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: "v0.9.7"
9+
hooks:
10+
- id: ruff-format
11+
args: [ "--preview" ]
12+
files: 'pytest_.*\.py$'
13+
- repo: local
14+
hooks:
15+
- id: pytest-linter
16+
name: Pytest Linter Check
17+
entry: tools/ci/check_test_files.py
18+
language: python
19+
files: 'pytest_.*\.py$'
20+
require_serial: true
21+
additional_dependencies:
22+
- pytest-embedded-idf[serial]~=1.14
23+
- pytest-embedded-jtag~=1.14
24+
- pytest-embedded-qemu~=1.14
25+
- pytest-ignore-test-results~=0.3
26+
- pytest-rerunfailures
27+
- pytest-timeout
28+
- idf-build-apps~=2.8
29+
- python-gitlab
30+
- minio
31+
- click
32+
- esp-idf-monitor
733
- repo: https://github.com/pre-commit/pre-commit-hooks
834
rev: v4.5.0
935
hooks:
@@ -54,6 +80,8 @@ repos:
5480
(?x)^(
5581
.*_pb2.py
5682
)$
83+
|pytest_eth_iperf.py
84+
|pytest_iperf.py
5785
- repo: https://github.com/codespell-project/codespell
5886
rev: v2.3.0
5987
hooks:
@@ -72,11 +100,6 @@ repos:
72100
language: python
73101
pass_filenames: false
74102
always_run: true
75-
- id: check-deprecated-kconfigs-options
76-
name: Check if any Kconfig Options Deprecated
77-
entry: tools/ci/check_deprecated_kconfigs.py
78-
language: python
79-
files: 'sdkconfig\.ci$|sdkconfig\.rename$|sdkconfig.*$'
80103
- id: cmake-lint
81104
name: Check CMake Files Format
82105
entry: cmakelint --linelength=120 --spaces=4 --filter=-whitespace/indent
@@ -156,7 +179,7 @@ repos:
156179
require_serial: true
157180
additional_dependencies:
158181
- PyYAML == 5.3.1
159-
- idf-build-apps>=2.6.2,<3
182+
- idf-build-apps>=2.8,<3
160183
- id: sort-yaml-files
161184
name: sort yaml files
162185
entry: tools/ci/sort_yaml.py
@@ -243,6 +266,7 @@ repos:
243266
name: Lint rST files in docs folder using Sphinx Lint
244267
files: ^(docs/en|docs/zh_CN)/.*\.(rst|inc)$
245268
- repo: https://github.com/espressif/esp-idf-kconfig.git
246-
rev: v2.4.1
269+
rev: v2.5.0
247270
hooks:
248271
- id: check-kconfig-files
272+
- id: check-deprecated-kconfig-options

components/app_trace/linker.lf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ entries:
1818
archive: libesp_driver_gptimer.a
1919
entries:
2020
if APPTRACE_SV_TS_SOURCE_GPTIMER = y:
21-
gptimer (noflash)
21+
gptimer: gptimer_get_raw_count (noflash)
2222
else:
2323
* (default)
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: Unlicense OR CC0-1.0
33
import re
44

55
import pytest
66
from pytest_embedded import Dut
7+
from pytest_embedded_idf.utils import idf_parametrize
78

89
DEFAULT_TIMEOUT = 20
910
TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
1011

1112

12-
@pytest.mark.supported_targets
13-
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317
13+
@pytest.mark.temp_skip_ci(
14+
targets=['esp32c5'], reason='C5 has not supported deep sleep'
15+
) # TODO: [ESP32C5] IDF-8640, IDF-10317
1416
@pytest.mark.generic
1517
@pytest.mark.parametrize(
1618
'config',
@@ -19,11 +21,11 @@
1921
],
2022
indirect=True,
2123
)
24+
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
2225
def test_app_update(dut: Dut) -> None:
2326
dut.run_all_single_board_cases(timeout=90)
2427

2528

26-
@pytest.mark.supported_targets
2729
# TODO: [ESP32C61] IDF-9245, IDF-10983
2830
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C61 has not supported deep sleep')
2931
@pytest.mark.generic
@@ -34,12 +36,14 @@ def test_app_update(dut: Dut) -> None:
3436
],
3537
indirect=True,
3638
)
39+
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
3740
def test_app_update_xip_psram(dut: Dut) -> None:
3841
dut.run_all_single_board_cases(timeout=90)
3942

4043

41-
@pytest.mark.supported_targets
42-
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317
44+
@pytest.mark.temp_skip_ci(
45+
targets=['esp32c5'], reason='C5 has not supported deep sleep'
46+
) # TODO: [ESP32C5] IDF-8640, IDF-10317
4347
@pytest.mark.generic
4448
@pytest.mark.parametrize(
4549
'config',
@@ -48,14 +52,11 @@ def test_app_update_xip_psram(dut: Dut) -> None:
4852
],
4953
indirect=True,
5054
)
55+
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
5156
def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
5257
dut.run_all_single_board_cases(timeout=90)
5358

5459

55-
@pytest.mark.esp32
56-
@pytest.mark.esp32c3
57-
@pytest.mark.esp32s3
58-
@pytest.mark.esp32p4
5960
@pytest.mark.generic
6061
@pytest.mark.parametrize(
6162
'config',
@@ -64,5 +65,6 @@ def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
6465
],
6566
indirect=True,
6667
)
68+
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3', 'esp32p4'], indirect=['target'])
6769
def test_app_update_with_rollback(dut: Dut) -> None:
6870
dut.run_all_single_board_cases(timeout=90)

components/bootloader/Kconfig.projbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ menu "Security features"
764764

765765
config SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT
766766
bool "Flash bootloader along with other artifacts when using the default flash command"
767-
depends on SECURE_BOOT_V2_ENABLED && SECURE_BOOT_BUILD_SIGNED_BINARIES
767+
depends on SECURE_BOOT_V2_ENABLED
768768
default n
769769
help
770770
When Secure Boot V2 is enabled, by default the bootloader is not flashed along with other artifacts

components/bootloader_support/src/flash_encryption/flash_encrypt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
437437
err = read_and_verify_partition_table(partition->pos.offset, partition_table, &num_partitions);
438438
should_encrypt = (err == ESP_OK && num_partitions != 0);
439439
} else if ((partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA)
440+
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_TEE_OTA)
440441
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_NVS_KEYS)) {
441442
/* check if we have ota data partition and the partition should be encrypted unconditionally */
442443
should_encrypt = true;

components/bootloader_support/src/secure_boot_v2/secure_boot_signatures_bootloader.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,12 @@ esp_err_t esp_secure_boot_verify_sbv2_signature_block(const ets_secure_boot_sign
154154
ets_secure_boot_key_digests_t trusted_key_digests = {0};
155155
bool valid_sig_blk = false;
156156
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
157+
trusted_key_digests.key_digests[i] = &trusted.key_digests[i];
157158
if (sig_block->block[i].version != ESP_SECURE_BOOT_SCHEME) {
158159
ESP_LOGD(TAG, "%s signing scheme selected but signature block %d generated for %s scheme", esp_secure_boot_get_scheme_name(ESP_SECURE_BOOT_SCHEME), i, esp_secure_boot_get_scheme_name(sig_block->block[i].version));
159-
continue;
160160
} else {
161161
valid_sig_blk = true;
162162
}
163-
trusted_key_digests.key_digests[i] = &trusted.key_digests[i];
164163
}
165164
if (valid_sig_blk != true) {
166165
ESP_LOGE(TAG, "No signature block generated for valid scheme");

components/bootloader_support/test_apps/bootloader_support/pytest_bootloader_support.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: CC0-1.0
3-
43
import pytest
54
from pytest_embedded import Dut
5+
from pytest_embedded_idf.utils import idf_parametrize
66

77

88
@pytest.mark.generic
9-
@pytest.mark.supported_targets
9+
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
1010
def test_bootloader_support(dut: Dut) -> None:
1111
dut.run_all_single_board_cases()
1212

1313

1414
@pytest.mark.host_test
1515
@pytest.mark.qemu
16-
@pytest.mark.esp32
16+
@idf_parametrize('target', ['esp32'], indirect=['target'])
1717
def test_bootloader_support_qemu_esp32(dut: Dut) -> None:
1818
dut.run_all_single_board_cases()
1919

2020

2121
@pytest.mark.host_test
2222
@pytest.mark.qemu
23-
@pytest.mark.esp32c3
23+
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
2424
def test_bootloader_support_qemu_esp32c3(dut: Dut) -> None:
2525
for case in dut.test_menu:
2626
if 'qemu-ignore-c3' not in case.groups:
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: CC0-1.0
33
import pytest
44
from pytest_embedded import Dut
5+
from pytest_embedded_idf.utils import idf_parametrize
56

67

78
@pytest.mark.generic
8-
@pytest.mark.esp32
9-
@pytest.mark.esp32c3
10-
@pytest.mark.esp32c5
11-
@pytest.mark.esp32c6
12-
@pytest.mark.esp32h2
13-
@pytest.mark.esp32s2
14-
@pytest.mark.esp32s3
15-
@pytest.mark.esp32p4
9+
@idf_parametrize(
10+
'target',
11+
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
12+
indirect=['target'],
13+
)
1614
def test_rtc_reserved_memory(dut: Dut) -> None:
1715
dut.expect_exact('SUCCESS: data were saved across reboot', timeout=10)

components/bt/controller/esp32/Kconfig.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ config BTDM_BLE_VS_QA_SUPPORT
529529
This enables BLE vendor HCI command and event for QA.
530530

531531
config BTDM_CTRL_CONTROLLER_DEBUG_MODE_1
532-
visible if 0
533532
bool "Enable Bluetooth controller debugging mode 1 (for internal use only)"
534533
default n
535534
depends on BT_ENABLED

0 commit comments

Comments
 (0)