avr-rust/avr-mcu

Bugged atdf definitions.

luqasz opened this issue · 6 comments

Hi.

While I was generating c++ headers (from original atdf files) with registers and their bit fields, I've noticed that they have lots of bugs and inconsistencies. I basicly do not trust them at all, and microchip does not respond to any mails and bug reports.

As we share common goal, I propose a solution to maintain a repository (I can do it as I have time) with all (hopefully) bugs and inconsistencies fixed.

I am thinking of a repo with yaml files (separate file for each chip) for easy parsing and reading/editting. Will post this repo here whe I will finish it.

Repo with registers.

Hi @luqasz , who have you been in contact with at Atmel/Microchip regarding this?

I was also looking over the changes to the atdf files in luqasz/avr-registers, and I see that most of the corrections seems to be removing bitfields or adding bitfields (to avoid name collisions?)

I've contacted them but guess what ? No reply.
I've removed bit fields which just represented from 0 to 7. No meaning. They are mostly useless for me. They are inconsistent luqasz/avr-registers@a89de26
I did fix bit fields (by splitting them) which were broken by combining them into one. Weird. e.g. luqasz/avr-registers@f33c4db

kulp commented

In a tangentially-related note (a different kind of "bugged atdf definition"):

Even the latest pack files for ATmega (2.0.401) contain misspellings like "PRESACLE" for "PRESCALE", which unfortunately results in downstream projects like avrd containing the misspelling in their API as well.

Being faithful to the original sources is great, but avoiding propagating trivial errors would be even better.

Is there appetite in this project for applying certain transformations upon the atdf files' content (after deserialization, not modifying the original files), to fix misspellings like this one?

That is, if I were to propose a PR that corrected this misspelling by applying string replacements to ValueGroup's name and caption, would that fit with this project's goals? Or is there a better way?

Tracked in DEVXML-4894

I will revive my atdf parser and repo to have original files in one dir and fixes in other.