From 64f4956d4f5784d6f07d5115aa5c50cb03f82803 Mon Sep 17 00:00:00 2001 From: Jaroslav Burian Date: Mon, 24 Feb 2025 14:09:38 +0100 Subject: [PATCH] fix(esptool): Fix flush output while flashing With the new esptool v5.0 the output is not flushed while flashing the firmware. This commit fixes the issue by using python unbuffered mode. --- components/esptool_py/esptool/esptool.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/esptool_py/esptool/esptool.py b/components/esptool_py/esptool/esptool.py index 828129e6d6..2cad600ed8 100644 --- a/components/esptool_py/esptool/esptool.py +++ b/components/esptool_py/esptool/esptool.py @@ -1,11 +1,10 @@ # -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD # # SPDX-License-Identifier: Apache-2.0 # - import subprocess import sys if __name__ == '__main__': - sys.exit(subprocess.run([sys.executable, '-m', 'esptool'] + sys.argv[1:]).returncode) + sys.exit(subprocess.run([sys.executable, '-u', '-m', 'esptool'] + sys.argv[1:]).returncode)