Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Make microzig_main automatically call `init` for board

Ouverte
#830 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
18/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
embedded-iot, zig
Domaine
embedded-iot

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Zig
Étoiles
2.3k
Forks
198
Merge moyen
1 j 8 h
PR mergées (30 j)
37

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ZigEmbeddedGroup/microzig

Toutes les issues de ZigEmbeddedGroup/microzig

Issues similaires

Plus d'issues Embedded & IoT

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.