Commit Graph

4378 Commits

Author SHA1 Message Date
Roland Dobai
35c484324f Merge branch 'bugfix/debug_ext_ctrl_c_v5.0' into 'release/v5.0'
tools: fix waiting on gdb process when interrupted with CTRL+C (v5.0)

See merge request espressif/esp-idf!24934
2023-07-26 21:09:52 +08:00
Frantisek Hrbata
6f8c62b205 fix(debug_ext): CTRL+C handling while waiting on gdb process
idf.py spawns gdb process within a thread and uses Thread.join() to wait
for the gdb process to finish. As CTRL+C(SIGINT) is used by gdb to interrupt the
running program, we catch the SIGINT while waiting on the gdb to finish,
and try Thread.join() again.

With cpython's commit

	commit a22be4943c119fecf5433d999227ff78fc2e5741
	Author: Victor Stinner <vstinner@python.org>
	Date:   Mon Sep 27 14:20:31 2021 +0200

	    bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)

this logic doesn't work anymore, because cpython internally marks the
thread as stopped when join() is interrupted with an exception. IMHO
this is broken in cpython and there is a bug report about this
https://github.com/python/cpython/issues/90882. Problem is that
waiting on a thread to finish is based on acquiring a lock. Meaning
join() is waiting on _tstate_lock. If this wait is interrupted, the
above referenced commit adds a logic that checks if the lock is help,
meaning the thread is done and marks the thread as stopped. But there is
no way to tell if the lock was acquired by us running join() or if it's
held by someone else e.g. still by the thread bootstrap code. Meaning
the thread is still running.

I may be missing something, but I don't see any reason why to spawn gdb
process within a thread. This change removes the thread and spawns gdb
directly. Instead waiting on a thread, we wait on the process to finish,
replacing join() with wait() and avoiding this problem.

Closes https://github.com/espressif/esp-idf/issues/11871

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-07-20 17:12:32 +02:00
Chen Yudong
d1da86465b ci(esp_prov): remove import future usage 2023-07-20 16:00:21 +08:00
Jiang Jiang Jian
b0b3e0dc70 Merge branch 'bugfix/esp_netif_recieve_returns_v5.0' into 'release/v5.0'
esp_netif: Report error if esp_netif_receive() fails (v5.0)

See merge request espressif/esp-idf!24656
2023-07-17 10:28:06 +08:00
Peter Dragun
0055426b3f fix(tools/python_dep_check): replace deprecated pkg_resources with importlib
Closes https://github.com/espressif/esp-idf/issues/11712
2023-07-14 14:56:30 +02:00
Zim Kalinowski
ed93de6efa Merge branch 'bugfix/saving-esp-idf-env-as-utf8-v5.0' into 'release/v5.0'
build system: fix init.bat crash in windows when folder contains unicode characters (v5.0)

See merge request espressif/esp-idf!24669
2023-07-12 16:47:27 +08:00
Roland Dobai
7296cc6451 Merge branch 'asyncio_error_v5.0' into 'release/v5.0'
fix(tools/hints): add guide to fix error with unsupported asyncio (v5.0)

See merge request espressif/esp-idf!24702
2023-07-12 01:09:06 +08:00
Zim Kalinowski
36de1ba9c8 Merge branch 'bugfix/improve-git-describe-handling-v5.0' into 'release/v5.0'
build system: more accurate error information for git_describe (v5.0)

See merge request espressif/esp-idf!24668
2023-07-11 17:06:44 +08:00
Peter Dragun
002efdf88b fix(tools/hints): add guide to fix error with unsupported asyncio
Closes https://github.com/espressif/esp-idf/issues/11732
2023-07-11 10:55:06 +02:00
Roland Dobai
8fa72ec3b7 Merge branch 'monitor_multibyte_decode' into 'release/v5.0'
Tools(monitor): decode multibyte characters on Windows (backport v5.0)

See merge request espressif/esp-idf!24373
2023-07-11 16:40:40 +08:00
Roland Dobai
bd824a04d6 Merge branch 'fix/pyparsing_3.1.0_compatibility_v5.0' into 'release/v5.0'
fix: Compatibility with pyparsing>=3.1.0 (backport v5.0)

