Skip to content

Instantly share code, notes, and snippets.

@japaric
Created May 22, 2017 17:23
Show Gist options
  • Save japaric/d4685881df915e7d659fb60ed692e850 to your computer and use it in GitHub Desktop.
Save japaric/d4685881df915e7d659fb60ed692e850 to your computer and use it in GitHub Desktop.
SVD files with errors
<device>
<name>bad-register-size</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>33</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>derived-from-bad-enumerated-values</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
<field>
<name>BS1</name>
<bitOffset>1</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues derivedFrom="SET">
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>derived-from-bad-field-name</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
<field>
<name>BS1</name>
<bitOffset>1</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues derivedFrom="BS2.SET">
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>derived-from-bad-register-name</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
<field>
<name>BS1</name>
<bitOffset>1</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues derivedFrom="ODR.ODR0.STATE">
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>enumerated-value-name-missing</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<!-- <name>SET</name> -->
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>field-name-missing</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<!-- <name>BS0</name> -->
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>OK</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>peripheral-name-missing</name>
<peripherals>
<peripheral>
<!-- <name>GPIOA</name> -->
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<name>BSRR</name>
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
<device>
<name>peripherals-missing</name>
</device>
<device>
<name>register-name-missing</name>
<peripherals>
<peripheral>
<name>GPIOA</name>
<baseAddress>0xdeadbeef</baseAddress>
<registers>
<register>
<!-- <name>BSRR</name> -->
<description>GPIO port bit set/reset register</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<fields>
<field>
<name>BS0</name>
<bitOffset>0</bitOffset>
<bitWidth>1</bitWidth>
<enumeratedValues>
<enumeratedValue>
<name>SET</name>
<value>1</value>
</enumeratedValue>
</enumeratedValues>
</field>
</fields>
</register>
</registers>
</peripheral>
</peripherals>
</device>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment