diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-08 07:52:10 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-08 07:52:10 +0000 |
commit | 5f342be96eb860286417b9ad84b861dede2cdd25 (patch) | |
tree | f254ab201d4ca0aae4f0d21e39871a6683b78944 /tools/gencfg/schema/boards | |
parent | 127fe7e427d06d5e61cdf7c5e933a63e5dfd7bfe (diff) | |
download | ChibiOS-5f342be96eb860286417b9ad84b861dede2cdd25.tar.gz ChibiOS-5f342be96eb860286417b9ad84b861dede2cdd25.tar.bz2 ChibiOS-5f342be96eb860286417b9ad84b861dede2cdd25.zip |
Configuration tool prototype (not complete).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4427 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'tools/gencfg/schema/boards')
-rw-r--r-- | tools/gencfg/schema/boards/abstract_board.xsd | 49 | ||||
-rw-r--r-- | tools/gencfg/schema/boards/stm32f4xx_board.xsd | 84 |
2 files changed, 133 insertions, 0 deletions
diff --git a/tools/gencfg/schema/boards/abstract_board.xsd b/tools/gencfg/schema/boards/abstract_board.xsd new file mode 100644 index 000000000..9ce06495a --- /dev/null +++ b/tools/gencfg/schema/boards/abstract_board.xsd @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema elementFormDefault="qualified"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:include schemaLocation="../common/doc.xsd" />
+
+ <xs:complexType name="AbstractBoardType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="DocumentedItem">
+ <xs:attribute name="BoardID" use="required">
+ <xs:annotation>
+ <xs:documentation>Board identifier string, it is used to
+ create the board files folder name and the board
+ identifier macro in board.h.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ <xs:pattern value="\w[\w\d_]*"></xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="BoardPHYID" use="optional">
+ <xs:annotation>
+ <xs:documentation>PHY identifier as defined in mii.h or empty if a PHY is not present.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="collapse"></xs:whiteSpace>
+ <xs:pattern value="MII_[\w_+]"></xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="BoardPHY" use="optional">
+ <xs:annotation>
+ <xs:documentation>Type of the PHY device: RMII or MII, this attribute is defaulted to MII if not present.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="RMII"></xs:enumeration>
+ <xs:enumeration value="MII"></xs:enumeration>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/tools/gencfg/schema/boards/stm32f4xx_board.xsd b/tools/gencfg/schema/boards/stm32f4xx_board.xsd new file mode 100644 index 000000000..8b7ba2bbb --- /dev/null +++ b/tools/gencfg/schema/boards/stm32f4xx_board.xsd @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema elementFormDefault="qualified"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:include schemaLocation="../common/doc.xsd" />
+ <xs:include schemaLocation="../common/stm32/stm32_gpiov2_port.xsd" />
+ <xs:include schemaLocation="abstract_board.xsd" />
+ + <xs:complexType name="STM32F4xxBoardType"> + <xs:complexContent> + <xs:extension base="AbstractBoardType"> + <xs:sequence> + <xs:element
+ name="ports"
+ type="portsType"
+ maxOccurs="1"
+ minOccurs="1">
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute
+ name="HSEBypass"
+ type="xs:boolean"
+ use="required">
+ </xs:attribute>
+ <xs:attribute
+ name="HSEFrequency"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ HSE frequency or zero if not present.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+
+ <xs:minInclusive value="0"></xs:minInclusive>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute
+ name="LSEFrequency"
+ use="required">
+ <xs:annotation>
+ <xs:documentation>
+ LSE frequency or zero if not present.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:minInclusive value="0"></xs:minInclusive>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+
+ <xs:complexType name="portsType">
+ <xs:sequence>
+ <xs:element name="GPIOA" type="STM32GPIOv2PortType"
+ minOccurs="1" maxOccurs="1"></xs:element>
+ <xs:element name="GPIOB" type="STM32GPIOv2PortType"
+ minOccurs="1" maxOccurs="1"></xs:element>
+ <xs:element name="GPIOC" type="STM32GPIOv2PortType"
+ minOccurs="1" maxOccurs="1"></xs:element>
+ <xs:element name="GPIOD" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ <xs:element name="GPIOE" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ <xs:element name="GPIOF" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ <xs:element name="GPIOG" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ <xs:element name="GPIOH" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ <xs:element name="GPIOI" type="STM32GPIOv2PortType"
+ maxOccurs="1" minOccurs="1"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+
+ <xs:element name="board" type="STM32F4xxBoardType"></xs:element>
+</xs:schema>
|