Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Make microzig_main automatically call `init` for board

Offen
#830 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
18/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
embedded-iot, zig
Bereich
embedded-iot

Rechercherichtung

The hook point is microzig_main in core/src/start.zig, which already calls the app and HAL init. Read how the board module is referenced there and how the nordic and wch example apps call board.init() today. The open question is ordering: whether the board init replaces or runs alongside chip/cpu init, and this needs a maintainer decision before any code. Done means a settled ordering rule, with examples updated to stop calling board.init() manually.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

From this comment from @tact1m4n3.

In the nordic and wch hals (maybe others) we have the example apps explicitly call board.init().

Maybe we should add logic to microzig_main to call it if its present. It already does this for the app and for the hal.

Makes sense to me, my only real concern is whether this call should supercede an init for the chip/cpu, or be called in addition to it.

  • If its the former, then the board init should probably call the chip init, which should probably call the cpu init.
    • This grants extra flexibility (A board might opt not to call a chip init, for the reason below)
    • But it's also extra boilerplate (more boards should call chip init, which should call cpu init) and duplicated code (they might opt to manually do some work, which is more places to make sure to update)
  • If it's the latter, I think we run the risk of some configs doing extra work (best case) or trashing each other.
    • For example, a chip setting up RCC to set up the clocks, only for a board, with an external clock, to immediately set them up again with an external clock.
Vorherrschende Sprache
Zig
Sterne
2.3k
Forks
198
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
37

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ZigEmbeddedGroup/microzig

Alle Issues in ZigEmbeddedGroup/microzig

Ähnliche Issues

Weitere Issues zu Embedded & IoT

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.