Commit Graph

382 Commits

Author SHA1 Message Date
Peter Dragun
24a8797409 change: Fix linting errors in serial_ext.py 2025-07-03 16:15:24 +02:00
Peter Dragun
b184766aa4 feat(tools/efuse): Make port mandatory for eFuse commands
BREAKING CHANGE:

Autodetection was removed from idf.py efuse* commands to prevent accidental use of the wrong port.
2025-07-03 16:15:22 +02:00
Song Ruo Jing
a45b684b81 remove(legacy_sdm): remove legacy sdm driver in IDF v6.0 2025-07-02 15:36:29 +08:00
Tomas Rezucha
65ac3f6f80 refactor(usb): Remove deprecated USB pin definitions
When connecting USB OTG to an external FSLS PHY,
the FSLS Serial Interface signals can be routed to any GPIO via the GPIO
matrix. Thus, these macros are meaningless.
2025-06-25 14:44:36 +02:00
Chen Jichang
a2ef01fc5b remove(legacy_mcpwm): remove legacy mcpwm driver in IDF v6.0 2025-06-24 10:49:37 +08:00
Roland Dobai
16e8efa344 Merge branch 'feat/diag_port' into 'master'
feat(diag): pass serial port to esp-idf-diag

See merge request espressif/esp-idf!39813
2025-06-20 15:44:14 +02:00
armando
6abac38b9c refactor(adc): removed the legacy adc driver and legacy adc calibration calibration driver 2025-06-18 14:35:41 +08:00
Alexey Lapshin
a319aa902c Merge branch 'feature/change-orphan-handling-behavior-to-error' into 'master'
feat(build): change orphan-handling behavior to error

Closes IDF-9792 and DOC-11408

See merge request espressif/esp-idf!39566
2025-06-15 17:41:10 +04:00
laokaiyao
bf3a050f4d remove(legacy_dac): remove legacy dac driver in IDF v6.0 2025-06-12 16:53:47 +08:00
Roland Dobai
1b7cb43842 Merge branch 'fix/create_project_read_only' into 'master'
fix(tools): idf.py create-project works in read-only ESP-IDF

Closes IDFGH-15364 and IDFGH-15305

See merge request espressif/esp-idf!39751
2025-06-12 10:50:29 +02:00
morris
fb4b590941 refactor(dma)!: remove deprecated functions 2025-06-12 12:24:58 +08:00
Frantisek Hrbata
ef9e76236d fix(diag): ruff-format fixes from pre-commit
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-11 16:55:13 +02:00
Frantisek Hrbata
b2da8aae45 feat(diag): pass serial port to esp-idf-diag
If a port is specified for the idf.py command, pass it to esp-idf-diag.
This ensures that the esptools used for gathering target information
connect to the explicitly specified port rather than relying on
autodetection.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-11 16:52:18 +02:00
Chen Jichang
d345ac1a50 remove(legacy_pcnt): remove legacy pcnt driver in IDF v6.0 2025-06-11 16:54:41 +08:00
Marek Fiala
b3f24a9533 fix(tools): idf.py create-project works in read-only ESP-IDF
As the native copy function shutil.copyfile preserves directories metadata
such as file permissions, we need to ensure the copied destination
is writable for owner.

Closes https://github.com/espressif/esp-idf/issues/15964
Closes https://github.com/espressif/esp-idf/pull/16021
2025-06-10 14:48:08 +02:00
Marek Fiala
5ec67f5e2c feat(tools): adjusted create_ext.py by ruff formatter 2025-06-10 14:48:08 +02:00
Alexey Lapshin
555c511d28 feat(build): change orphan-handling behavior to error 2025-06-10 14:44:01 +08:00
laokaiyao
6eb5bfe587 remove(legacy_i2s): remove legacy i2s driver in IDF v6.0 2025-06-10 12:23:23 +08:00
morris
3b504812df Merge branch 'refactor/remove_legacy_timer_driver' into 'master'
!Remove legacy timer group driver

Closes IDF-13169

See merge request espressif/esp-idf!39346
2025-06-09 10:56:06 +08:00
morris
a04df4631e refactor(gptimer)!: removed the legacy driver
also provide idy.py hints instructions
2025-06-06 15:11:26 +08:00
Roland Dobai
3efb46e480 remove(tools): Drop official support for gdbgui 2025-06-06 14:32:05 +08:00
Roland Dobai
532ea1ad6d change(tools): fix the style of debug_ext.py 2025-06-06 14:32:05 +08:00
Marius Vikhammer
09f077969c Revert "feat(tools): add esp32c3 rev1.1 rom version string"
This reverts commit fb2565815e.
2025-05-28 08:38:03 +02:00
Erhan Kurubas
fb2565815e feat(tools): add esp32c3 rev1.1 rom version string 2025-05-27 04:48:18 +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
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