Skip to content

regz: Missing PORT in generated chip file for ATSAMD21G18A #914

@ahogen

Description

@ahogen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions