You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Might be little bit late to reply but I've experienced a similar issue. svd2ada doesn't gather enumerationValue tags evaluating them. If the the tag referenced by derivedFrom hasn't been evaluated yet, it won't be found and a CONSTRAINT_ERROR is thrown.
I assume fixing this requires some refactoring, though it should be at least possible to work around this by modifying the svd file accordingly, i.e., you need to ensure that tags referenced by derivedFrom appear first before the corresponding tag.
When trying to use the derivedFrom attribute on an enumeration an error is thrown
svd2ada --boolean --gen-uint-always --no-vfa-on-types --gen-uint-always -o STM32 -p STM32_SVD STM32F439x.svd
raised CONSTRAINT_ERROR : enumerate 'derivedFrom' is not known: MODER15.MODEREnumVals
svd2ada --boolean --gen-uint-always --no-vfa-on-types --gen-uint-always -o STM32 -p STM32_SVD STM32F439x.svd
raised CONSTRAINT_ERROR : enumerate 'derivedFrom' is not known: MODER.MODER15.MODEREnumVals
svd2ada --boolean --gen-uint-always --no-vfa-on-types --gen-uint-always -o STM32 -p STM32_SVD STM32F439x.svd
raised CONSTRAINT_ERROR : enumerate 'derivedFrom' is not known: GPIOK.MODER.MODER15.MODEREnumVals
svd2ada --boolean --gen-uint-always --no-vfa-on-types --gen-uint-always -o STM32 -p STM32_SVD STM32F439x.svd
raised CONSTRAINT_ERROR : enumerate 'derivedFrom' is not known: MODEREnumVals
an example derivedFrom attribute for the last error the is as follows
<enumeratedValues derivedFrom="MODEREnumVals">
example enumerated value
<enumeratedValues> <name>MODEREnumVals</name> <enumeratedValue> <name>Input</name> <description>Input (reset state)</description> <value>0</value> </enumeratedValue> <enumeratedValue> <name>GP_Output_Mode</name> <description>General purpose output mode</description> <value>1</value> </enumeratedValue> <enumeratedValue> <name>Alternate_Function_Mode</name> <description>Alternate function mode</description> <value>2</value> </enumeratedValue> <enumeratedValue> <name>Analog_Mode</name> <description>Analog mode</description> <value>3</value> </enumeratedValue> </enumeratedValues>
The text was updated successfully, but these errors were encountered: