Closed aowron closed 1 year ago
The problem here is that the ADTF file contains a single definition for, but several instances of the same module.
This means that regz needs to generate a single type ADC
which is then instantiated for ADC0
. Same for PORT
module and instances VPORTA
, VPORTB
, VPORTC
.
This will need some bigger refactorings, sadly
I took a look at it tonight and will have time Saturday to implement. Luckily it completely fits within the current data model, it just requires some extra processing while parsing.
Atdf file (with the wrong extension due to github): ATmega3209.txt
Description: Trying to generate a zig file for the ATmega3209, using the pack at: https://packs.download.microchip.com/#collapse-Microchip-ATmega-DFP-pdsc), but getting these errors:
While digging a bit into the code (without any real knowledge of the regz codebase, and just starting out with zig), around this section (line 590 in Database.zig):
and comparing that section to the atdf file, it looks like the offending peripherals should match on at least
std.mem.eql(u8, instance_name, group_name)
, however, it seems like they for some reason are using a different name for name-in-module and and the register-group/instance name: