Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Make microzig_main automatically call `init` for board

未关闭
#830 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
embedded-iot, zig
领域
embedded-iot

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Zig
星标
2.3k
派生
198
平均合并
1 天 8 小时
30 天内合并 PR
37

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ZigEmbeddedGroup/microzig 的其他 Issue

查看 ZigEmbeddedGroup/microzig 的全部 Issue

相似的 Issue

更多 Embedded & IoT Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。