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

Abierto
#6,471 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli, embedded-iot

Línea de trabajo

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-.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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))
        }
}
Lenguaje dominante
Go
Estrellas
17.8k
Forks
1.1k
Merge medio
1 d 4 h
PR fusionados (30 d)
380

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tinygo-org/tinygo

Todos los issues de tinygo-org/tinygo

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.