From 9fe57005c3014c0a2738dd947e763c346ad43f64 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Fri, 30 Jan 2026 11:40:54 -0700 Subject: [PATCH] Remove --no-stub from flash operations for faster transfers The ROM bootloader (--no-stub) runs at ~62 kbit/s which causes timeouts on large images. The stub flasher is dramatically faster and works correctly over QEMU socket connections. --- src/mcp_esptool_server/components/flash_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mcp_esptool_server/components/flash_manager.py b/src/mcp_esptool_server/components/flash_manager.py index 6f022de..df0620a 100644 --- a/src/mcp_esptool_server/components/flash_manager.py +++ b/src/mcp_esptool_server/components/flash_manager.py @@ -179,7 +179,7 @@ class FlashManager: start_time = time.time() - args = ["--no-stub", "write-flash", "0x0", str(fw_path)] + args = ["write-flash", "0x0", str(fw_path)] if not verify: args.insert(0, "--no-verify") @@ -250,7 +250,7 @@ class FlashManager: start_time = time.time() result = await self._run_esptool( port, - ["--no-stub", "read-flash", start_address, size, str(out)], + ["read-flash", start_address, size, str(out)], timeout=300.0, ) @@ -286,14 +286,14 @@ class FlashManager: # Erase specific region result = await self._run_esptool( port, - ["--no-stub", "erase-region", start_address, size], + ["erase-region", start_address, size], timeout=60.0, ) else: # Erase entire flash result = await self._run_esptool( port, - ["--no-stub", "erase-flash"], + ["erase-flash"], timeout=60.0, )