Commit Graph

5067 Commits

Author SHA1 Message Date
Alexey Gerenkov
5270dda8cf feat(tools): update openocd version to v0.12.0-esp32-20250422 2025-04-26 12:42:00 +02:00
Alexey Lapshin
2e3323c9cb fix(ldgen): extend section name regex to include '_' (e.g.: used by picolibc) 2025-04-09 16:53:12 +08:00
harshal.patil
77b9f5e054 fix(examples): Example CA certs must contain the Key Usage parameter
- Example CA certificates that are used for self-signed client certificates
need to include the Key Usage parameter.
- Python3.13 changed the default context of the SSL context that is
generated using ssl.create_default_context() by enabling the VERIFY_X509_STRICT
flag by default
2025-04-03 11:04:50 +05:30
Frantisek Hrbata
d2b3dbf0c2 fix(tools): handle packages with dots in their names during dependency checks
The `setuptools` package starting with `v70.1.0`[1] contains built-in
`bdist_wheel` command. Before this version `setuptools` relied on the
`bdist_wheel` command implementation from the `wheel` package. Starting with
`setuptools` `v75.8.1` the `PEP 491`[3] restrictions on the distribution name
of a wheel package are enforced[4], replacting also `.` with `_`.  Note that
`PEP 491` actually allows `.` in the distribution name, but for some reason the
latest packaging docs[10][11] does not, stating that `.` should be replaced
with `_`. This was discussion here[12].

Also the `wheel` package starting with `v0.45.0`[5] is using the `bdist_wheel`
command from `setuptools`.  This means that any package which has `.` in its
distribution name, like `ruamel.yaml.clib`, can have different wheel name,
depending on which version of the `bdist_wheel` command was used.

The `bdist_wheel` command from setuptools prior `v75.8.1` or `wheel` prior
`v0.45.0` will keep the dots in distribution name preserved.  For exaple the
`ruamel.yaml.clib` package will have distribution name
`ruamel.yaml.clib-0.2.12.dist-info. Newer versions will replace the dots with
`_` according to [10][11], creating distribution like
`ruamel_yaml_clib-0.2.12.dist-info`.

From packaging point of view `ruamel.yaml.clib-0.2.12.dist-info` and
`ruamel_yaml_clib-0.2.12.dist-info` are the same packages, but this is not
reflected in `importlib.metadata` prior python 3.10[9], which does not perform
name normalization prior the distribution search. This causes the `version`
from `importlib.metadata` to fail on python prior the 3.10 version if the
package with dots in distribution name was generated with normalized paths with
newer `setuptools`. Note that the distribution name normalization was
backported to some later 3.9 python version.

Let's demonstrate this behavior on a simple package with the
`my.minimal.package` name.

```
my_minimal_package/
├── pkg
│   └── __init__.py
└── setup.py

from setuptools import setup, find_packages

setup(
    name='my.minimal.package',
    version='0.1.0',
    packages=find_packages(),
    install_requires=[],
    entry_points={},
)
```

With python 3.9.0 search for `my.minimal.package` fails because
of the missing name normalization.
```
docker run --rm -it --platform linux/x86_64 python:3.9.0 bash
python -m venv venv
. venv/bin/activate
pip install setuptools==v75.8.1
python setup.py bdist_wheel
pip install dist/my_minimal_package-0.1.0-py3-none-any.whl
python
Python 3.9.0 (default, Nov 18 2020, 13:28:38)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 551, in version
    return distribution(distribution_name).version
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: my.minimal.package
>>> get_version('my_minimal_package')
'0.1.0'
```

With python 3.10.0 search for both `my.minimal.package` and
`my_minimal_package` succeeds.
```
docker run --rm -it --platform linux/x86_64 python:3.10.0 bash
python
Python 3.10.0 (default, Dec  3 2021, 00:21:30) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
'0.1.0'
>>> get_version('my_minimal_package')
'0.1.0'
```

In our `tools/check_python_dependencies.py` we cannot relay on the default
distribution finder, used in the `version` function from `importlib.metadata`,
to do name normalization on older python versions.  To cope with this,
implement a fallback version search. If `version` fails with
`PackageNotFoundError`, do the name normalization according to [10][11] and try
again.

Note: There is also a `wheel`[6][7] `v0.43.0` package embeded in `setuptools`
along with the new implementation[8].  This one seems to be used if the
external `wheel` package is not available but imported. TBH this is all kinda
messy and I may have overlooked something.

* [1] https://setuptools.pypa.io/en/stable/history.html#v70-1-0
* [2] https://setuptools.pypa.io/en/stable/history.html#v75-8-1
* [3] https://peps.python.org/pep-0491/#escaping-and-unicode
* [4] https://github.com/pypa/setuptools/pull/4766/files
* [5] https://wheel.readthedocs.io/en/stable/news.html
* [6] https://github.com/pypa/setuptools/blob/main/setuptools/_vendor/wheel/__init__.py
* [7] https://github.com/pypa/setuptools/issues/1386
* [8] https://github.com/pypa/setuptools/blob/main/setuptools/command/bdist_wheel.py
* [9] c6ca368867
* [10] https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
* [11] https://packaging.python.org/en/latest/specifications/binary-distribution-format/
       #escaping-and-unicode
* [12] https://github.com/pypa/setuptools/issues/3777

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-03-27 08:05:32 +01:00
Aditya Patwardhan
84467eccf4 Merge branch 'bugfix/provisioning_sec2_aes_iv_usage_v5.1' into 'release/v5.1'
fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme (v5.1)

See merge request espressif/esp-idf!37617
2025-03-25 13:58:10 +08:00
Roland Dobai
7d78f36fec Merge branch 'fix/extractall_deprecation_v5.1' into 'release/v5.1'
fix(idf_tools): Patch extractall() deprecation warning (v5.1)

See merge request espressif/esp-idf!37886
2025-03-21 02:02:40 +08:00
Radim Karniš
26c080562e fix(idf_tools): Validate input features 2025-03-19 22:20:52 +01:00
Radim Karniš
09ea954f16 fix(idf_tools): Patch extractall() deprecation warning 2025-03-19 13:54:43 +01:00
Euripedes Rocha
4fc917f0b4 fix(mqtt): Regenerate certificates for testing
- Previous fix ommited one of the client certificates by mistaque.
- This regenerates all certificates to clean that up.
2025-03-17 23:04:19 +08:00
Marius Vikhammer
4aa92562ba Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.1' into 'release/v5.1'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.1)

See merge request espressif/esp-idf!37123
2025-03-12 10:00:36 +08:00
Mahavir Jain
fee5008f1a fix(esp_local_ctrl): update for changes in protocomm security2 scheme 2025-03-10 12:33:27 +08:00
Mahavir Jain
293e29d400 fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme
Using same IV in AES-GCM across multiple invocation of
encryption/decryption operations can pose a security risk. It can help
to reveal co-relation between different plaintexts.

This commit introduces a change to use part of IV as a monotonic
counter, which must be incremented after every AES-GCM invocation
on both the client and the device side.

Concept of patch version for a security scheme has been introduced here
which can help to differentiate a protocol behavior for the provisioning
entity. The security patch version will be available in the JSON
response for `proto-ver` endpoint request with the field
`sec_patch_ver`.

Please refer to documentation for more details on the changes required
on the provisioning entity side (e.g., PhoneApps).
2025-03-10 12:33:27 +08:00
Sudeep Mohanty
2bba3944c2 fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-03-06 09:10:09 +01:00
Erhan Kurubas
1d5a76a7a8 feat(tools): update openocd version to v0.12.0-esp32-20250226 2025-03-05 15:48:57 +01:00
akshat
9186cf432a bugfix(wifi): Fix header file errors and remove esp_supplicant from check_public_headers_exceptions.txt 2025-02-27 15:52:10 +08:00
Marius Vikhammer
bf11849a79 Merge branch 'bugfix/remove_wdt_both_cpus_test_v5.1' into 'release/v5.1'
test(panic): remove WDT both CPU test (v5.1)

See merge request espressif/esp-idf!36623
2025-02-25 11:36:37 +08:00
Martin Vychodil
37bbb0d223 fix(security): Fixed ESP32S2 memory protection check for Peri1 RTCSLOW interrupt
- fixes the issue found in https://github.com/espressif/esp-idf/issues/15359
- extends debug printouts in the related tests
2025-02-19 19:33:12 +01:00
Island
e7629d043f Merge branch 'feat/support_ble_debug_with_gpio_v5.1' into 'release/v5.1'
Support change HID task size by Kconfig in HID example (v5.1)

See merge request espressif/esp-idf!36996
2025-02-19 16:37:08 +08:00
Zhang Hai Peng
ad1e522425 feat(ble/bluedroid): Support change HID task size by Kconfig in HID example
(cherry picked from commit d4b3a7e99d)

Co-authored-by: Mitch Cairns <mitch.cairns@handheldlegend.com>
2025-02-18 10:54:05 +08:00
Roland Dobai
7452b1cb1d change(version): Update version to 5.1.6 2025-02-17 10:08:52 +01:00
Marius Vikhammer
24b3a11c65 test(panic): remove WDT both CPU test
Test never worked on S3/P4 and was flakey on ESP32. Hard to design a reliable test
case that triggers both WDT at the exact same time.
2025-01-24 13:31:47 +01:00
Jiang Jiang Jian
b25bf99d4f Merge branch 'feat/spi_std_timing_and_bit_trans_v5.1' into 'release/v5.1'
feat(driver_spi): support adjust master rx to standard timing (v5.1)

See merge request espressif/esp-idf!36402
2025-01-24 15:11:09 +08:00
wanckl
caf0d04a31 feat(driver_spi): support using SPI_DEVICE_STD_TIMING to adjust master rx in standard timing 2025-01-22 11:14:23 +08:00
harshal.patil
b285e2789f feat(bootloader_support): Permanently enable XTS-AES pseudo rounds when FE release mode is enabled 2025-01-21 13:42:01 +05:30
harshal.patil
a29dadbabc feat(hal/spi_flash_encrypted): Enable pseudo rounds function during XTS-AES operations 2025-01-17 14:20:05 +05:30
harshal.patil
b9fe639725 feat(hal/aes): Enable pseudo rounds function during AES operations 2025-01-17 14:01:43 +05:30
yinqingzhao
26e77f9a38 feat(wifi): avoid compiling components related to wifi when wifi is not supported 2025-01-08 10:27:36 +08:00
morris
16b622b4f3 Merge branch 'bugfix/esp_rom_gpio_connect_out_signal_patch_v5.1' into 'release/v5.1'
fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2 (v5.1)

See merge request espressif/esp-idf!35942
2025-01-03 10:36:51 +08:00
Jiang Jiang Jian
a54a67b89a Merge branch 'ci/add_build_test_eco_versions_v5.1' into 'release/v5.1'
ci: add build test for eco versions (v5.1)

See merge request espressif/esp-idf!35821
2025-01-02 15:25:22 +08:00
Song Ruo Jing
8f1b98b237 fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2
The original ROM function enabled output for the pad first, and then connected the signal
This could result in an undesired level change at the pad

Closes https://github.com/espressif/esp-idf/issues/12826
2024-12-25 14:19:29 +08:00
Chen Yudong
118ab73787 ci: add build test for eco versions 2024-12-19 21:05:48 +08:00
Roland Dobai
32a118de11 fix(idf_tools.py): Upgrade pip and setuptools separately
This way the setuptools version dependency resolution will be done by
the upgraded pip.
2024-12-18 12:57:43 +01:00
Jiang Jiang Jian
bb48bfb0ba Merge branch 'feature/reason_for_ap_stadisconnected_event_v5.1' into 'release/v5.1'
fix(esp_wifi): Add some bugfixes and cleanup in softAP (Backport v5.1)

See merge request espressif/esp-idf!35576
2024-12-12 10:23:30 +08:00
Sarvesh Bodakhe
9584729322 fix(esp_wifi): Add some bugfixes and cleanup in softAP
1. Fix wrong reason code in 'WIFI_EVENT_AP_STADISCONNECTED' event
2. cleanup in softAP for disconnecting connected station
3. Update examples to display reason while processing WIFI_EVENT_AP_STADISCONNECTED event
2024-12-11 15:40:04 +05:30
zhanghaipeng
88ccc42dbf feat(bt): Add support for converting BT HCI logs to btsnoop format 2024-12-09 17:52:57 +08:00
igor.udot
e05471b857 refactor: changed logic of unity_tester, replaced threads by generators 2024-12-04 10:53:28 +01:00
Erhan Kurubas
aefe7913c5 fix(sysview): add prefix to the module desc to avoid stuck in Segger SystemView app
Closes https://github.com/espressif/esp-idf/issues/10483
2024-11-26 09:04:38 +01:00
Frantisek Hrbata
72a74a622b fix(tools): re-raise ImportError without module name
The ImportError or ModuleNotFoundError might be raised without
specifying a module name. In this not so common situation, re-raise the
exception to print all the information that could assist in identifying
the problem.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-21 09:54:37 +01:00
Martin Vychodil
6b51d36351 Merge branch 'bugfix/nvs_entry_sanity_check_v5.1' into 'release/v5.1'
Bugfix/added nvs entry header sanity checks (v5.1)

See merge request espressif/esp-idf!34295
2024-11-14 22:39:00 +08:00
radek.tandler
79b93d1db7 fix(storage/nvs): Fixed hadling of inconsistent values in NVS entry header
feat(storage/nvs): Added test cases for damaged entries with correct CRC
2024-11-14 12:48:22 +01:00
WanqQixiang
da05404bbb fix(tools/esp_prov): Fix hostname resolving for IPv6-only host 2024-11-05 17:24:41 +08:00
Alexey Gerenkov
49be03fd46 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20241016_v5.1' into 'release/v5.1'
feat(tools): update openocd version to v0.12.0-esp32-20241016 (v5.1)

See merge request espressif/esp-idf!34395
2024-10-29 20:36:44 +08:00
Roland Dobai
0c53e6d54e Merge branch 'feat/ninja_use_targz_instead_zip' into 'release/v5.1'
feat(tools): ninja tool download - use .tar.gz instead of .zip

See merge request espressif/esp-idf!33950
2024-10-26 22:09:56 +08:00
Roland Dobai
927a5ed1e2 Merge branch 'fix/ldgen_sort_v5.1' into 'release/v5.1'
fix(ldgen): enable default name SORT in linker fragment (v5.1)

See merge request espressif/esp-idf!34076
2024-10-26 22:09:36 +08:00
Roland Dobai
05a0f5e602 Merge branch 'fix/gdbgui_py3.13_v5.1' into 'release/v5.1'
fix(tools): Print message about GDBGUI being not supported with Python 3.13 (v5.1)

See merge request espressif/esp-idf!34379
2024-10-26 22:09:30 +08:00
Roland Dobai
454782bb6b change(version): Update version to 5.1.5 2024-10-25 09:02:00 +02:00
Alexey Gerenkov
48e192eb63 feat(tools): update openocd version to v0.12.0-esp32-20241016 2024-10-23 10:05:43 +02:00
Roland Dobai
f145943e62 fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 16:01:12 +02:00
Fu Hanxi
aee4baa4a2 ci: replace internal clang-tidy runner with the pypi project 2024-10-22 10:30:09 +02:00
Frantisek Hrbata
b4106a3fdf fix(ldgen): enable default name SORT in linker fragment
Currently, the `SORT` flag mandates the inclusion of at least the
`sort_by_first` argument in the grammar, despite the documentation[1]
indicating that `SORT` can be utilized without any arguments, defaulting
to sorting input sections by name. Fix this by modifying the grammar
to allow a default `SORT` and update a test accordingly.

[1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/
    linker-script-generation.html

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-10-15 16:25:31 +02:00