Skip to content

Commit 4c53f42

Browse files
committed
fix: Execute esptool scripts in interactive mode
The new version of esptool has a quite interactive output that supports folding steps and overriding progress bar. Using interactive mode to run esptool scripts will make the output propagate to the terminal immediately.
1 parent 9eb07f9 commit 4c53f42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/idf_py_actions/serial_ext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ def flash(
238238
'SERIAL_TOOL_EXTRA_PRE_CMD_ARGS': ';'.join(extra_pre),
239239
'SERIAL_TOOL_EXTRA_ARGS': ';'.join(extra_post),
240240
}
241-
run_target(action, args, env, force_progression=True)
241+
run_target(action, args, env, force_progression=True, interactive=True)
242242

243243
def erase_flash(action: str, ctx: click.core.Context, args: PropertyDict) -> None:
244244
ensure_build_directory(args, ctx.info_name)
245245
esptool_args = _get_esptool_args(args)
246246
esptool_args += ['erase-flash']
247-
RunTool('esptool', esptool_args, args.build_dir, hints=not args.no_hints)()
247+
RunTool('esptool', esptool_args, args.build_dir, hints=not args.no_hints, interactive=True)()
248248

249249
def global_callback(ctx: click.core.Context, global_args: dict, tasks: PropertyDict) -> None:
250250
encryption = any([task.name in ('encrypted-flash', 'encrypted-app-flash') for task in tasks])
@@ -263,7 +263,7 @@ def ota_targets(target_name: str, ctx: click.core.Context, args: PropertyDict) -
263263
"""
264264
args.port = args.port or get_default_serial_port()
265265
ensure_build_directory(args, ctx.info_name)
266-
run_target(target_name, args, {'ESPBAUD': str(args.baud), 'ESPPORT': args.port})
266+
run_target(target_name, args, {'ESPBAUD': str(args.baud), 'ESPPORT': args.port}, interactive=True)
267267

268268
def merge_bin(
269269
action: str,

0 commit comments

Comments
 (0)