356 Commits

Author SHA1 Message Date
Wan Lei
c7a0e45489 Merge branch 'feat/spi_master_dynamic_freq' into 'master'
feat(spi_master): add transaction config for device multi freq point

Closes IDFGH-12774

See merge request espressif/esp-idf!28579
2025-02-13 15:58:59 +08:00
wanckl
39c85269cc feat(spi_master): add transaction config for dynamic clock speed update
Closes https://github.com/espressif/esp-idf/issues/13753
2025-02-12 20:29:34 +08:00
Roland Dobai
bbdf1e4a2a Merge branch 'feat/use_diag_module' into 'master'
feat(diag): use the esp-idf-diag module as a backend

See merge request espressif/esp-idf!36872
2025-02-12 18:39:53 +08:00
Frantisek Hrbata
bdc94935fa feat(diag): use the esp-idf-diag module as a backend
Replace the original diag implementation in idf.py with the new one in a
separate esp-idf-diag python package. The interface is kept the same as
it was. The simple idf.py diag test is also preserved.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-02-11 11:26:47 +01:00
Chen Jichang
6f83f39dce feat(esp32h4): introduce target esp32h4(stage 1) 2025-02-08 17:07:44 +08:00
Roland Dobai
57b2ef83ea Merge branch 'feat/diag_cpuinfo' into 'master'
feat(tools): add basic system information to diag report

Closes IDF-12100

See merge request espressif/esp-idf!36627
2025-01-29 17:46:07 +08:00
Frantisek Hrbata
7216d11110 feat(tools): enable passing the purge file as an argument to diag
At present, the diag tool uses its default purge file. However, users
may find it beneficial to specify and reuse their own purge file. A new
command line option, --purge, has been introduced to allow users to
provide their own purge file to diag. When this option is used, the
default purge file is ignored.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-01-28 09:19:36 +01:00
Frantisek Hrbata
350dbaf73c feat(tools): add system.yml recipe to diag
This should enable the collection of more detailed information about the
operating system and basic CPU details.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-01-27 13:34:33 +01:00
Frantisek Hrbata
f7b754acfa feat(tools): add option to execute steps only on a specific system
At present, the steps are executed unconditionally. With this
modification, we can restrict each step individually to determine if it
should run on a particular system. For instance, we can execute
different commands on different systems. This is achieved by adding a
new key, "system," to the step dictionary, with possible values being
Linux, Windows, and Darwin.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-01-27 13:34:19 +01:00
Frantisek Hrbata
88c099d756 fix(tools): allow to save stdout and stderr if the exec command fails
Currently, if a command run by the exec command returns an error
code, its stdout and stderr are not saved. It could be beneficial to
store at least the stderr if requested. Additionally, avoid creating
output files when there is no content and also store the stderr
of the failed command to diag.log.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-01-24 14:41:07 +01:00
Roland Dobai
c640466e32 docs(coredump): Add minor documentation improvements for coredump 2025-01-22 13:44:56 +01:00
Roland Dobai
16ba8b7e4a Merge branch 'feature/add_utf_8_decoding' into 'master'
feat(tools): Enforced utf-8 encoding with Python open() functions

Closes IDF-10654

See merge request espressif/esp-idf!32303
2024-12-30 16:07:29 +08:00
Frantisek Hrbata
949f6cb9f7 feat(tools): add idf.py diag reporting tool
The initial implementation of a diagnostic tool that collects valuable
information about esp-idf and failed build to assist in investigating
reported issues.

The gathered information includes environmental variables, details about
the python virtual environment, installed tools, platform information,
project_description.json, sdkconfig, build logs, map file, linker
scripts, and others.

usage:

1) create the default report

   # allow diag to create the report directory name
   $ idf.py diag
   # explicitly specify the report directory
   $ idf.py diag --output <report directory>

2) examine the contents of the generated <report directory> for
   sensitive information and add additional content to the
   <report directory>

3) create report archive zip file that can be shared or attached to
   the reported issue

   $ idf.py diag --zip <report directory>

The tool collects information as described in what are known as recipe
files. A recipe file is a YAML file, similar to an Ansible playbook or a
GitHub action, but much more simplified. Each recipe outlines how to
gather a set of related information. For instance, the manager.yml
recipe gathers data related to the component manager. Each recipe
includes metadata such as its description, tags, and steps. Tags are
used to determine which recipes to use; by default, all built-in recipes
located in tools/idf_py_actions/diag/recipes are used. Steps consist of
a list of commands to be executed. Currently, there are four commands:
file, exec, env, and glob. For more detailed information about recipes,
their format, and commands, please refer to
tools/idf_py_actions/diag/recipes/README.md.

