rust-embedded / rust-embedded/svd
[svd-parser] Better validation of unknown tokens
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 84
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
Today I was playing with svd-parser on hand-written svd files.
I made typo in derivedFrom (double 'r') but it went without errors.
After that I tried with this sample:
<!-- This is the sample of minimal, valid SVD file -->
<device schemaVersion="1.3" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd">
<name>Minimal SVD</name>
<version>0.1</version>
<description>This is syntetic example of minimal valid SVD file</description>
<addressUnitBits>8</addressUnitBits>
<width>32</width>
<unknownEmptyToken></unknownEmptyToken>
<peripherals>
<peripheral>
<unknownEmptyToken></unknownEmptyToken>
<name> Bunny </name>
<baseAddress>0x21370000</baseAddress>
</peripheral>
</peripherals>
</device>
But again - no errors.
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 at the svd-parser parsing and validation entry points and reproduce the issue with the malformed derivedFrom attribute and the supplied unknownEmptyToken sample. Trace how unrecognized XML tokens are handled; done means these inputs produce validation errors while the minimal valid SVD remains accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100