2
Copyright (c) 2004, Theodore A. Roth
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are met:
8
* Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
11
* Redistributions in binary form must reproduce the above copyright
12
notice, this list of conditions and the following disclaimer in
13
the documentation and/or other materials provided with the
16
* Neither the name of the copyright holders nor the names of
17
contributors may be used to endorse or promote products derived
18
from this software without specific prior written permission.
20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
POSSIBILITY OF SUCH DAMAGE.
33
<!-- $Id: Device.dtd,v 1.12 2005/10/21 20:55:19 joerg_wunsch Exp $ -->
37
This file provides a Document Type Definition (DTD) for XML data files which
38
describe everything thing we need to generate the <avr/io*.h> header files.
40
Although ATMEL supplies XML device files already with AvrStudio >= 4.x, they
41
contain far more data than we need. In addition, there is information that we
42
need which they do not provide. Also, it may not be legal for us to include
43
those files with avr-libc.
45
I have written a python program (Atmel2libc.py) which will read ATMEL's XML
46
files and spit out a file which will validate against this DTD so that we can
47
leverage the data in those files. We will still have to manually add some data
48
to our generated xml files before we can use them to generate our headers.
64
<!ELEMENT version (#PCDATA)>
65
<!ELEMENT description (#PCDATA)>
67
<!ELEMENT memory_sizes (
73
<!ELEMENT flash_size (#PCDATA)>
74
<!ELEMENT eeprom_size (#PCDATA)>
75
<!ELEMENT int_sram_size (#PCDATA)>
76
<!ATTLIST int_sram_size start_addr CDATA #REQUIRED>
77
<!ELEMENT ext_sram_size (#PCDATA)>
78
<!ATTLIST ext_sram_size start_addr CDATA #REQUIRED>
80
<!ELEMENT interrupts (vector+)>
81
<!-- insn_size in bytes -->
83
insn_size (2 | 4) #REQUIRED
84
num_vects CDATA #REQUIRED
96
<!ELEMENT sig_name (#PCDATA)>
98
<!ELEMENT ioregisters (ioreg+)>
109
<!ELEMENT alt_name (#PCDATA)>
111
<!ELEMENT bit_field (
118
access CDATA #REQUIRED
122
<!-- If the is no bootloader element in the XML file, the device does not
123
have bootloader support. -->
125
<!-- The pagesize value is in bytes. Atmel's datasheets give it in
128
<!-- Some recent ATtiny devices have boot loader support, but only
129
have non-read while write (NRWW) behaviour throughout the
130
entire flash, and no separate bootloader area. So do not
131
insist on getting mode elements. -->
132
<!ELEMENT bootloader (mode*)>
134
pagesize CDATA #REQUIRED
135
rww_start CDATA #IMPLIED
136
rww_end CDATA #IMPLIED
137
nrww_start CDATA #IMPLIED
138
nrww_end CDATA #IMPLIED
141
<!-- The boot mode size is (pagesize * pages). -->
143
<!ELEMENT mode EMPTY>
146
pages CDATA #REQUIRED
147
start CDATA #REQUIRED