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.
This commit is contained in:
Peter Dragun
2025-07-02 13:05:19 +02:00
parent 4bdd6b6f7b
commit b184766aa4
2 changed files with 12 additions and 2 deletions

View File

@@ -515,7 +515,10 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
if args.port:
efuse_args += ['-p', args.port]
elif not args.port and not extra_args['virt']: # if --virt, no port will be found and it would cause error
efuse_args += ['-p', get_default_serial_port()]
raise FatalError(
'Error: Port is required for espefuse. '
'Please specify the port with the --port argument.'
)
efuse_args += ['--chip', _get_project_desc(ctx, args)['target']]
if extra_args['virt']:
efuse_args += ['--virt']
@@ -712,7 +715,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
},
{
'names': ['--flash-crypt-conf'],
'help': ('Override FLASH_CRYPT_CONF efuse value (default is 0XF).'),
'help': ('Override FLASH_CRYPT_CONF eFuse value (default is 0XF).'),
},
],
'arguments': [