Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow optional 'dim_index' if register name contains [%s] #153

Closed
wants to merge 2 commits into from

Conversation

lucasbrendel
Copy link

Based on SVD spec if the register name contains '[%s]' in its name then the dim_index field is not required.

I think this is a fix for that situation.

This fixes #150 and should then be able to close #146 as i am able to successfully generate after applying these changes.

@lucasbrendel lucasbrendel changed the title Allow Option 'dim_index' if register name contains [%s] Allow optional 'dim_index' if register name contains [%s] Oct 25, 2017
@homunkulus
Copy link
Contributor

☔ The latest upstream changes (presumably #158) made this pull request unmergeable. Please resolve the merge conflicts.

bors bot added a commit that referenced this pull request Feb 24, 2018
168: Handle missing dimIndex on registers r=japaric a=kevinmehall

This supersedes @lucasbrendel's similar PR #153 and fixes #150.

Per the [SVD spec](http://arm-software.github.io/CMSIS_5/SVD/html/elem_special.html#dimElementGroup_gr), dimIndex is not required:

> By default, \<dimIndex\> is a value starting with 0.
> Remark: Do not define \<dimIndex\> when using the placeholder [%s] in \<name\> or \<displayName\>.

I interpret this as the element being optional with "%s" and not allowed with "[%s]" (this change does not reject the latter). Atmel SAMD21 SVDs use "%s" with no dimIndex for 0-indexed arrays.

This also tests that dimIndex is sequential and numeric in a single pass without allocating temporary vectors, and fixes the typo adresses -> addresses.
bors bot added a commit that referenced this pull request Feb 24, 2018
168: Handle missing dimIndex on registers r=japaric a=kevinmehall

This supersedes @lucasbrendel's similar PR #153 and fixes #150.

Per the [SVD spec](http://arm-software.github.io/CMSIS_5/SVD/html/elem_special.html#dimElementGroup_gr), dimIndex is not required:

> By default, \<dimIndex\> is a value starting with 0.
> Remark: Do not define \<dimIndex\> when using the placeholder [%s] in \<name\> or \<displayName\>.

I interpret this as the element being optional with "%s" and not allowed with "[%s]" (this change does not reject the latter). Atmel SAMD21 SVDs use "%s" with no dimIndex for 0-indexed arrays.

This also tests that dimIndex is sequential and numeric in a single pass without allocating temporary vectors, and fixes the typo adresses -> addresses.
@japaric
Copy link
Member

japaric commented Feb 24, 2018

Closing in favor of #168

@japaric japaric closed this Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVD Registers with no dimIndex Conversion failing on XMC4100
3 participants