See merge request espressif/esp-idf!24370
2023-07-11 16:40:15 +08:00
Roland Dobai
8b01e23558 Merge branch 'fix/ci_coredump_test' into 'release/v5.0'
Tools: remove failing IDF Monitor host tests with coredump and fix print filter without ELF file specified

See merge request espressif/esp-idf!24272
2023-07-11 16:39:06 +08:00
Roland Dobai
f0f859f964 Merge branch 'feature/submodules_sbom_v5.0' into 'release/v5.0'
tools: add sbom information for submodules (v5.0)

See merge request espressif/esp-idf!24241
2023-07-11 16:38:18 +08:00
David Cermak
12d09e0b3b esp_netif: Make esp_netif_receive() return value configurable 2023-07-11 06:51:49 +02:00
Jiang Jiang Jian
afe026f318 Merge branch 'bugfix/increase_pm_dump_time_field_length_v5.0' into 'release/v5.0'
Power Management: increase pm_dump time field width (backport v5.0)

See merge request espressif/esp-idf!24449
2023-07-11 12:24:23 +08:00
Jiang Jiang Jian
e99b7835fa Merge branch 'bugfix/update_esp_rom_layout_v5.0' into 'release/v5.0'
esp_rom: fix rom layout issues (backport v5.0)

See merge request espressif/esp-idf!24640
2023-07-11 12:22:40 +08:00
Jiang Jiang Jian
c10505f939 Merge branch 'bugfix/fix_esp32s3_psram_access_failed_in_dfs_v5.0' into 'release/v5.0'
esp_pm: fix esp32s3 psram access failed when dfs is enabled (backport v5.0)

See merge request espressif/esp-idf!24199
2023-07-11 12:19:43 +08:00
Marius Vikhammer
e004907bd5 versions: Update version to 5.0.3 2023-07-10 17:23:26 +08:00
Zim Kalinowski
56994aeb0b build system: more accurate error information for git_describe
Closes https://github.com/espressif/esp-idf/issues/9071

See merge request espressif/esp-idf!23891
2023-07-10 11:36:04 +08:00
Zim Kalinowski
a205213cc8 build system: fix init.bat crash in windows when folder contains unicode characters 2023-07-10 11:34:56 +08:00
Jiang Guang Ming
ce1042a267 esp_rom: fix rom layout issues 2023-07-07 01:25:17 -07:00
wuzhenghui
3eae74e966 bugfix: increase pm_dump time field width
Closes https://github.com/espressif/esp-idf/issues/11704
2023-06-28 14:35:20 +08:00
Frantisek Hrbata
b947cab073 tools: add sbom information for submodules
This adds SBOM information for submodules, which are not managed
by Espressif. Meaning there is no fork for them in the espressif
namespace. Other submodules should add sbom.yml manifest file to
the root of their git repository.

The SBOM information for submodules is stored in the .gitmodules file.
Each SBOM related variable has the "sbom-" prefix and the following
variables may be used:

sbom-version:
   submodule version

sbom-cpe:
   CPE record if available in NVD. This will be used by the SBOM
   tool to check for possible submodule vulnerabilities. The
   version in the CPE can be replaced with the "{}" placeholder,
   which will be replaced by the "sbom-version" value from above.

sbom-supplier:
   Person or organization who is providing the submodule.
   It has to start with "Person:" or "Organization:" prefix
   as required by the SPDX-2.2 standard.

sbom-url:
   URL to the project if exists, e.g. github.

sbom-description:
   Project description.

sbom-hash:
   Submodule SHA as recorded in the git-tree. This field is used by
   CI to check that the submodule checkout hash and info in .gitmodules
   are in sync. IOW if submodule is updated and it has SBOM info in
   .gitmodules, the .gitmodules has to be updated too. The test is
   part of this commit. The checkout has of the submodule can be found
   by using "git submodule status".

Example for micro-ecc submodule
---8<---
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
	path = components/bootloader/subproject/components/micro-ecc/micro-ecc
	url = ../../kmackay/micro-ecc.git
	sbom-version = 1.0
	sbom-cpe = cpe:2.3🅰️micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
	sbom-supplier = Person: Ken MacKay
	sbom-url = https://github.com/kmackay/micro-ecc
	sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
	sbom-hash = d037ec89546fad14b5c4d5456c2e23a71e554966
---8<---

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-27 10:05:29 +02:00
Peter Dragun
57e188c2e3 fix(monitor/ansi_converter): decode multibyte characters 2023-06-23 09:32:13 +02:00
radim.karnis
7b98762ff5 fix: Compatibility with pyparsing>=3.1.0 2023-06-22 11:29:14 +02:00
Fu Hanxi
4ff607e9a8 ci: ignore pkg_resources deprecation warning 2023-06-21 07:30:25 +08:00
Roland Dobai
169d7dc3c9 tools: Fix IDF Monitor print filter when no ELF file is supplemented
A different serial handler class is used when there was no ELF file
passed do esp-idf-monitor. This fix will ensure that print filter check
is respected in this case as well.
2023-06-19 16:56:20 +02:00
Roland Dobai
6212ce9d94 tools: Remove ELF-file-based IDF Monitor tests 2023-06-19 16:56:20 +02:00
wuzhenghui
d202fc5993 ci: sync master flash_psram test and add access psram with DFS unity test 2023-06-15 14:14:25 +08:00
Anton Maklakov
70998e211a tools: add ULP toolchain for linux-i686 platform
Closes https://github.com/espressif/esp-idf/issues/11561
2023-06-13 12:50:21 +07:00
Marek Fiala
5a7eae4743 Tools bugfix: Removed working directory when using idf.py
Added check for existence of current working directory when using idf.py

Closes https://github.com/espressif/esp-idf/issues/11476
2023-06-09 14:28:11 +02:00
Frantisek Hrbata
9156bbb55c tools: extend information in project_description.json
This extends information provided in the project_description.json file.
Newly added information can be used in the SBOM generating tool and
also to improve hints regarding the the component dependency issues.

Added fields

version:
   This adds versioning to the project_description.json file,
   so it's easy to identify if it contains the required information.

project_version:
   Can be used as a version for the resulting binary e.g. `hello_world.bin`.

idf_path:
   This one is probably not necessary, but it allows tools to run even without
   esp-idf environment exported(e.g. export.sh).

c_compiler:
   The `CMAKE_C_COMPILER` value with full path to the compiler binary. This can
   be used to get information about toolchain, which was used to build the project.

common_component_reqs:
   List of common components as presented in cmake's __COMPONENT_REQUIRES_COMMON
   and set in tools/cmake/build.cmake:__build_init().

build_component_info:
   Detailed information about components used during build. It's a
   dictionary with the component name as a key and each component has
   a dictionary with detailed information. Following is an example for
   the efuse component.

   "efuse": {
       "alias": "idf::efuse",
       "target": "___idf_efuse",
       "prefix": "idf",
       "dir": "/home/fhrbata/work/esp-idf/components/efuse",
       "type": "LIBRARY",
       "lib": "__idf_efuse",
       "reqs": [],
       "priv_reqs": [ "bootloader_support", "soc", "spi_flash" ],
       "managed_reqs": [],
       "managed_priv_reqs": [],
       "file": "/home/fhrbata/work/blink/build/esp-idf/efuse/libefuse.a",
       "sources": [ "/home/fhrbata/work/esp-idf/components/efuse/esp32s3/esp_efuse_table.c", ... ],
       "include_dirs": [ "include", "esp32s3/include" ]
   }

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:30:07 +02:00
Frantisek Hrbata
30735b33ef tools: fix make_json_list to return empty json list for empty cmake list
Currently make_json_list() returns '[ "" ]' for empty cmake list. Fix this
so empty json list is returned instead.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:30:07 +02:00
Marius Vikhammer
e77e6eb963 Merge branch 'bugfix/use_safe_noreturn_attr_v5.0' into 'release/v5.0'
compiler: replaced noreturn by __noreturn__ in header files (v5.0)

See merge request espressif/esp-idf!23812
2023-06-01 10:17:58 +08:00
Jakob Hasse
fa099f23f3 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-30 13:21:17 +08:00
Roland Dobai
9054ff398f Merge branch 'fix/idf_tools_certificate_v5.0' into 'release/v5.0'
Tools: Update the certificate of idf_tools.py (v5.0)

