Open-CMSIS-Pack / svd-spec

CMSIS-SVD Specification
https://open-cmsis-pack.github.io/svd-spec/main/index.html
Apache License 2.0
5 stars 6 forks source link

Fix derivedFrom attribute types and enumeratedValue minOccurs #14

Open ckudera opened 3 months ago

ckudera commented 3 months ago

I'm working on a SVDSuite, a Python package to parse, process, manipulate, validate, and generate CMSIS SVD files. During development, I noticed a discrepancy between documentation and schema.

According to the documentation, derivedFrom can be referenced from another scope for elements cluster, register, field, and enumeratedValues. However, in the schema, the type for the derivedFrom attribute is dimableIdentifierType which does not allow the . character. Furthermore, the enumeratedValue element in enumeratedValues must be specified (minOccurs set to 1), which doesn't make sense for deriving. This issue was already reported here.

This PR addresses the described issues. It contains the following changes:

Please let me know what you think about the PR and if it needs any modifications.