• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/getting-started/
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.10.�Board File Syntax</title><link rel="stylesheet" href="cs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Sourcery CodeBench Lite"><link rel="up" href="sprite.html" title="Chapter�6.�Sourcery CodeBench Debug Sprite"><link rel="prev" href="sec-sprite-supported-boards.html" title="6.9.�Supported Board Files"><link rel="next" href="chap-next-steps.html" title="Chapter�7.�Next Steps with Sourcery CodeBench"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.10.�Board File Syntax</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-sprite-supported-boards.html">Prev</a>�</td><th width="60%" align="center">Chapter�6.�Sourcery CodeBench Debug Sprite</th><td width="20%" align="right">�<a accesskey="n" href="chap-next-steps.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-sprite-board-file"></a>6.10.�Board File Syntax</h2></div></div></div><p>The <em class="replaceable"><code>board-file</code></em> can be a
2    user-written XML file to describe a non-standard board.  The
3    Sourcery CodeBench Debug Sprite searches for board files in the
4    <code class="filename">arm-none-eabi/lib/boards</code> directory in the
5    installation.  Refer to the files in that directory for
6    examples.</p><p>The file's DTD is:
7
8    </p><pre class="programlisting">&lt;!-- Board description files
9
10     Copyright (c) 2007-2009 CodeSourcery, Inc.
11
12     THIS FILE CONTAINS PROPRIETARY, CONFIDENTIAL, AND TRADE
13     SECRET INFORMATION OF CODESOURCERY AND/OR ITS LICENSORS.
14
15     You may not use or distribute this file without the express
16     written permission of CodeSourcery or its authorized
17     distributor.  This file is licensed only for use with 
18     Sourcery CodeBench.  No other use is permitted.
19     --&gt;
20
21&lt;!ELEMENT board
22	(category?, properties?, feature?, initialize?, memory-map?, debuggerDefaults?)&gt;
23
24&lt;!-- Board category to group boards list into the tree --&gt;
25&lt;!ELEMENT category (#PCDATA)&gt;
26
27&lt;!ELEMENT properties
28	(description?, property*)&gt;
29
30&lt;!ELEMENT initialize
31	(write-register | write-memory | delay
32	 | wait-until-memory-equal | wait-until-memory-not-equal)* &gt;
33&lt;!ELEMENT write-register EMPTY&gt;
34&lt;!ATTLIST write-register
35		        address CDATA   #REQUIRED
36                        value   CDATA   #REQUIRED
37                        bits    CDATA   #IMPLIED&gt;
38&lt;!ELEMENT write-memory EMPTY&gt;
39&lt;!ATTLIST write-memory
40		        address CDATA   #REQUIRED
41                        value   CDATA   #REQUIRED
42                        bits    CDATA   #IMPLIED&gt;
43&lt;!ELEMENT delay EMPTY&gt;
44&lt;!ATTLIST delay
45		        time CDATA   #REQUIRED&gt;
46&lt;!ELEMENT wait-until-memory-equal EMPTY&gt;
47&lt;!ATTLIST wait-until-memory-equal
48		        address CDATA   #REQUIRED
49                        value   CDATA   #REQUIRED
50                        timeout CDATA   #IMPLIED
51                        bits    CDATA   #IMPLIED&gt;
52&lt;!ELEMENT wait-until-memory-not-equal EMPTY&gt;
53&lt;!ATTLIST wait-until-memory-not-equal
54		        address CDATA   #REQUIRED
55                        value   CDATA   #REQUIRED
56                        timeout CDATA   #IMPLIED
57                        bits    CDATA   #IMPLIED&gt;
58
59&lt;!ELEMENT memory-map (memory-device)*&gt;
60&lt;!ELEMENT memory-device (property*, description?, sectors*)&gt;
61&lt;!ATTLIST memory-device
62                        address CDATA   #REQUIRED
63		        size    CDATA   #REQUIRED
64		        type    CDATA   #REQUIRED
65                        device  CDATA   #IMPLIED&gt;
66
67&lt;!ELEMENT description (#PCDATA)&gt;
68&lt;!ELEMENT property (#PCDATA)&gt;
69&lt;!ATTLIST property name CDATA #REQUIRED&gt;
70&lt;!ELEMENT sectors EMPTY&gt;
71&lt;!ATTLIST sectors
72	size CDATA #REQUIRED
73	count CDATA #REQUIRED&gt;
74
75&lt;!-- Definition of default option values for each debug interface --&gt;
76&lt;!ELEMENT debuggerDefaults (debugInterface*)&gt;
77&lt;!ELEMENT debugInterface (option*)&gt;
78&lt;!ATTLIST debugInterface 
79	name CDATA #REQUIRED
80&gt;
81&lt;!ELEMENT option EMPTY&gt;
82&lt;!ATTLIST option 
83	name CDATA #REQUIRED
84	defaultValue CDATA #REQUIRED
85&gt;
86
87&lt;!ENTITY % gdbtarget SYSTEM "gdb-target.dtd"&gt;
88%gdbtarget;
89</pre><p>
90
91    All values can be provided in decimal, hex (with
92    a <code class="literal">0x</code> prefix) or octal (with
93    a <code class="literal">0</code> prefix).  Addresses and memory sizes can
94    use a <code class="literal">K</code>, <code class="literal">KB</code>,
95    <code class="literal">M</code>, <code class="literal">MB</code>,
96    <code class="literal">G</code> or <code class="literal">GB</code> suffix to denote
97    a unit of memory.  Times must use a <code class="literal">ms</code> or
98    <code class="literal">us</code> suffix.</p><p>The following elements are available:
99
100    </p><div class="variablelist"><dl><dt><span class="term"><code class="function">&lt;board&gt;</code></span></dt><dd><p>
101      This top-level element encapsulates the entire description of
102      the board.  It can contain
103      <code class="function">&lt;properties&gt;</code>, 
104      <code class="function">&lt;feature&gt;</code>, 
105      <code class="function">&lt;initialize&gt;</code> and
106      <code class="function">&lt;memory-map&gt;</code>
107      elements.</p></dd><dt><span class="term"><code class="function">&lt;properties&gt;</code></span></dt><dd><p>
108      The <code class="function">&lt;properties&gt;</code> element specifies
109      specific properties of the target system.  This element can
110      occur at most once.  It can contain a
111      <code class="function">&lt;description&gt;</code> element.</p><p>
112        It can also contain <code class="function">&lt;property&gt;</code> elements
113        with the following names:
114        </p><div class="variablelist"><dl><dt><span class="term"><code class="literal">banked-regs</code></span></dt><dd><p>
115              The <code class="literal">banked-regs</code> property
116              specifies that the CPU of the target board has banked registers 
117              for different processor modes (supervisor, IRQ, etc.).
118            </p></dd><dt><span class="term"><code class="literal">has-vfp</code></span></dt><dd><p>
119              The <code class="literal">has-vfp</code> property specifies that
120              the CPU of the target board has VFP registers.
121            </p></dd><dt><span class="term"><code class="literal">system-v6-m</code></span></dt><dd><p>
122              The <code class="literal">system-v6-m</code> property
123	      specifies that the CPU of the target board has ARMv6-M
124	      architecture system registers.
125            </p></dd><dt><span class="term"><code class="literal">system-v7-m</code></span></dt><dd><p>
126              The <code class="literal">system-v7-m</code> property
127	      specifies that the CPU of the target board has ARMv7-M
128	      architecture system registers.
129            </p></dd><dt><span class="term"><code class="literal">core-family</code></span></dt><dd><p>
130              The <code class="literal">core-family</code> property specifies
131	      the ARM family of the target.  The body of the
132	      <code class="function">&lt;property&gt;</code> element may be one
133	      of <code class="literal">arm7</code>, <code class="literal">arm9</code>,
134	      <code class="literal">arm11</code>, and <code class="literal">cortex</code>.
135            </p></dd><dt><span class="term"><code class="literal">system-clock</code></span></dt><dd><p>
136	      This property specifies the target clock frequency (in Hertz) after
137	      reset.  It is used to configure flash programming algorithms.
138            </p></dd></dl></div><p>
139      </p></dd><dt><span class="term"><code class="function">&lt;initialize&gt;</code></span></dt><dd><p>
140      The <code class="function">&lt;initialize&gt;</code> element defines an
141      initialization sequence for the board, which the Sprite performs
142      before downloading a program.  It can contain
143      <code class="function">&lt;write-register&gt;</code>,
144      <code class="function">&lt;write-memory&gt;</code> and
145      <code class="function">&lt;delay&gt;</code>
146      elements.</p></dd><dt><span class="term"><code class="function">&lt;feature&gt;</code></span></dt><dd><p>
147      This element is used to inform GDB about additional registers
148      and peripherals available on the board.  It is passed directly
149      to GDB; see the GDB manual for further details.
150
151      
152      </p></dd><dt><span class="term"><code class="function">&lt;memory-map&gt;</code></span></dt><dd><p>
153      This element describes the memory map of the target board.  It
154      is used by GDB to determine where software breakpoints may be
155      used and when flash programming sequences must be used.  This
156      element can occur at most once.  It can contain
157      <code class="function">&lt;memory-device&gt;</code> elements.
158      </p></dd><dt><span class="term"><code class="function">&lt;memory-device&gt;</code></span></dt><dd><p>
159      This element specifies a region of memory.  It has four
160      attributes: <code class="literal">address</code>, <code class="literal">size</code>,
161      <code class="literal">type</code> and <code class="literal">device</code>.  The
162      <code class="literal">address</code> and <code class="literal">size</code>
163      attributes specify the location of the memory device.  The
164      <code class="literal">type</code> attribute specifies that device as
165      <code class="literal">ram</code>, <code class="literal">rom</code> or
166      <code class="literal">flash</code>.  The <code class="literal">device</code>
167      attribute is required for <code class="literal">flash</code> regions; it
168      specifies the flash device type.  
169      
170      
171      
172      The <code class="function">&lt;memory-device&gt;</code> element can contain a
173      <code class="function">&lt;description&gt;</code> element.
174      </p></dd><dt><span class="term"><code class="function">&lt;write-register&gt;</code></span></dt><dd><p>
175      This element writes a value to a control register.  It has three
176      attributes: <code class="literal">address</code>,
177      <code class="literal">value</code> and <code class="literal">bits</code>.  The
178      <code class="literal">bits</code> attribute, specifying the bit width of the
179      write operation, is optional; it defaults to 32.
180      
181      
182      </p></dd><dt><span class="term"><code class="function">&lt;write-memory&gt;</code></span></dt><dd><p>
183      This element writes a value to a memory location.  It has three
184      attributes: <code class="literal">address</code>,
185      <code class="literal">value</code> and <code class="literal">bits</code>.  The
186      <code class="literal">bits</code> attribute is optional and defaults to
187      32.  Bit widths of 8, 16 and 32 bits are supported.  The address
188      written to must be naturally aligned for the size of the write
189      being done.</p></dd><dt><span class="term"><code class="function">&lt;delay&gt;</code></span></dt><dd><p>
190      This element introduces a delay.  It has one attribute,
191      <code class="literal">time</code>, which specifies the number of
192      milliseconds, or microseconds to delay by.
193      </p></dd><dt><span class="term"><code class="function">&lt;description&gt;</code></span></dt><dd><p>
194      This element encapsulates a human-readable description of its enclosing
195      element.</p></dd><dt><span class="term"><code class="function">&lt;property&gt;</code></span></dt><dd><p>
196      The <code class="function">&lt;property&gt;</code> element allows
197      additional name/value pairs to be specified.  The property name
198      is specified in a <code class="literal">name</code> attribute.  The
199      property value is the body of the
200      <code class="function">&lt;property&gt;</code>
201      element.</p></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-sprite-supported-boards.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="sprite.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="chap-next-steps.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.9.�Supported Board Files�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�7.�Next Steps with Sourcery CodeBench</td></tr></table></div></body></html>
202