User input before flashing completes hangs the monitor, unresponsive to Ctrl-C and Ctrl-\

Aperta
#6,471 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli, embedded-iot

Direzione di ricerca

The report points to tinygo flash -monitor on macOS with an xiao-esp32c3 and a program reading os.Stdin; it does not identify TinyGo source files or tests. Start by locating the flash and monitor command entry points and tracing how stdin is handled before the connection message. Reproduce the hang by sending input early, then confirm the monitor remains interruptible with Ctrl-C or Ctrl-.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Tinygo version: tinygo version 0.44.0 darwin/arm64 (using go version go1.25.3 and LLVM version 22.1.4) (Tinygo 0.44 on macOS 15.7.9)
Board: xiao-esp32c3

I was bootstrapping my knowledge of Tinygo and I jumped the gun on a small single-character serial echo test program I wrote and the flasher/monitor wedged so badly I couldn't break out of it. Unplugging fixed it, but it made me think that there might be something with the handoff between the flasher and monitor that needs to consume os.Stdin or it'll hang. If I wait until I get the Connected to /dev/cu.... message things work as expected with single character echo. Here's my test case:

package main

import (
        "fmt"
        "os"
        "time"
)

// tinygo flash -monitor -target=xiao-esp32c3 send_serial.go

func main() {
        buf := make([]byte, 1)
        time.Sleep(time.Second)

        for {
                os.Stdin.Read(buf)
                fmt.Println("Your key:", string(buf))
        }
}
Lingua principale
Go
Stelle
17.8k
Fork
1.1k
Merge medio
1g 4h
PR unite (30g)
380

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinygo-org/tinygo

Tutte le issue di tinygo-org/tinygo

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.