rust-embedded / rust-embedded/svd
[svd_rs, svd_parser] Differentiation between Arrays and Lists
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 84
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
According to documentation, there are actually two sequential types for some of child elements, which can be created by using placeholder:
[%s] - for arrays, in such case <dimIndex></dimIndex> should not be used.
%s - for lists, in that case <dimIndex></dimIndex> can be used.
Peripherals - for some reason they advise to not create peripheral list, only arrays:
dimIndex Do not define on peripheral level. By default, is an integer value starting at 0.
name The string identifies the peripheral. Peripheral names are required to be unique for a device. The name needs to be an ANSI C identifier to generate the header file. You can use the placeholder [%s] to create arrays.
Registers and Clusters - both can be used:
dimIndex Specify the substrings that replaces the %s placeholder within name and displayName. By default, the index is a decimal value starting with 0 for the first register. dimIndex should not be used together with the placeholder [%s], but rather with %s.
name String to identify the register. Register names are required to be unique within the scope of a peripheral. You can use the placeholder %s, which is replaced by the dimIndex substring. Use the placeholder [%s] only at the end of the identifier to generate arrays in the header file. The placeholder [%s] cannot be used together with dimIndex.
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
Start by comparing the CMSIS-SVD documentation quoted in the issue with the behavior of the svd_rs and svd_parser crates. Inspect the relevant array, list, dimIndex, and placeholder handling entry points, then determine the expected distinction for peripherals, registers, and clusters. Done means the parser and model represent these cases consistently, with focused tests covering the documented combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100