Skip to content

Commit b184766

Browse files
committed
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.
1 parent 4bdd6b6 commit b184766

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/en/migration-guides/release-6.x/6.0/tools.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ On Linux or MacOS, you can use Python 3.11 or 3.12 and gdbgui version 0.15.2.0.
2323
Please be aware that these recommendations may change over time and for an up-to-date list of issues refer to `the official issue tracker <https://github.com/cs01/gdbgui/issues>`_.
2424

2525
We recommend to use ``idf.py gdb`` instead of ``idf.py gdbgui``, or debug in Eclipse/Vscode if you encounter an issue with the installation.
26+
27+
``idf.py efuse*`` Commands Require Port
28+
---------------------------------------
29+
30+
All commands with eFuse functionality now require a serial port to be specified. This was done to prevent accidental use of the wrong port, as these operations are irreversible.
31+
32+
For all ``idf.py efuse*`` commands, you now need to specify the serial port with the ``--port`` argument (or ``ESPPORT`` environment variable). If the port is not specified, the command will fail with an error message.

tools/idf_py_actions/serial_ext.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,10 @@ def _parse_efuse_args(ctx: click.core.Context, args: PropertyDict, extra_args: D
515515
if args.port:
516516
efuse_args += ['-p', args.port]
517517
elif not args.port and not extra_args['virt']: # if --virt, no port will be found and it would cause error
518-
efuse_args += ['-p', get_default_serial_port()]
518+
raise FatalError(
519+
'Error: Port is required for espefuse. '
520+
'Please specify the port with the --port argument.'
521+
)
519522
efuse_args += ['--chip', _get_project_desc(ctx, args)['target']]
520523
if extra_args['virt']:
521524
efuse_args += ['--virt']
@@ -712,7 +715,7 @@ def efuse_write_protect(action: str, ctx: click.core.Context, args: PropertyDict
712715
},
713716
{
714717
'names': ['--flash-crypt-conf'],
715-
'help': ('Override FLASH_CRYPT_CONF efuse value (default is 0XF).'),
718+
'help': ('Override FLASH_CRYPT_CONF eFuse value (default is 0XF).'),
716719
},
717720
],
718721
'arguments': [

0 commit comments

Comments
 (0)