Fix the targets that tinygo build -target rejects

オープン 初心者向け
#6,617 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@narguis がすでに取り組んでいます。

2026年11月27日 から。

  • #6647 @Verlintas による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go

調査の方向性

未チェックのターゲットを1つ選び、そのJSONファイルを見つけます。esp32c6.jsonや他のチップターゲットと比較して、inheritable-onlyがどのように設定されているかを確認します。次にmake/smoketest.mkを調べ、そのターゲットを継承するボードを少なくとも1つビルドすることを確認し、必要であれば追加します。選択したターゲットが単独ビルドで失敗しなくなり、それを継承するボードがスモークテストの対象になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
17.8k
フォーク
1.1k
平均マージ
1日 4時間
マージ済み PR(30日)
380

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tinygo-org/tinygo のほかの issue

tinygo-org/tinygo の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。