Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make microzig_main automatically call `init` for board

Aperta
#830 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
embedded-iot, zig
Ambito
embedded-iot

Direzione di ricerca

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.

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

Descrizione

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.
Lingua principale
Zig
Stelle
2.3k
Fork
198
Merge medio
1g 8h
PR unite (30g)
37

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 ZigEmbeddedGroup/microzig

Tutte le issue di ZigEmbeddedGroup/microzig

Issue simili

Altre issue su Embedded & IoT

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.