rust-embedded / rust-embedded/svd2rust
Possible regression: register array inference
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 857
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
Using svd2rust 0.36.1, some registers which were previously inferred as arrays now explicitly list all registers.
Ie, from
pmux1_0: [Pmux1_; 16],
...
to
pmux1_0: Pmux1_0,
pmux1_1: Pmux1_1,
pmux1_2: Pmux1_2,
...
Since this issue does not appear in svd2rust 0.36.0, I suspect #930 to be the culprit.
For example, this SVD is affected -- specifically, the PMUX0 and PINCFG0 fields of the PORT peripheral.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the regression with the ATSAMD21E18.svd input, focusing on the PORT peripheral's PMUX0 and PINCFG0 fields. Compare generated output from svd2rust 0.36.0 and 0.36.1, then inspect the changes in #930. Done means these registers are inferred as arrays again rather than emitted individually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100