Commit Graph

4539 Commits

Author SHA1 Message Date
harshal.patil 8094b821c8 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:06:18 +05:30
Jiang Jiang Jian c5436dd14f Merge branch 'ci/add_build_test_eco_versions_v5.0' into 'release/v5.0'
ci: add build test for eco versions (v5.0)

See merge request espressif/esp-idf!35822
2025-03-31 11:30:40 +08:00
morris 89bcbca982 Merge branch 'fix/mmu_multicore_app_bl_v5.0' into 'release/v5.0'
fix(MMU): fixed mmap deadlock when using multicore app with unicore bootloader (v5.0)

See merge request espressif/esp-idf!32899
2025-03-28 10:59:42 +08:00
Xiao Xufeng 8532aab32b ci(mmu): add unicore test 2025-03-27 18:15:28 +08:00
Frantisek Hrbata fd3b6c61c7 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] https://github.com/python/cpython/commit/c6ca368867bd68d44f333df840aa85d425a51410
* [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:45 +01:00
Aditya Patwardhan 7ff465074f Merge branch 'bugfix/provisioning_sec2_aes_iv_usage_v5.0' into 'release/v5.0'
fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme (v5.0)

See merge request espressif/esp-idf!37666
2025-03-25 13:57:29 +08:00
Roland Dobai 83b9a4de2e Merge branch 'fix/extractall_deprecation_v5.0' into 'release/v5.0'
fix(idf_tools): Patch extractall() deprecation warning (v5.0)

See merge request espressif/esp-idf!37887
2025-03-21 02:03:06 +08:00
Radim Karniš 52d60d161c fix(idf_tools): Patch extractall() deprecation warning 2025-03-19 22:07:57 +01:00
Radim Karniš 59ca6c93b4 fix(idf_tools): Validate input features 2025-03-19 22:04:17 +01:00
Marius Vikhammer be7ea1c1c2 Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.0' into 'release/v5.0'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.0)

See merge request espressif/esp-idf!37125
2025-03-12 10:01:25 +08:00
Mahavir Jain 76bd80a56b fix(esp_local_ctrl): update for changes in protocomm security2 scheme 2025-03-11 11:26:07 +05:30
Mahavir Jain 14bc1b4b07 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-11 10:11:02 +05:30
Erhan Kurubas b6af603098 feat(tools): update openocd version to v0.12.0-esp32-20250226 2025-03-05 15:56:04 +01:00
Jiang Jiang Jian cae81c6d0b Merge branch 'bugfix/ifdef_cplusplus_bracket_v5.0' into 'release/v5.0'
bugfix(wifi): Add missing brackets in the C++ guard (Backport v5.0)

See merge request espressif/esp-idf!36849
2025-02-28 11:50:17 +08:00
Wang Meng Yang 45acdc00ba Merge branch 'feat/support_ble_debug_with_gpio_v5.0' into 'release/v5.0'
Support change HID task size by Kconfig in HID example (v5.0)

See merge request espressif/esp-idf!36995
2025-02-27 15:07:43 +08:00
akshat d753986556 bugfix(wifi): Fix header file errors and remove esp_supplicant from check_public_headers_exceptions.txt 2025-02-27 13:56:17 +08:00
Sudeep Mohanty 68277df469 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-02-26 08:38:05 +01:00
Zhang Hai Peng 2f9c756d74 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-23 17:49:07 +08:00
Jan Beran 2c501d5bac fix(kconfgen): Improve error message for int/hex without default
Non string values without (valid) default value will have their
str_value equal to "" (empty string). If this is detected, a warning is
printed and the value is set to None.
2025-02-21 13:11:31 +01:00
Martin Vychodil 889cfabc89 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:40:23 +01:00
Marius Vikhammer 2260b66eb1 Merge branch 'bugfix/remove_wdt_both_cpus_test_v5.0' into 'release/v5.0'
test(panic): remove WDT both CPU test (v5.0)

See merge request espressif/esp-idf!36624
2025-02-05 11:50:24 +08:00
Euripedes Rocha 42351e8d15 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-01-29 14:04:58 +01:00
Marius Vikhammer 6401cad494 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-27 11:20:39 +01:00
Laukik Hase 87058b125e test_app: Split panic test app into separate source files
- Added minor improvements to  `panic` test app
  * Replaced existing API to disable flash cache which did not disabled cache always
    (`esp_flash_default_chip->os_func->start(esp_flash_default_chip->os_func_data)`)
    with `spi_flash_enable_interrupts_caches_and_other_cpu`
  * Included some required headers explicitly (`esp_memory_utils.h` and `esp_heap_caps.h`)
2025-01-27 08:33:00 +01:00
morris a7b8aed433 Merge branch 'bugfix/esp_rom_gpio_connect_out_signal_patch_v5.0' into 'release/v5.0'
fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2 (v5.0)

See merge request espressif/esp-idf!35943
2025-01-24 11:16:51 +08:00
Aditya Patwardhan 789db760d6 change(version): Update version to 5.0.8 2025-01-10 13:09:53 +05:50
Song Ruo Jing d555ea2b00 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 13:56:46 +08:00
Alexey Gerenkov bba2971f34 Merge branch 'change/sysview_test_config_v5.0' into 'release/v5.0'
change(sysview): run heap_log tracing tests on existing cores (v5.0)

See merge request espressif/esp-idf!35199
2024-12-19 23:08:02 +08:00
Chen Yudong af2fe64500 ci: add build test for eco versions 2024-12-19 21:06:04 +08:00
Roland Dobai 4450952227 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:55 +01:00
Island f924f612cf Merge branch 'bugfix/fix_hid_crash_v5.0' into 'release/v5.0'
fix(ble): Fix crash issue during logging (v5.0)

See merge request espressif/esp-idf!35507
2024-12-12 09:06:02 +08:00
Roshan Bangar 0fd1300d50 feat(nimble): added HID over Gatt profile support 2024-12-10 15:45:26 +05:30
zhanghaipeng d5446608e3 feat(bt): Add support for converting BT HCI logs to btsnoop format 2024-12-09 17:50:19 +08:00
Erhan Kurubas d55663f07b 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-12-06 19:52:10 +08:00
Frantisek Hrbata a20539d53e 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 10:10:12 +01:00
Martin Vychodil 94250f0521 Merge branch 'bugfix/nvs_entry_sanity_check_v5.0' into 'release/v5.0'
Bugfix/added nvs entry header sanity checks (v5.0)

See merge request espressif/esp-idf!34296
2024-11-14 21:39:39 +08:00
radek.tandler 508c251fd2 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 11:50:44 +01:00
Marek Fiala b84b71e625 feat(tools): ninja tool download - use .tar.gz insead of .zip
Changed the download file format for ninja tool from github with .zip file format
to dl.espressif.com with .tar.gz file format.

Closes https://github.com/espressif/esp-idf/pull/14633
2024-11-12 13:39:06 +01:00
Sergei Silnov e6a6ccfe5c Merge branch 'fix/gdbgui_py3.13_v5.0' into 'release/v5.0'
fix(tools): Print message about GDBGUI being not supported with Python 3.13 (v5.0)

See merge request espressif/esp-idf!34380
2024-10-23 19:58:53 +08:00
Alexey Gerenkov 797fb852a6 feat(tools): update openocd version to v0.12.0-esp32-20241016 2024-10-23 10:06:08 +02:00
Roland Dobai 5192bc8e4c fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 16:26:44 +02:00
Fu Hanxi 233429b4a3 ci: replace internal clang-tidy runner with the pypi project 2024-10-22 13:23:21 +02:00
Frantisek Hrbata b56d53dfb8 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:27:52 +02:00
morris d0f8439931 Merge branch 'support_psram_noinit_segment_on_s3_v5.0' into 'release/v5.0'
feat(psram): add psram noinit  segment support on s2/s3/p4/c5 and bss segment on c5 (v5.0)

See merge request espressif/esp-idf!33259
2024-10-09 13:27:59 +08:00
Xiao Xufeng 563641f948 ci(h2): disable build test for h2 2024-09-19 22:57:13 +08:00
Marek Fiala 5e52ea47d1 feat(tools): Update tools: cmake, ninja, ccache
cmake  v3.24.0 -> v3.30.2
ninja  v1.11.1 -> v1.12.1
ccache v4.8    -> v4.10.2

Closes https://github.com/espressif/esp-idf/pull/14376
2024-09-13 17:13:08 +02:00
Chen Jichang 58c3ee2c89 feat(psram): add psram noinit segment support on S2/S3/P4/C5
Closes https://github.com/espressif/esp-idf/issues/14253
2024-09-12 10:40:48 +08:00
Sudeep Mohanty fe2495a2f7 test(freertos): Added build test for function in flash with -Os optimation
This commit adds a build test for when FreeRTOS and esp_ringbuf functions
are placed in flash and the compiler optimizes for code size.
2024-08-30 09:19:24 +02:00
Sudeep Mohanty 90b92791a7 fix(freertos): Added freertos fragments to the exception list of ldgen mapping checks
This commit adds freertos and esp_ringbuf linker fragment sections
to the exception list of the ldgen mappings checker script.
2024-08-30 09:19:24 +02:00
Alexey Gerenkov 63d569de07 feat(tools): update openocd version to v0.12.0-esp32-20240821 2024-08-28 13:20:52 +03:00