Fix the targets that tinygo build -target rejects

Abierto Apto para principiantes
#6,617 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@narguis ya está trabajando en esto.

Desde el 27/11/2026.

  • #6647 de @Verlintas — fusionado

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Elige un objetivo sin comprobar y localiza su archivo JSON; compáralo con esp32c6.json y otros objetivos de chip para ver cómo se establece inheritable-only. Luego revisa make/smoketest.mk y confirma que compile al menos una placa que herede de ese objetivo; añade una si hace falta. La tarea estará terminada cuando el objetivo seleccionado ya no falle en compilaciones independientes y una placa que herede de él esté cubierta por la prueba de humo.

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

Descripción

bug good first issue

tinygo build -target=<name> fails for these targets on dev. CI does not catch the failures, because no smoke test builds them. Each one is small and independent, so please pick one, comment that you are working on it, and open a PR.

Targets to mark inheritable-only

These targets exist only for other targets to inherit from. They cannot build on their own. Add "inheritable-only": true to each target JSON file, as esp32c6.json and the other chip targets already do.

Do not update compileopts/target_test.go

compileopts/target_test.go lists several inheritable only targets as fixtures, is not a canonical list of inheritable targets. It does not need to be updated.

  • particle-3rd-gen (inherited by particle-argon, particle-boron, particle-xenon): machine_nrf.go:188: undefined: UART_TX_PIN
  • stm32g0b1 (inherited by amken-trio, nucleo-g0b1re): machine_stm32_i2c_revb.go:71: undefined: I2C0_SCL_PIN
  • stm32u585 (inherited by arduino-uno-q): machine_stm32_i2c_revb.go:71: undefined: I2C0_SCL_PIN
  • nrf52840-s140v6-uf2 (inherited by 12 boards): No available targets are compatible with triple ""
  • nrf52840-s140v7-uf2 (inherited by nano-33-ble-s140v7-uf2, xiao-ble, xiao-ble-plus): No available targets are compatible with triple ""

Boards

  • adafruit-esp32-feather-v2: missing pin definitions, machine_esp32_i2c.go:38: undefined: SCL_PIN

    The esp32 I2C driver uses SCL_PIN and SDA_PIN as its default pins. board_adafruit-esp32-feather-v2.go defines these pins as I2C_SCL_PIN and I2C_SDA_PIN. Rename them to SCL_PIN and SDA_PIN, as the other ESP boards name them, and keep the SCL and SDA silk label constants. With only this change, the board builds examples/serial and examples/blinky1.

After each fix

A target marked inheritable-only cannot be built, so it cannot go in make/smoketest.mk. Instead, check that make/smoketest.mk builds at least one board that inherits from it, and add one if not. For adafruit-esp32-feather-v2, add the board itself.

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.