📄 dfubuild.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Copyright 2001, 2002 Cambridge Silicon Radio Limited -->
<html>
<head>
<title>CSR DFU Tools - dfubuild</title>
</head>
<body bgcolor="white">
<h1 align=center>CSR DFU Tools - dfubuild</h1>
The <code>dfubuild</code> tool is used to convert a selection of firmware and <A HREF="psfile.html" TITLE="Persistent Store">persistent store files</a> into a single file suitable for download via DFU. See the description below for details.
<h2><a name="ca">Constructing a DFU File</a></h2>
<dl>
<dt>Usage</dt>
<dd>
<dl>
<dt><code><b>dfubuild</b></code></dt>
<dd><code>
[-v] [-pedantic] [-t 0|1|2|3]<br>
[-c <i>COMMANDLINEFILE</i> [<i>COMMANDLINEFILE</i> ...]]<br>
-f <i>DESTFILE</i><br>
-uv <i>VENDOR_ID</i> -up <i>PRODUCT_ID</i><br>
[-i <i>INFORMATION</i>] [-ui <i>LONGINFORMATION</i>]<br>
[-s <i>STACKPROGFILE</i> [<i>STACKPROGFILE</i> ...] [-d <i>STACKDATAFILE</i> [<i>STACKDATAFILE</i> ...]]]<br>
[-a <i>APPFILE</i> [<i>APPFILE</i> ...]]<br>
[-p3 <i>PSFILE</i> <i>STACKPSFILE</i> <i>APPPSFILE</i> [<i>PSFILE</i> <i>STACKPSFILE</i> <i>APPPSFILE</i> ...]]<br>
[-h <i>FILESYSTEM</i> [<i>FILESYSTEM</i> ...]]
</code></dd>
</dl>
</dd>
<dt>Parameters</dt>
<dd>
<dl>
<dt><code>-v</code></dt>
<dd>Run in verbose mode, displaying detailed information about the actions performed.</dd>
<dt><code>-pedantic</code></dt>
<dd>Fail if redundant files have been specified, i.e. if the files would be omitted from the resulting DFU file because they could never be used.</dd>
<dt><code>-t 0|1|2|3</code></dt>
<dd>
The format of DFU file to generate:
<table border=1 align=center>
<tr>
<th>Option</th>
<th>Output file</th>
<th>On-chip loader versions</th>
<th>BlueCore variants</th>
</tr>
<tr>
<td align=center><code>-t 0</code></td>
<td align=center>"2000" format</td>
<td><code>HCI-11.0</code> or earlier</td>
<td>BlueCore01</td>
</tr>
<tr>
<td align=center><code>-t 1</code></td>
<td align=center>"2001" format</td>
<td><code>HCI-10.0</code> or later</td>
<td>BlueCore01</td>
</tr>
<tr>
<td align=center><code>-t 2</code></td>
<td align=center>"2002" format</td>
<td><code>HCI-10.0</code> or later</td>
<td>Bluecore1, BlueCore2 or BlueCore3</td>
</tr>
<tr>
<td align=center><code>-t 3</code></td>
<td align=center>"2003" format</td>
<td><code>HCI-10.0</code> or later</td>
<td>Bluecore1, BlueCore2 or BlueCore3</td>
</tr>
</table>
If not specified then the default of <code>-t 2</code> is assumed.
If a -h parameter is specified then the version is set as if <code>-t 3</code> was specified.
</dd>
<dt><code>-c <i>COMMANDLINEFILE</i> [<i>COMMANDLINEFILE</i> ...]</code></dt>
<dd>Names of one or more files containing additional options to be appended to the command line. Comments may be included in the files by placing a hash (<code>#</code>) as the first character on the line; the remainder of the line is then ignored. Newlines are replaced by single spaces, except at the end of comment lines. Special processing of any character may be disabled by prefixing it with a backslash (<code>\</code>), allowing quotation marks to be included within information strings.</dd>
<dt><code>-f <i>DESTFILE</i></code></dt>
<dd>Name of the file to output. This would usually have a <code>.dfu</code> extension.</dd>
<dt><code>-uv <i>VENDOR_ID</i></code></dt>
<dd>The value to be placed in the <code><i>idVendor</i></code> field of the DFU suffix. This should be the same as the corresponding field from the target device's USB device descriptor, e.g. <code>0x0a12</code> for CSR devices.</dd>
<dt><code>-up <i>PRODUCT_ID</i></code></dt>
<dd>The value to be placed in the <code><i>idProduct</i></code> field of the DFU suffix. This should be the same as the corresponding field from the device's USB device descriptor, e.g. <code>0x0001</code> for CSR devices.</dd>
<dt><code>-i <i>INFORMATION</i></code></dt>
<dd>The short information string to include in the DFU file. This may be up to 64 characters long, and should consist entirely of 7-bit printable ASCII characters only.</dd>
<dt><code>-ui <i>LONGINFORMATION</i></code></dt>
<dd>The long information string to include in the DFU file. This may be of arbitrary length, and can contain any printable Unicode characters.</dd>
<dt><code>-s <i>STACKPROGFILE</i> [<i>STACKPROGFILE</i> ...]</code></dt>
<dd>Names of one or more <code>.xpv</code> files containing the stack software's program code for different BlueCore variants and flash geometries.</dd>
<dt><code>-d <i>STACKDATAFILE</i> [<i>STACKDATAFILE</i> ...]</code></dt>
<dd>Names of one or more <code>.xdv</code> files containing the stack software's constants. If not specified then the names are constructed by replacing the <code>.xpv</code> extensions of the <code><i>STACKPROGFILE</i></code> parameters with <code>.xdv</code>.</dd>
<dt><code>-a <i>APPFILE</i> [<i>APPFILE</i> ...]</code></dt>
<dd>Names of one or more <code>.app</code> files containing the application software for different stack software.</dd>
<dt><code>-p3 <i>PSFILE</i> <i>STACKPSFILE</i> <i>APPPSFILE</i> [<i>PSFILE</i> <i>STACKPSFILE</i> <i>APPPSFILE</i> ...]</code></dt>
<dd>
Names of <code>.psr</code> files containing persistent store data for different BlueCore variants. Theses are listed as triples of:
<ol>
<li><code><i>PSFILE</i></code> - unprotected persistent store data;</li>
<li><code><i>STACKPSFILE</i></code> - stack software's persistent store data;</li>
<li><code><i>APPPSFILE</i></code> - application software's persistent store data.</li>
</ol>
Missing files in a triple should be indicated by a period (<code>.</code>).
</dd>
<dt><code>-h <i>FILESYSTEM</i> [<i>FILESYSTEM</i> ...]</code></dt>
<dd>Names of one or more <code>.fs</code> files containing the file system for different stack software.</dd>
</dl>
</dd>
<dt>Remarks</dt>
<dd>
Construct a DFU file containing any combination of the following six components:
<ul>
<li>Stack software
<li>Application software
<li>Unprotected persistent store
<li>Protected stack persistent store
<li>Protected application persistent store
<li>File system
</ul>
Specifying the input files for a particular component results in that component being included in the output file. If signature checking is being used then the input files must have been signed using <A HREF="dfusign.html" TITLE="dfusign"><code>dfusign</code></A>.
<p>
If the <code>-t 2</code> or <code>-t 3</code> option is specified (or defaulted) to generate a "2002" or "2003" format file then multiple versions of each component may be included, with the appropriate combination for a particular module selected during download:
<ul>
<li>Stack software - Selected based on the BlueCore variant and flash geometry (sector layout and size).</li>
<li>Application software - Selected based on the stack software's VM version number and supported trap sets.</li>
<li>Persistent store - Selected based on the BlueCore variant (specified within the <code>.psr</code> files).</li>
<li>File System - Selected based on the stack software's FS version, and if the file system contains an application, then also the stack software's VM version number and supported trap sets.</li>
</ul>
<p>
The ordering of files is important; the BlueCore's loader software will select the first appropriate file for each component.
<p>
In firmware which supports file systems, the application in the file system takes precedence over the application in the application space. Care should be taken in contructing DFU files with both application and file system components.
<p>
The <code><i>INFORMATION</i></code> and <code><i>LONGINFORMATION</i></code> strings should accurately describe the content of the DFU file. As a guideline, this should normally state the type of target device and the firmware version(s) included. If only one of these is specified then the other is generated automatically.
<p>
The <code><i>VENDOR_ID</i></code> and <code><i>PRODUCT_ID</i></code> values may be specified in either decimal (the default) or hexadecimal (by prefixing the value with <code>0x</code>). These values must either match the configuration of the target device, or be set of <code>0xffff</code> for the field to be ignored.
<p>
Note that the <code><i>bcdDevice</i></code> field of the DFU suffix is automatically set appropriately based on the files being combined. If a <code><i>STACKPROGFILE</i></code> has been specified then the <code><i>bcdDevice</i></code> field is set to the software build identifier (as used for the corresponding field of the device's USB device descriptor), otherwise <code>0xffff</code> is used to indicate that the field is not used.
</dd>
<dt>Example</dt>
<dd>
<code>dfubuild -v -pedantic -t 2 -f stack.dfu -uv 0xa12 -up 1 -ui "CSR BlueCore firmware version 1.00" -s stack_bc01.xpv stack_bc02.xpv</code>
</dd>
</dl>
<p align=right><font size="-1">© 2001, 2002, 2003 <a href="http://www.csr.com" title="CSR" target="_blank">CSR</a></font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -