Fix the targets that tinygo build -target rejects

Aperta Adatta ai principianti
#6,617 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@narguis ci sta già lavorando.

Dal 27/11/2026.

  • #6647 di @Verlintas — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Scegli un target non verificato e individua il relativo file JSON; confrontalo con esp32c6.json e con gli altri target dei chip per vedere come viene impostato inheritable-only. Poi esamina make/smoketest.mk e verifica che compili almeno una scheda che eredita da quel target; aggiungine una se necessario. Il lavoro è completato quando il target selezionato non fallisce più nelle build autonome e una scheda che ne eredita è coperta dallo smoke test.

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

Descrizione

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.

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.