rust-embedded / rust-embedded/svd2rust

svd2rust generates invalid code

Open
#283 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
857
Forks
164
PR merge metrics
No merged PRs in 30d

Description

Using the attached SVD, svd2rust generates code with several compile errors. Two structs named CONFIG in the same module, two structs named MR in the same module, two modules named mr, and several enums with two identical variants.

LPC176x5x.svd.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing generation with the attached LPC176x5x.svd.txt file and inspect the generated Rust for duplicate CONFIG and MR structs, mr modules, and enum variants. The payload names no source files or tests; done means the generated code avoids these duplicate definitions and compiles successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.