mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 21:54:33 +02:00
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>
This commit is contained in:
@@ -100,6 +100,13 @@ def diag(action: str,
|
||||
diag_args += ['--force']
|
||||
if purge_file:
|
||||
diag_args += ['--purge', purge_file]
|
||||
if args.port:
|
||||
diag_args += ['--port', args.port]
|
||||
else:
|
||||
yellow_print( ( 'The target serial port is not specified, so '
|
||||
'autodetection will be used. To set it manually, use '
|
||||
'the "--port" option. Example: "idf.py --port '
|
||||
'/dev/ttyUSB0 diag".'))
|
||||
|
||||
try:
|
||||
RunTool('idf_diag', diag_args, args.project_dir, hints=not args.no_hints)()
|
||||
|
Reference in New Issue
Block a user