Recipe example for component manager:

description: IDF Component Manager information
tags: [manager, base, project]
output: manager
steps:
  - name: 'IDF Component Manager'
    cmds:
      - exec:
        cmd: 'python -m idf_component_manager version'
        output: manager.ver
      - file:
        path: '${PROJECT_DIR}/dependencies.lock'
      - glob:
        # Gather all idf_component.yml files from the project directory and
        # save them in directories relative to the project directory within
        # the idf_component directory.
        pattern: 'idf_component.yml'
        recursive: true
        relative: true
        path: '${PROJECT_DIR}'
        output: 'idf_component/'

Create report for manager

1) all recipes with manager tag

   $ idf.py diag --tag manager

2) use only the manager recipe explicitly; built-in recipes can be
   referenced simply by their name, but all recipes can be referenced
   by their path

   $ idf.py diag --recipe manager
   or
   $ idf.py diag --recipe <full path>

To display available recipes, use

   $ idf.py diag --list

and to verify recipes, use

   $ idf.py diag --check

Both --list and --check honers the --tag and --recipe options.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-12-27 12:08:59 +01:00
Frantisek Hrbata
642855c952 feat(tools): add command arguments in the logs produced by RunTool
Currrently, all logs generated by RunTool are stored in files named
idf_py_(stdout|stderr)_output_$$, making it difficult to identify which
log corresponds to which command. To simplify this for idf-diag, include
the command arguments at the beginning of the log. This will allow
idf-diag to use regex to differentiate logs for build, monitor, flash,
and other commands and targets.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-12-27 12:02:23 +01:00
Marek Fiala
2c814ef2fa feat(tools): Enforce utf-8 encoding with open() function 2024-12-27 17:12:21 +08:00
Roland Dobai
5603258961 Merge branch 'fix/missing_header_hint' into 'master'
fix(hints): improve suggestion for missing header file

Closes IDF-11895

See merge request espressif/esp-idf!35728
2024-12-20 19:39:54 +08:00
Roland Dobai
757d74abae Merge branch 'fix/failing_create_readonly_test_on_win' into 'master'
fix(tools): fixed failing Win CI (tests read_only, cli)

Closes IDF-11782

See merge request espressif/esp-idf!35549
2024-12-19 21:41:50 +08:00
David Čermák
7e2464720e Merge branch 'feat/lwip_extern_decl_sockutls' into 'master'
feat(lwip): Declare additional POSIX API if available

Closes IDFGH-14028 and IDFGH-12794

See merge request espressif/esp-idf!35683
2024-12-19 18:14:17 +08:00
David Cermak
d66b6e2749 feat(hints): Add hints on using external sock utilities 2024-12-17 11:18:46 +01:00
Frantisek Hrbata
0c2843a071 fix(hints): improve suggestion for missing header file
Currently, we are only suggesting that the header file is likely not
part of the component's INCLUDE_DIRS. However, the header file may be
missing also because of the configuration settings. For instance, the
component might be disabled in sdkconfig, or the feature that supplies
the header might not be enabled. Enhance the hint message to address
this scenario as well.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-12-17 10:56:26 +01:00
Marek Fiala
0b78083595 fix(tools): fixed test_create_project_with_idf_readonly on Win 2024-12-16 14:55:15 +01:00
Tomas Rezucha
bf86ab3926 feat(dfu): Enable DFU on ESP32-P4 2024-12-11 09:23:32 +01:00
Roland Dobai
bfe065003d Merge branch 'fix/monitor_no_elf' into 'master'
fix(tools): fix running monitor without elf file

Closes IDF-11821

See merge request espressif/esp-idf!35479
2024-12-09 21:40:53 +08:00
Alexey Lapshin
e0bb3a25e4 fix(tools): fix idf.py gdb execution in case app was not built 2024-12-06 19:15:56 +07:00
Peter Dragun
54d3c090be fix(tools): fix running monitor without elf file 2024-12-06 09:48:48 +01:00
Frantisek Hrbata
496e9cdff8 fix(hints): handle multiple missing headers in the output
The object files are compiled simultaneously, which can result in
several error messages about missing headers. The current regex used to
find missing headers in the compiler's output employs a greedy search,
potentially capturing multiple error messages from different compilation
units. This can cause bug reports where the original component cannot be
identified. Strengthen the regex to ensure it only processes the first
reported error.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-20 18:41:55 +08:00
Alexey Lapshin
2a6e08431b Merge branch 'feature/move-gdb-options-to_project_description_json' into 'master'
feat(debugging): move gdbinit generation to CMake

Closes IDF-11489

See merge request espressif/esp-idf!34779
2024-11-20 14:30:40 +08:00
Alexey Lapshin
48a49c8154 feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

allow to pass custom options to "idf.py gdb":

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
2024-11-19 16:41:38 +07:00
Peter Dragun
6495a8318d Merge branch 'monitor_multi_elf' into 'master'
feat(monitor): Add support for decoding output based on multiple ELF files

Closes IDF-11026

See merge request espressif/esp-idf!34858
2024-11-19 17:18:35 +08:00
Tomas Rezucha
66596b7f59 feat(hints/usb): Add a hint about too small control transfer size 2024-11-18 21:03:30 +08:00
Peter Dragun
28dcb9a889 feat(monitor): Add support for decoding output based on multiple ELF files 2024-11-18 12:35:45 +01:00
gaoxu
64bbb53b8f feat(esp32h21): introduce target esp32h21(stage 1) 2024-11-12 15:42:27 +08:00
Aditya Patwardhan
6930dff98d Merge branch 'feature/add_option_to_provide_flash_file_for_qemu' into 'master'
feat(tools): Added option to specify flash image in "idf.py qemu"

See merge request espressif/esp-idf!34031
2024-10-24 02:22:43 +08:00
Roland Dobai
4460d9fb1b fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 14:22:18 +02:00
Aditya Patwardhan
a58a07ecfe feat(tools): Added option to specify flash image in "idf.py qemu" 2024-10-21 18:48:02 +08:00
Marius Vikhammer
8e511ffb4e fix(hints): added missing seperator between hints 2024-10-17 17:04:55 +08:00
Marius Vikhammer
bb8fa9300f Merge branch 'change/rename_va_narg' into 'master'
fix(system): rename __VA_NARG__ macro

Closes IDF-11367

See merge request espressif/esp-idf!34068
2024-10-17 08:57:44 +08:00
Marius Vikhammer
64e0fc7a5a fix(system): rename __VA_NARG__ macro
__VA_NARG__ is copied from a forum post and is a pretty common implementation
with a high chance of causing naming collision

Added ESP_ namespace to avoid this.
2024-10-15 09:41:00 +08:00
Roland Dobai
0a354e09ef Tools: Add new ROM binary release including for ESP32-C5 2024-10-14 14:32:35 +08:00
Martin Vychodil
f659405ee0 Merge branch 'feat/monitor_auto_color' into 'master'
feat(tools): Add auto color to monitor and disable colors from chip logs

Closes IDF-362 and DOC-9110

See merge request espressif/esp-idf!33623
2024-10-11 01:04:26 +08:00
Alexey Lapshin
9d32a31657 feat(tools): add binary size exceeded hint 2024-10-07 19:00:04 +07:00
Peter Dragun
2c458f3af1 feat(tools): Add auto color to monitor and disable colors from chip logs
ANSI color codes are handled on the host side instead of the chip side. This
will result in shorter log messages transmitted over serial.
2024-10-01 11:46:20 +02:00
Radim Karniš
4a04a9e95c feat(idf_py): Allow tracing interactions during flashing with --trace 2024-09-26 11:27:04 +02:00
Konstantin Kondrashov
dcd433e62c Merge branch 'bugfix/werror_hint' into 'master'
fix(tools): Fix a regular expression in hints.yml for Werror=

See merge request espressif/esp-idf!33625
2024-09-19 01:30:27 +08:00
Konstantin Kondrashov
d1a00f5808 fix(tools): Fix a regular expression in hints.yml for Werror= 2024-09-18 16:33:47 +03:00
Alexey Gerenkov
5c43055e3e Merge branch 'esp32c61_jtag_doc_update' into 'master'
docs(jtag): update esp32c61 jtag debugging guide

Closes IDF-10168

See merge request espressif/esp-idf!33546
2024-09-18 19:36:23 +08:00
Erhan Kurubas
6ade64eb05 docs(jtag): update esp32c61 jtag debugging guide 2024-09-18 10:44:41 +03:00
Marek Fiala
6ec1e9107f feat(tools): Move sample_project from examples to tools
Extended example readme.md by further development options.
2024-09-16 09:12:50 +02:00
Alexey Lapshin
c605620073 Merge branch 'fix/keep-got-sections-for-riscv' into 'master'
feat(esp_system): drop .got* sections and add hint

See merge request espressif/esp-idf!32969
2024-09-06 19:21:06 +08:00
Roland Dobai
17fed13a27 Merge branch 'distutils' into 'master'
fix(tools): remove distutils to support python 3.12

Closes IDFGH-13510

See merge request espressif/esp-idf!33260
2024-09-06 14:23:04 +08:00