Beruflich Dokumente
Kultur Dokumente
Users Manual
September 2003 Revision 1.0
Information in this document is provided in connection with Intel Products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined. Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. This document and the software described in it are furnished under license and may only be used or copied in accordance with the terms of the license. The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in this document or any software that may be provided in association with this document. Except as permitted by such license, no part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means without the express written consent of Intel Corporation.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an ordering number and are referenced in this document, or other Intel literature may be obtained by calling 1-800-548-4725 or by visiting Intel's website at http://www.intel.com. Copyright Intel Corporation, 2003 Intel and Intel XScale are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. * Other names and brands may be claimed as the property of others.
Contents
Contents
1 Introduction...................................................................................................................................... 5 1.1 1.2 1.3 1.4 2 2.1 About this Manual ................................................................................................................. 6 Related Documentation ........................................................................................................7 Requirements ....................................................................................................................... 8 Conventions .......................................................................................................................... 9 Command Line Syntax .......................................................................................................12 2.1.1 Order of Arguments ...............................................................................................13 2.1.2 Option Arguments and their Order.........................................................................13 Option Overview .................................................................................................................14 -a.........................................................................................................................................16 -b.........................................................................................................................................17 -bb.......................................................................................................................................18 -bd.......................................................................................................................................19 -check .................................................................................................................................20 -e.........................................................................................................................................21 -f..........................................................................................................................................22 -help....................................................................................................................................23 -l..........................................................................................................................................24 -lock ....................................................................................................................................25 -n.........................................................................................................................................26 -o.........................................................................................................................................27 -p.........................................................................................................................................28 -t..........................................................................................................................................29 -tgttype................................................................................................................................30 -u.........................................................................................................................................31 -unlock ................................................................................................................................32 -v.........................................................................................................................................33 -verify ..................................................................................................................................34
2.2 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 A
Index .......................................................................................................................................................37
Contents
Figures
1 Structure of the Configuration File boards.ini ............................................................................. 35
Tables
1 2 3 Intel XFlash Option Overview ..................................................................................................... 14 Available Binary Formats of the Image File................................................................................ 22 Flashnames for the Option -n ..................................................................................................... 26
Revision History
Date September 2003 Revision 1.0 Description SDT 1.2 Gold release for the Intel XFlash 1.0 and higher.
Introduction
The Intel XFlash is a command line tool to access the flash memory of an embedded system target board. It is used to write or erase data or code within a flash memory. It supports the following features:
Support of several types of target boards Support of all types of flash memory on the supported target board Erasing flash memory Writing flash memory Verifying flash memory Checking flash memory
Introduction
1.1
Chapter 2, General Usage describes the command line syntax to start the Intel XFlash and
provides an option overview.
Chapter 3, Intel XFlash Options describes each option with the syntax, description, and an
example.
Introduction
1.2
Related Documentation
This section provides an overview of documentation which supplements this manual. These are:
Intel XDB Debugger Reference Manual, order number 278461 Intel XDB JTAG Debugger Users Manual, order number 278471
Furthermore, Release Notes are provided. Release Notes describe features or changes of the product that are not documented in the corresponding manual. For more information on the development board, please refer to the manual associated with the board you are using. Information on the Macraigor Systems OCDemon* interface is provided on the World Wide Web on the following Website: www.macraigor.com
Introduction
1.3
Requirements
To use the Intel XFlash, the following environment is required:
Microsoft* Windows* 2000 Professional or Windows* XP Professional as host platform The Intel XFlash installed on your host platform The Intel XDB JTAG Debugger installed on your host platform A development board A parallel cable A Macraigor Systems OCDemon* Raven ARM 20 JTAG interface
Introduction
1.4
Conventions
This manual uses several notational and typographical conventions to visually differentiate text. The following table explains these conventions.
Convention Italics Bold Plain Courier Italic Courier GUI-elements <> | ,... [] {} "[" "]" "{" "}" "|" Description Italics identify variables and introduce new terminology. Titles of manuals are in italic font. Italics are used for emphasis. Used to specify something important. Used to specify written code. Used to specify parameters. Elements of the graphical user interface are written in this style. Filenames and function names to be defined are delimited by <>. Used to specify an alternative between several items. Used to specify an item which may be repeated. Used to specify optional items. Used to specify an optional item which may be repeated. Writing a metacharacter in quotation marks negates the syntactical meaning stated above; the character is taken as a literal. For example, the line "[" X "]" [ Y ] denotes the letter X enclosed in brackets, optionally followed by the letter Y.
Introduction
10
General Usage
This chapter provides the general usage of the Intel XFlash, including:
Section 2.1, Command Line Syntax on page 12 describes the command line syntax and
shows a simple example. It also describes the mandatory order of options.
11
General Usage
2.1
imagefile
-p platform -t platform
options
12
General Usage
The command line above burns the image file led.bin, located in the directory C:\working into the flash memory of the board. Example 2. Starting the Intel XFlash
xflash ..\working\led.bin -p DPXA250
Assuming the Intel XFlash is installed in Programs\Xflash, the command line above burns the image file led.bin, located in the directory Programs\working into the flash memory of the board.
2.1.1
Order of Arguments
The order of arguments is important. Please see the command line syntax for details and Section 2.1.2, Option Arguments and their Order on page 13.
2.1.2
13
General Usage
2.2
Option Overview
The following table contains a brief description of available command line options. Column Mode shows if the option is in standard mode or in expert mode available. For a detailed description refer to Chapter 3, Intel XFlash Options.
Warning:
The order of options is mandatory. Please refer to Section 2.1.2, Option Arguments and their Order on page 13.
X X X X X X X X X X
-verify
14
This chapter describes all available command line options in detail. The syntax, a description and examples are provided. For the usage of options and an overview, refer to Chapter 2, General Usage. Warning: The order of options is mandatory. Please refer to Section 2.1.2, Option Arguments and their Order on page 13.
15
3.1
-a
Syntax: -a offset Description:
The -a option defines the offset offset for the image file. A binary is burned at the flash memorys base address + offset. A hex file is burned at the flash memorys base address + contained address + offset. The default value of offset is 0x0. Example 3. Option -a
xflash hello.bin -p DPXA250 -a 0x0F
The flash memory of the board is burned at address 0x0000000F because the flash starts at 0x0.
16
3.2
-b
Syntax: -b blocknumber | startblock-endblock
Note:
The option -b specifies which block or which block range of the flash memory is used. The parameter blocknumber defines the block number. In case of a block range, startblock defines the first block number and endblock the last block number. Note that option -b requires option -t. Only one of -b, -bb, -bd may be set. If none of them is set, all blocks are used. You may combine this option with one of -e, -v, -lock, or -unlock. Example 4. Option -b
xflash -t DPXA250 -unlock -b 0-10
The command line above unlocks the blocks 0-10 of the flash memory.
Further Information:
Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.6, -e on page 21 Section 3.10, -lock on page 25 Section 3.14, -t on page 29 Section 3.17, -unlock on page 32 Section 3.18, -v on page 33
17
3.3
-bb
Syntax: -bb
Note:
The option -bb specifies that all boot blocks are used. Note that option -bb requires option -t. Only one of -b, -bb, -bd may be set. If none of them is set, all blocks are used. You may combine this option with one of -e, -v, -lock, or -unlock. Example 5. Option -bb
xflash -t DPXA250 -unlock -bb
The command line above unlocks all data blocks of the flash memory.
Further Information:
Section 3.2, -b on page 17 Section 3.4, -bd on page 19 Section 3.6, -e on page 21 Section 3.10, -lock on page 25 Section 3.14, -t on page 29 Section 3.17, -unlock on page 32 Section 3.18, -v on page 33
18
3.4
-bd
Syntax: -bd
Note:
The option -bd specifies that all data blocks are used. Note that option -bd requires option -t. Only one of -b, -bb, -bd may be set. If none of them is set, all blocks are used. You may combine this option with one of -e, -v, -lock, or -unlock. Example 6. Option -bb
xflash -t DPXA250 -unlock -bd
The command line above unlocks all boot blocks of the flash memory.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.6, -e on page 21 Section 3.10, -lock on page 25 Section 3.14, -t on page 29 Section 3.17, -unlock on page 32 Section 3.18, -v on page 33
19
3.5
-check
Syntax: -check
Note:
The option -check can only be combined with -b, -bb, -bd, not with other options.
Description:
When the option -check is set, the Intel XFlash checks if the whole flash memory has been erased. This is useful to check whether the memory is physically OK or not. The option -check can only be combined with the options -b, -bd, -bb, not with other options. If the option -check is omitted, no check is performed. Example 7. Option -check
xflash hello.bin -p DPXA250 -check
This command line checks if the flash memory of the board has been erased.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19
20
3.6
-e
Syntax: -e Description:
The option -e erases the complete flash memory, or erases specific blocks of the flash memory when combined with one of the options -b, -bb, -bd. If the option -e is omitted, all used blocks are automatically erased during the burn process. Only one of -e, -v, -lock, -unlock may be set. Example 8. Option -e
xflash -t DPXA250 -e -b 0-10
The command line above erases the blocks 0-10 of the flash memory.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.10, -lock on page 25 Section 3.17, -unlock on page 32 Section 3.18, -v on page 33
21
3.7
-f
Syntax: -fformat Description:
The option -f enables to specify the binary format format of the image file. If the option -f is omitted, the Intel XFlash automatically detects the image file format. The parameter format may have one of the following values: Table 2. Available Binary Formats of the Image File
Format b h i Description absolute binary format Motorola* HEX format Intel HEX format
Example 9. Option -f
xflash hello.hx -p DPXA250 -fi
This command line burns the flash memory of the board. The image file hello.hx contains the Intel HEX format.
22
3.8
-help
Syntax: -help Description:
The option -help displays an overview of available options in standard as well as expert mode. Example 10. Option -help
xflash -help
23
3.9
-l
Syntax: -l address
Note:
The option -l enables to set the start address address of the relocatable burn algorithm in the flash memory. If the option -l is omitted, the Intel XFlash assumes the boards default. See also Appendix A, Configuration File and Initialization. Example 11. Option -l
xflash hello.bin -t DPXA250 -l 0xA0100000
Assuming an application has already been loaded to addresses 0xA0000000..0xA00FFFFF, the command line above loads the start address of the burn algorithm at 0xA01000000.
Further Information:
24
3.10
-lock
Syntax: -lock Description:
The option -lock locks the complete flash memory, or locks specific blocks of the flash memory when combined with one of the options -b, -bb, -bd. If -lock is omitted, all used blocks are automatically locked during the burn process. Only one of -e, -v, -lock, -unlock may be set. Example 12. Option -lock
xflash -p DPXA250 -lock -b 0-10
The command line above locks the blocks 0-10 of the flash memory.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.6, -e on page 21 Section 3.17, -unlock on page 32 Section 3.18, -v on page 33
25
3.11
-n
Syntax: -n flashname Description:
The option -n sets the name of the targets external flash memory to flashname. The parameter flashname may have one of the values listed in Table 3. If the option -n is omitted, the Intel XFlash assumes the boards standard external flash memory. Table 3. Flashnames for the Option -n
Flash Type on Board B C IQ80310 J3 J3 K3 K3 MSA of PXA800F PXA262 internal XScale of PXA800F K18 K18 W30 flashname GENPID_SIMPLE GENPID_IQ80310 GENPID_8 GENPID_16 GENPID_S_800F_MSA GENPID_PXA262 GENPID_S_800F_XS
This command line burns the flash memory of the board using the external flash memory.
26
3.12
-o
Syntax: -o
Note:
The option -o burns the flash without erasing the used blocks. If the option -o is omitted, all blocks are automatically erased before the flash memory is burned. Example 14. Option -o
xflash hello.bin -t DBPXA250 -o
The command line above overwrites all blocks during the burn process.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.14, -t on page 29
27
3.13
-p
Syntax: -p platform
Note:
The option -p starts the Intel XFlash in standard mode. A specific set of options is enabled for this mode. For an overview of enabled options in standard mode see Section 2.2, Option Overview on page 14. The parameter platform specifies the board being used. All parameters available for platform are listed in the boards.ini file and are case-sensitive. For more information on the parameter list refer to Appendix A, Configuration File and Initialization. Example 15. Option -p
xflash hello.bin -p DBPXA250
This command line burns the flash memory of the board using the image file hello.bin.
Further Information:
28
3.14
-t
Syntax: -t platform
Note:
The option -t starts the Intel XFlash in expert mode. All options of the standard mode and an additional set of options are enabled for this mode. For an overview of enabled options in expert mode see Section 2.2, Option Overview on page 14. The parameter platform specifies the board being used. All parameters available for platform are listed in the boards.ini file and are case-sensitive. For more information on the parameter list refer to Appendix A, Configuration File and Initialization. Example 16. Option -p
xflash hello.bin -t DBPXA250
This command line burns the flash memory of the board in expert mode using the image file hello.bin.
Further Information:
29
3.15
-tgttype
Syntax: -tgttype "tgt" Description:
The option -tgttype sets the target connection interface to tgt. If the option -tgttype is omitted, the Intel XFlash assumes the Macraigor Systems OCDemon* Raven ARM 20 JTAG interface. The parameter tgt may have one of the following values:
tgt JTAG XScale Description Specifies the Macraigor Systems OCDemon* Raven ARM 20 JTAG interface.
This command line burns the flash memory of the board using the Macraigor Systems OCDemon* Raven ARM 20 JTAG interface.
30
3.16
-u
Syntax: -u base_address Description:
The option -u sets the base address of the flash memory to the address base_address. The parameter base_address is a hexadecimal value. If the option -u is omitted, the Intel XFlash assumes the boards default. See also Appendix A, Configuration File and Initialization. Example 18. Option -u
xflash hello.bin -p DBPXA250 -u 0x100000
This command line burns the flash memory of the board. The base address of the flash memory is set to 0x0B.
31
3.17
-unlock
Syntax: -unlock Description:
The option -unlock unlocks the complete flash memory, or unlocks specific blocks of the flash memory when combined with one of the options -b, -bb, -bd. If -unlock is omitted, all used blocks are automatically unlocked during the burn process. Only one of -e, -v, -lock, -unlock may be set. Example 19. Option -lock
xflash -t DBPXA250 -unlock -b 0-10
The command line above unlocks the blocks 0-10 of the flash memory.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.6, -e on page 21 Section 3.10, -lock on page 25 Section 3.18, -v on page 33
32
3.18
-v
Syntax: -v Description:
The option -v compares the contents of the flash memory with the image file. No burn process is performed. If -v is omitted, no comparison takes place. Only one of -e, -v, -lock, -unlock may be set. The result of the comparison is printed to the screen using a message like the following ones: If the comparison fails:
... Progress: 0% Verify memory failed at address 0x4c. Stop verifying Error when verifying file!
The contents of the flash memory (block 0-10) is compared with the image file hello.bin.
Further Information:
Section 3.2, -b on page 17 Section 3.3, -bb on page 18 Section 3.4, -bd on page 19 Section 3.6, -e on page 21 Section 3.10, -lock on page 25 Section 3.17, -unlock on page 32 Section 3.19, -verify on page 34
33
3.19
-verify
Syntax: -verify Description:
The option -verify compares the contents of the flash memory with the image file after the burn process. The result of the comparison is printed to the screen using a message shown in Section 3.18, -v on page 33. If the option -verify is omitted, the Intel XFlash performs a burn process only. Example 21. Option -verify
xflash hello.bin -p DBPXA250 -verify
The flash memory of the board is burned. After the burn process has been completed, the contents of the flash memory is compared with the image file.
Further Information:
34
The Intel XFlash uses a board configuration file boards.ini.The configuration file contains board-specific default settings such as the flash type of the board or the base address of the flash memory. The installation of the Intel XFlash contains a predefined boards.ini file and initialization scripts. Figure 1 shows the structure of this configuration file. Figure 1. Structure of the Configuration File boards.ini
[GLOBAL] connection=parameter [platform] standardflash=flashname monaddr=maddress scanchain=name algoaddr=address baseaddr=base_address ... ... ... [platform] standardflash=flashname monaddr=maddress scanchain=name algoaddr=address baseaddr=base_address
Global section
Platform section 1
Platform section n
The configuration file contains two types of sections: a global section and one or more platform sections. The global section starts with [GLOBAL] followed by the target connection connection=parameter. The parameter parameter specifies the port, e.g. lpt1:1. The port may be changed. The platform section starts with [platform] where platform is the name of the platform. Each platform section contains the following lines:
standardflash=flashname monaddr=maddress scanchain=name algoaddr=address Defines the default flashname flashname of the platform. To change the default, refer to Section 3.11, -n on page 26. Defines the default address maddress that is used with the option -monaddr in the debugger startup command. Defines the default board type name in the JTAG chain. Defines the default start address address of the relocatable burn algorithm in the flash memory. The default value is 0xa. To change the default, refer to Section 3.9, -l on page 24. Defines the default base address base_address of the flash memory. To change the default, refer to Section 3.16, -u on page 31.
baseaddr=base_address
The Intel XFlash uses an associated initialization script <filename>.xdb for the debugger as well. Where filename is the name of the platform specified in the configuration file as platform.
35
36
Index
Symbols
-a, option 14, 16 -b, option 14, 17 -bb, option 14, 18 -bd, option 14, 19 -check, option 14, 20 -e, option 14, 21 -f, option 14, 22 -help, option 14, 23 -l, option 14, 24 -lock, option 14, 25 -n, option 14, 26 -o, option 14, 27 -p, option 12, 14, 28 -t, option 12, 14, 29 -tgttype, option 14, 30 -u, option 14, 31 -unlock, option 14, 32 -v, option 14, 33 -verify, option 14, 34 data, overwriting 27 defaults base address 35 board type 35 flashname 35 start address 35 startup address 35 displaying help list 23 documentation, related documentation 7
E
erasing flash memory 21 expert mode 12, 29
F
files boards.ini 35 configuration file 35 image file 12 comparing with flash memory 33, 34 setting binary format 22 flash memory checking 20 comparing with image file 33, 34 erasing 21 locking 25 setting name 26 unlocking 32 XFlash tool 5 flashname 35 format setting binary format of image file 22
A
arguments, order 13
B
base address 31, 35 binary format 22 blocks setting blocks to be used 17 setting boot blocks to be used 18 setting data blocks to be used 19 board type 35 boards.ini, file 35 boot blocks 18 burn algorithm, start address 24
G
general usage 11 global section 35
C
checking flash memory 20 command line syntax expert mode 12 standard mode 12 comparing flash memory with image file 33, 34 configuration file 35 conventions of this manual 9
H
help list 23
I
image file 12 comparing with flash memory 33, 34 setting binary format 22 initialization script 35 Intel XFlash general usage 1114 introduction 5
D
data blocks 19
37
options 1534
L
locking flash memory 25
P
platform 12 platform section 35
M
manuals, related manuals 7
R
requirements 8
N
names, flashname 35
S
setting base address 31 binary format of image file 22 blocks 17 boot blocks 18 data blocks 19 name of external flash 26 start address of burn algorithm 24 target connection 30 standard mode 12, 28 start address 35 of burn algorithm 24 startup address 35
O
options 1534 order 13 overview 14 -a 14, 16 -b 14, 17 -bb 14, 18 -bd 14, 19 -check 14, 20 -e 14, 21 -f 14, 22 -help 14, 23 -l 14, 24 -lock 14, 25 -n 14, 26 -o 14, 27 -p 12, 14, 28 -t 12, 14, 29 -tgttype 14, 30 -u 14, 31 -unlock 14, 32 -v 14, 33 -verify 14, 34 order of arguments 13
T
target connection 30
U
unlocking flash memory 32
X
XFlash tool, introduction 5
38