Commit Graph

6617 Commits

Author SHA1 Message Date
Mahavir Jain
32875d5a66 fix(tools): suppress GNU bin-utils warning about executable stack
Newer GNU bin-utils version 2.39 has started emitting a warning
about an executable stack region for Linux target build:

/usr/bin/ld: warning: x509_crt_bundle.S.o: missing .note.GNU-stack section implies executable stack

Fix the issue by adding appropriate "noexecute" attribute for stack
section.
2025-03-31 19:15:36 +05:30
Peter Dragun
201e4f3eb3 Merge branch 'ci/ruff' into 'master'
Enable ruff for all python files

Closes IDF-9084

See merge request espressif/esp-idf!38044
2025-03-31 20:41:37 +08:00
Peter Macko
c5b741ea5f Merge branch 'ci/update_esp-env-v5.5_to_ubuntu_24.04_fixed' into 'master'
5.5: Update ubuntu base image for esp-env-v5.5 to 24.04, with fixed pipelines

Closes RDT-993

See merge request espressif/esp-idf!37959
2025-03-31 20:11:57 +08:00
Peter Macko
4a1ea4b725 5.5: Update ubuntu base image for esp-env-v5.5 to 24.04, with fixed pipelines 2025-03-31 20:11:57 +08:00
Lu Ai Jun
e2f50bea42 Merge branch 'ci/add_test_for_ecos_wifi_enterprise' into 'master'
CI: add C3 eco7 and C2 eco4 tests for wifi

See merge request espressif/esp-idf!37759
2025-03-31 10:10:56 +08:00
Martin Vychodil
decbd36008 Merge branch 'contrib/github_pr_15656' into 'master'
fix(nvs_flash): removed usage of 'using namepsace std' in a header file (GitHub PR)

Closes IDFGH-14947

See merge request espressif/esp-idf!38086
2025-03-28 22:02:19 +08:00
Tomáš Rohlínek
be6e24370f fix(storage/nvf_flash): fixup additions from PR 2025-03-28 12:57:33 +01:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Peter Dragun
806c93e08e change: fix issues reported by ruff 2025-03-27 12:30:23 +01:00
Peter Dragun
de6206ed3a ci: use ruff for formatting and linting all python files 2025-03-27 10:44:27 +01:00
Sudeep Mohanty
5ba12ea922 Merge branch 'feat/freertos_move_funcs_to_flash' into 'master'
feat(freertos): Add config to move additional functions into flash

Closes IDF-11428

See merge request espressif/esp-idf!37555
2025-03-27 17:10:00 +08:00
Alexey Lapshin
a31f487760 Merge branch 'feat/newlib-optimized-misaligned-memory' into 'master'
feat(newlib): riscv: add CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS config option

See merge request espressif/esp-idf!36704
2025-03-27 16:32:01 +08:00
Marius Vikhammer
7605727233 Merge branch 'feature/esp_log_flash' into 'master'
feat(log): added option for placing log api in flash

Closes IDF-12522

See merge request espressif/esp-idf!37941
2025-03-27 10:49:32 +08:00
Alexey Lapshin
ec68cb3300 feat(newlib): riscv: add CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS config option
This option replaces implementations of functions from ROM:
  - memcpy
  - memcmp
  - memmove
  - str[n]cpy
  - str[n]cmp

The functions used in the firmware will be better optimized for misaligned
memory. Here are some measurements in CPU cycles for 4096-byte buffers:

  memcpy:  28676 -> 4128
  memcmp:  49147 -> 14259
  memmove: 33896 -> 8086
  strcpy:  32771 -> 17313
  strcmp:  32775 -> 13191
2025-03-26 17:27:24 +07:00
Erhan Kurubas
d2c882502d test(coredump): add test to dump dram from uart 2025-03-26 10:00:24 +01:00
Guillaume Souchere
6ef7ad67d4 Merge branch 'feat/per-task-peak-usage' into 'master'
feat(heap): Add per task peak heap usage feature

Closes IDF-1811 and IDFGH-11277

See merge request espressif/esp-idf!26462
2025-03-26 15:20:04 +08:00
Kevin (Lao Kaiyao)
cb1902af19 Merge branch 'refactor/upgrade_i2s_codec_example_dependency' into 'master'
refactor(i2s_es8311): refactor es8311 example

See merge request espressif/esp-idf!37953
2025-03-26 11:27:16 +08:00
laokaiyao
5a0d21a467 refactor(i2s_es8311): remove esp-box bsp support 2025-03-25 19:58:12 +08:00
Alexey Lapshin
b62c29c231 feat(tools): update gdb version to 16.2_20250324 2025-03-25 08:27:05 +00:00
laokaiyao
92f3faff41 refactor(i2s_es8311): refactor es8311 example 2025-03-25 16:12:38 +08:00
Tomas Rezucha
914d003c7b test(usb): Extend USB mock with usb_host_device_info()
Also provide mocks for CTRL transfers usb_host_transfer_submit_control()
2025-03-25 08:10:30 +01:00
Marius Vikhammer
d488fb41e6 feat(log): added option for placing log api in flash 2025-03-25 10:07:21 +08:00
Guillaume Souchere
daf8f9edb6 feat(heap): Add feature to get peak heap usage
This feature keeps track of the per task peak memory usage.

- Update the heap_task_tracking example to make use of the new feature
Cleanup the implementation:
- multi_heap_get_free_size() is never used, remove it.
- Minor update in heap_caps_update_per_task_info_xx() funcitons.
- Update settting on block owner in heap_caps.c to work with the
get peak usage feature.

- Update heap_caps_update_per_task_info_free() to detect when it
is called to delete the memory allocated for a task TCB. Mark
the corresponding task in the statistic list as deleted.

- Add a Kconfig option dependant on HEAP_TASK_TRACKING being enabled
that force the deletion of the statistics related to deleted task
when set to true.

- In task tracking feature, add a current and peak memory usage
to the heap_stat_t structure to keep track of the current and
peak memory usage of the given task across all heaps.

- Fix missing block owner when allocating memory for heaps_array
in heap_caps_init.

- Keep the original implementation of the task tracking
for backward compatibility reasons.
2025-03-24 12:08:48 +01:00
Sudeep Mohanty
71a79ac0b1 feat(freertos): Add config to move additional functions into Flash
This commit adds a new Kconfig option, viz.,
CONFIG_FREERTOS_PLACE_ISR_FUNCTIONS_INTO_FLASH, which places
additional FreeRTOS functions, such as those which can be called from
and ISR context, into Flash memory. This feature utilizes the Flash auto
suspend/resume feature of the Flash chip.
2025-03-24 09:19:28 +01:00
Marius Vikhammer
e824091650 Merge branch 'feature/esp_intr_flash' into 'master'
feat(intr): added option for placing intr api in flash

Closes IDF-12523

See merge request espressif/esp-idf!37935
2025-03-24 11:29:38 +08:00
Wang Meng Yang
569f97dae5 Merge branch 'bugfix/fix_pbac_free_undef_mem' into 'master'
fix(bt/bluedroid): Fix some bugs in bluedroid

Closes BT-3984

See merge request espressif/esp-idf!37906
2025-03-24 10:44:29 +08:00
Roland Dobai
135f4e2132 Merge branch 'fix/remove-unused-from-gdbinit_cmake' into 'master'
fix(tools): remove unused variables in gdbinit.cmake

Closes IDFGH-14239

See merge request espressif/esp-idf!37903
2025-03-22 00:11:14 +08:00
Marius Vikhammer
274ac2961a feat(intr): added option for placing intr api in flash 2025-03-21 11:21:43 +08:00
linruihao
a0ae67ef8b fix(bt/bluedroid): Fix some bugs in Bluedroid
- Fix PBAC may free undefine memory when conn failed
- Fix some memory in OBEX not being freed when bluedroid deinit
- Fix pre-commit not check some source file that we added to bluedroid
2025-03-21 11:12:07 +08:00
Roland Dobai
0b56c58e8a Merge branch 'fix/check_python_dependencies' into 'master'
fix(tools): handle packages with dots in their names during dependency checks

