From 7bb54e8d32f0448ee7d73f0375103499b8f1bce1 Mon Sep 17 00:00:00 2001 From: David Montero Crespo Date: Tue, 28 Jul 2026 14:13:03 +0200 Subject: [PATCH] =?UTF-8?q?fix(toolbar):=20Run=20on=20QEMU-Linux=20boards?= =?UTF-8?q?=20boots=20directly=20=E2=80=94=20no=20bogus=20firmware=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QEMU branch of handleRun required compiledProgram, but Pi-family boards never have one (handleCompile early-returns 'no compilation needed' without producing firmware), so the toolbar Run always surfaced 'Compilation produced no firmware' instead of powering the board on. Start them directly, same as the workspace Start button. --- frontend/src/components/editor/EditorToolbar.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend/src/components/editor/EditorToolbar.tsx b/frontend/src/components/editor/EditorToolbar.tsx index 759c38cb..d1d6a11a 100644 --- a/frontend/src/components/editor/EditorToolbar.tsx +++ b/frontend/src/components/editor/EditorToolbar.tsx @@ -827,6 +827,19 @@ export const EditorToolbar = ({ stopBoard(activeBoardId); await new Promise((resolve) => setTimeout(resolve, 300)); } + // QEMU-Linux boards (Raspberry Pi family + overlay piFamily kinds) + // boot straight from the rootfs — there is no firmware to compile, + // and handleCompile's Pi early-return never sets compiledProgram, so + // the gate below would surface a bogus "Compilation produced no + // firmware" error. Power the board on directly instead. + if (isPiBoardKind(board?.boardKind ?? '')) { + trackRunSimulation(board?.boardKind); + reportRun(board?.boardKind); + console.log('[handleRun] → startBoard (QEMU-Linux, no firmware)', activeBoardId); + startBoard(activeBoardId); + setMessage(null); + return; + } if (!board?.compiledProgram || codeChangedSinceLastCompile) { console.log('[handleRun] auto-compile + run'); autoRunAfterCompile.current = true;