See merge request espressif/esp-idf!23929
2023-05-29 14:25:12 +08:00
Roland Dobai
d3885faa43 Tools: Update the certificate of idf_tools.py 2023-05-25 16:30:08 +02:00
Alexey Lapshin
e84e884d66 tools: fix control characters print if hints enabled
Closes https://github.com/espressif/esp-idf/issues/11351
2023-05-23 18:30:35 +08:00
Roland Dobai
128435993e Merge branch 'bug/interactive_hints_v5.0' into 'release/v5.0'
tools: fix hints processing in interactive mode (v5.0)

See merge request espressif/esp-idf!23804
2023-05-19 15:45:04 +08:00
David Čermák
ab3499ab82 Merge branch 'bugfix/dm9051_rcv_mcast_v5.0' into 'release/v5.0'
esp_eth: allowed DM9051 to receive multicast packets v5.0

See merge request espressif/esp-idf!22864
2023-05-18 18:31:42 +08:00
Frantisek Hrbata
8e811c1bf2 tools: fix hints processing in interactive mode
Currently hints are processed only once the process is finished and
exits with non-error exit code. In interactive mode, e.g. for monitor,
we want to process ouput lines for hints right away.

This adds a simple buffer, which keeps the last line and once EOL is
reached, it is processed for hints.

Since the original hints processing was file based, a new helper
function was added to allow processing hints in string.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-17 13:27:13 +02:00
Frantisek Hrbata
8eda836de6 tools: don't print hints directly in print_hints
This is partial backport of following commit, which changes
print_hints to generate_hints.

	commit 92ef2a4c83
	Author: simon.chupin <simon.chupin@espressif.com>
	Date:   Tue Aug 9 15:39:23 2022 +0200

	    Tools: Add unit tests for idf.py hints

Only hunks for core_ext.py and tools.py are picked. It would be possible
to use the original print_hints approach, where the hints are directly
printed out and not returned, but it seems to make sense to keep it
closer to most recent version. It should make further backports easier
and it allows to cherry pick the iterative hints approach.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-17 13:26:46 +02:00
Roland Dobai
b08267f3b1 Merge branch 'monitor_win_color-v5.0' into 'release/v5.0'
bug(idf_monitor): fix color on windows with hints (v5.0)

See merge request espressif/esp-idf!23348
2023-05-17 18:39:32 +08:00
Alexey Lapshin
e092b58696 coredump: remove tests (moved to esp-coredump repo) 2023-05-16 12:49:13 +08:00
Zim Kalinowski
0b8800eaae Merge branch 'contrib/github_pr_10895_v5.0' into 'release/v5.0'
Fix possible conversion errors by using __builtin_ffsll (GitHub PR) (v5.0)

See merge request espressif/esp-idf!23691
2023-05-15 18:43:35 +08:00
Jakob Hasse
5946c6ad16 cxx/esp_hw_support: added build test, changed parameter types
Changed rv_utils_intr_edge_ack and esp_cpu_intr_edge_ack to
take uint32_t instead of int to avoid build errors.

The test is to test in particular that __builtin_ffsll, used in
xt_utils.h, which is included via esp_cpu.h, compiles fine
in C++20 with -Wsign-conversion enabled.

Closes https://github.com/espressif/esp-idf/pull/10895
2023-05-15 10:03:12 +08:00
KonstantinKondrashov
0b697ee9cd test_apps: Test multicore app can be run by unicore bootloader 2023-05-11 05:55:32 +00:00
Marius Vikhammer
b7ad0e0ad1 Merge branch 'bugfix/make_clean_files_v5.0' into 'release/v5.0'
build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES (v5.0)

See merge request espressif/esp-idf!23662
2023-05-11 10:39:58 +08:00
Roland Dobai
cd56601138 Merge branch 'esptool_extrav5.0' into 'release/v5.0'
feat(esptool): allow to set force for write_flash (v5.0)

See merge request espressif/esp-idf!23256
2023-05-11 00:37:14 +08:00
Roland Dobai
9c3a44b76e Merge branch 'monitor/new_kernel-5.0' into 'release/v5.0'
bug(monitor/console_reader): replace TIOCSTI with busy wait to suppport kernel > 6.2 (5.0)

See merge request espressif/esp-idf!23351
2023-05-11 00:36:55 +08:00