See merge request espressif/esp-idf!37869
2025-03-20 16:25:34 +08:00
Chen Ji Chang
6474fd67ae Merge branch 'feat/h4_introduce_step8' into 'master'
feat(esp32h4): introduce hello world to ESP32H4 (stage8)

Closes IDF-9526 and IDF-12333

See merge request espressif/esp-idf!37545
2025-03-20 16:16:05 +08:00
Alexey Lapshin
7124690c29 fix(tools): remove unused variables in gdbinit.cmake
Closes https://github.com/espressif/esp-idf/issues/15035
2025-03-20 13:40:14 +07:00
Marius Vikhammer
ee87960c13 Merge branch 'feature/esp_timer_flash' into 'master'
feat(esp_timer): added kconfig option for placing IRAM code into flash

Closes IDF-11427

See merge request espressif/esp-idf!37428
2025-03-20 08:56:43 +08:00
Roland Dobai
cf5989ca06 Merge branch 'fix/install_input_validation' into 'master'
fix(idf_tools): Validate input features

Closes IDF-11703

See merge request espressif/esp-idf!37852
2025-03-19 21:38:52 +08:00
Frantisek Hrbata
3bad4348d0 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-19 12:19:57 +01:00
Chen Jichang
45ba78940f feat(esp32h4): finnal introduce hello world 2025-03-19 18:48:41 +08:00
Radim Karniš
7102508444 fix(idf_tools): Validate input features 2025-03-19 11:07:15 +01:00
Radim Karniš
2618abf5df fix(idf_tools): Patch extractall() deprecation warning 2025-03-18 17:47:34 +01:00
Marius Vikhammer
55be8bdc0d feat(esp_timer): added kconfig option for placing IRAM code into flash 2025-03-18 15:23:43 +08:00
Marius Vikhammer
3fdcf31857 Merge branch 'feature/newlib_in_flash' into 'master'
feat(newlib): added option for placing functions in flash if flash-auto-suspend

Closes IDF-11958

See merge request espressif/esp-idf!37767
2025-03-18 14:55:14 +08:00
Ashish Sharma
88fa3e2c9e feat(security): fixes review comments 2025-03-17 18:23:14 +08:00
Ashish Sharma
4c23ba3c1f feat(security): update idf.py extensions to support security feature application 2025-03-17 18:23:14 +08:00
luaijun
6e58f49724 ci(c2/c3): add major eco version tests 2025-03-17 14:51:25 +08:00
Roland Dobai
cd1c5aa075 Merge branch 'feat/deactivate_idf_env_every_run' into 'master'
feat(tools): Deactivate current ESP-IDF environment with every export run

Closes IDF-11251

See merge request espressif/esp-idf!35857
2025-03-14 16:43:25 +08:00
Marius Vikhammer
e52ea52792 test(system): add system test-case for flash auto-suspend 2025-03-14 15:01:10 +08:00
Marek Fiala
1469ee767f feat(tools): Remove PATH duplicity from first call of tools/activate.py 2025-03-13 14:44:52 +01:00
Marek Fiala
5e7e9dd667 feat(tools): Deactivate current ESP-IDF environment with every export run
Unix systems only
2025-03-13 14:44:52 +01:00
Marek Fiala
a09fdf2f3e feat(tools): Safer clearing IDF_PYTHON_ENV_PATH if existing 2025-03-13 17:14:01 +08:00
Tomas Rohlinek
7d365f7b42 Merge branch 'fix/fatfsgen_tests' into 'master'
fix(storage/fatfsgen): increase test timeout

Closes IDFCI-2681

See merge request espressif/esp-idf!37702
2025-03-13 16:30:31 +08:00
Chen Ji Chang
1a87428934 Merge branch 'feat/h4_introduce_step7_ci' into 'master'
feat(esp32h4): ci enable public header check (stage7)

See merge request espressif/esp-idf!37505
2025-03-13 11:52:05 +08:00