Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#914 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
xml
Lĩnh vực
devtools, embedded-iot

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Zig
Star
2.3k
Fork
198
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ZigEmbeddedGroup/microzig

Tất cả issue của ZigEmbeddedGroup/microzig

Issue tương tự

Thêm issue về DevTools

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.