diff --git a/frontend/src/components/simulator/FlashModal.tsx b/frontend/src/components/simulator/FlashModal.tsx
index 4fa14108..29fc882c 100644
--- a/frontend/src/components/simulator/FlashModal.tsx
+++ b/frontend/src/components/simulator/FlashModal.tsx
@@ -404,7 +404,10 @@ interface WebReadyProps {
}
const WebReadyView = ({ board, onFlash }: WebReadyProps) => {
- const hasCompiled = !!board.compiledProgram;
+ // MicroPython boards carry the 'micropython-loaded' sentinel instead of
+ // a flash image — nothing to write. Arduino/ESP-IDF sketches only.
+ const isMpy = board.languageMode === 'micropython';
+ const hasCompiled = !!board.compiledProgram && !isMpy;
return (
@@ -418,7 +421,14 @@ const WebReadyView = ({ board, onFlash }: WebReadyProps) => {
- {!hasCompiled && (
+ {isMpy && (
+
+ MicroPython projects cannot be flashed to a real board yet — only
+ compiled Arduino/ESP-IDF sketches.
+
+ )}
+
+ {!board.compiledProgram && !isMpy && (
No compiled program for this board yet. Click Compile in the toolbar first.
diff --git a/frontend/src/components/simulator/SimulatorCanvas.tsx b/frontend/src/components/simulator/SimulatorCanvas.tsx
index 975aab43..98444c93 100644
--- a/frontend/src/components/simulator/SimulatorCanvas.tsx
+++ b/frontend/src/components/simulator/SimulatorCanvas.tsx
@@ -3447,13 +3447,19 @@ export const SimulatorCanvas = ({ headerSlot }: SimulatorCanvasProps = {}) => {
// on the web the pro overlay may install a Web Serial flasher
// for this board kind (no-op in pure OSS builds).
if (isTauriRuntime || webFlashAvailable(board.boardKind)) {
+ // MicroPython boards don't compile to a flash image — the store
+ // keeps the 'micropython-loaded' sentinel, which no flasher can
+ // write. Arduino/ESP-IDF sketches only.
+ const isMpy = board.languageMode === 'micropython';
actions.push({
id: 'flash',
label: t('editor.canvas.flashToBoard'),
- disabled: !board.compiledProgram,
- title: board.compiledProgram
- ? 'Flash the compiled sketch to a real USB-attached board'
- : 'Compile the sketch first',
+ disabled: !board.compiledProgram || isMpy,
+ title: isMpy
+ ? 'MicroPython projects cannot be flashed yet — Arduino sketches only'
+ : board.compiledProgram
+ ? 'Flash the compiled sketch to a real USB-attached board'
+ : 'Compile the sketch first',
onSelect: () => {
setFlashModalFor(boardContextMenu.boardId);
setBoardContextMenu(null);