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

regz: Missing `PORT` in generated chip file for ATSAMD21G18A

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
xml

调研方向

The missing PORT instance comes from regz's ATDF parser: the ATSAMD21G18A.atdf input triggers error.TodoInstanceWithMultipleRegisterGroups at the 'modes' elements around lines 4972-4979, which the warnings report as unhandled. Start by finding where that error is raised in the regz source and how it handles an instance with several register groups. Done means PORT appears in the generated peripherals list at 0x41004400 without the TODO error. The issue has no assignee, no linked pull request, and no recent answer, so the fix needs a maintainer decision first.

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

描述

regz

I'm working on creating a HAL for an ATSAMD21G18A in a fork and thought I'd start with GPIOs, working towards a blinky example. However I don't see a PORT periph instance generated.

Excerpt from "Table 12-1. Peripherals Configuration Summary" in the datasheet:

Periph Name Base Address
...
NVMCTRL 0x41004000
PORT 0x41004400
DMAC 0x41004800
...

Input to regz (added .txt for GitHub): ATSAMD21G18A.atdf.txt

Output: regz_ATSAMD21G18A_zig.tar.gz

Excerpt from generated ATSAMD21G18A.zig:

pub const peripherals = struct {
    // ...
    pub const NVMCTRL: *volatile types.peripherals.NVMCTRL = @ptrFromInt(0x41004000);
    /// Direct Memory Access Controller
    pub const DMAC: *volatile types.peripherals.DMAC.DMAC = @ptrFromInt(0x41004800);
    // ...
};

Actually, I just ran regz manually and noticed it is complaining:

warning(atdf): line 4972: the 'modes' isn't usually found in the 'register-group' element, this could mean unhandled ATDF behaviour or your input is malformed
warning(atdf): line 4973: the 'modes' isn't usually found in the 'register-group' element, this could mean unhandled ATDF behaviour or your input is malformed
warning(atdf): line 4978: the 'modes' isn't usually found in the 'register-group' element, this could mean unhandled ATDF behaviour or your input is malformed
warning(atdf): line 4979: the 'modes' isn't usually found in the 'register-group' element, this could mean unhandled ATDF behaviour or your input is malformed
warning(atdf): failed to instantiate module: error.TodoInstanceWithMultipleRegisterGroups
warning(atdf): failed to instantiate module: error.TodoInstanceWithMultipleRegisterGroups

I don't see an issue talking about this TODO item, so I'll still submit this.

主要语言
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

更多 DevTools Issue

把新 issue 发到你的邮箱

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