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"><!-- 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 --> 20 21<!ELEMENT board 22 (category?, properties?, feature?, initialize?, memory-map?, debuggerDefaults?)> 23 24<!-- Board category to group boards list into the tree --> 25<!ELEMENT category (#PCDATA)> 26 27<!ELEMENT properties 28 (description?, property*)> 29 30<!ELEMENT initialize 31 (write-register | write-memory | delay 32 | wait-until-memory-equal | wait-until-memory-not-equal)* > 33<!ELEMENT write-register EMPTY> 34<!ATTLIST write-register 35 address CDATA #REQUIRED 36 value CDATA #REQUIRED 37 bits CDATA #IMPLIED> 38<!ELEMENT write-memory EMPTY> 39<!ATTLIST write-memory 40 address CDATA #REQUIRED 41 value CDATA #REQUIRED 42 bits CDATA #IMPLIED> 43<!ELEMENT delay EMPTY> 44<!ATTLIST delay 45 time CDATA #REQUIRED> 46<!ELEMENT wait-until-memory-equal EMPTY> 47<!ATTLIST wait-until-memory-equal 48 address CDATA #REQUIRED 49 value CDATA #REQUIRED 50 timeout CDATA #IMPLIED 51 bits CDATA #IMPLIED> 52<!ELEMENT wait-until-memory-not-equal EMPTY> 53<!ATTLIST wait-until-memory-not-equal 54 address CDATA #REQUIRED 55 value CDATA #REQUIRED 56 timeout CDATA #IMPLIED 57 bits CDATA #IMPLIED> 58 59<!ELEMENT memory-map (memory-device)*> 60<!ELEMENT memory-device (property*, description?, sectors*)> 61<!ATTLIST memory-device 62 address CDATA #REQUIRED 63 size CDATA #REQUIRED 64 type CDATA #REQUIRED 65 device CDATA #IMPLIED> 66 67<!ELEMENT description (#PCDATA)> 68<!ELEMENT property (#PCDATA)> 69<!ATTLIST property name CDATA #REQUIRED> 70<!ELEMENT sectors EMPTY> 71<!ATTLIST sectors 72 size CDATA #REQUIRED 73 count CDATA #REQUIRED> 74 75<!-- Definition of default option values for each debug interface --> 76<!ELEMENT debuggerDefaults (debugInterface*)> 77<!ELEMENT debugInterface (option*)> 78<!ATTLIST debugInterface 79 name CDATA #REQUIRED 80> 81<!ELEMENT option EMPTY> 82<!ATTLIST option 83 name CDATA #REQUIRED 84 defaultValue CDATA #REQUIRED 85> 86 87<!ENTITY % gdbtarget SYSTEM "gdb-target.dtd"> 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"><board></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"><properties></code>, 104 <code class="function"><feature></code>, 105 <code class="function"><initialize></code> and 106 <code class="function"><memory-map></code> 107 elements.</p></dd><dt><span class="term"><code class="function"><properties></code></span></dt><dd><p> 108 The <code class="function"><properties></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"><description></code> element.</p><p> 112 It can also contain <code class="function"><property></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"><property></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"><initialize></code></span></dt><dd><p> 140 The <code class="function"><initialize></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"><write-register></code>, 144 <code class="function"><write-memory></code> and 145 <code class="function"><delay></code> 146 elements.</p></dd><dt><span class="term"><code class="function"><feature></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"><memory-map></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"><memory-device></code> elements. 158 </p></dd><dt><span class="term"><code class="function"><memory-device></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"><memory-device></code> element can contain a 173 <code class="function"><description></code> element. 174 </p></dd><dt><span class="term"><code class="function"><write-register></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"><write-memory></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"><delay></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"><description></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"><property></code></span></dt><dd><p> 196 The <code class="function"><property></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"><property></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