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

SVD2ADA generates enumeration with duplicate values #92

Open
Joebeazelman opened this issue Feb 28, 2022 · 2 comments
Open

SVD2ADA generates enumeration with duplicate values #92

Joebeazelman opened this issue Feb 28, 2022 · 2 comments

Comments

@Joebeazelman
Copy link

After generating and compiling the code generated from the enclosed SVD file, the Ada compiler flagged an error because two of the names in an enumeration had the same value. I worked around the error by deleting the name from the enum and returning it from a function as an alias to the other name with the same value.

LPC176x - 5x SVD.zip

@pat-rogers
Copy link
Contributor

pat-rogers commented Feb 28, 2022 via email

@Joebeazelman
Copy link
Author

Joebeazelman commented Mar 1, 2022

Enum names can have the same value in other languages, but not in Ada. It would be a bug in the file if the SVD specification forbids it. The code generator should implement a workaround like the alias hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants