WR Workbench Ocd Command Ref 2.3
WR Workbench Ocd Command Ref 2.3
2.3
Corporate Headquarters
Wind River Systems, Inc.
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
For additional contact information, please visit the Wind River URL:
http://www.windriver.com
For information on how to contact Customer Support, please visit the following URL:
http://www.windriver.com/support
3 May 05
Part #: DOC-15504-ZD-00
Contents
1 Introduction .......................................................................................... 1
iii
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
iv
Contents
v
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
vi
Contents
vii
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
viii
1
Introduction
1.1 Overview
This manual provides a reference guide for all low-level Wind River ICE SX and
Wind River Probe commands. The commands are listed alphabetically and include
descriptions, syntax information, and examples. Note that some commands apply
only to certain emulators; those that are specific to one emulator are so marked, for
example Wind River ICE SX Only.
The Wind River ICE SX emulator provides Ethernet support and allows for remote
operation on any TCP/IP network. Network operation has its own subset of
commands, which are described in4. Wind River ICE Network Operation Commands.
Wind River ICE SX and Wind River Probe use a standard ASCII protocol with
XON/XOFF flow control.There are two 512-character buffers, one for commands
and the other for responses. A command is not interpreted until a termination
character is received. At most, only two commands are stored in the character
buffer at a given time: the command that is executing, and the one that is about to
be executed.
Character processing is case insensitive, with the exception of code and data
symbols. A command name is at least two characters in length. Most commands
can accept optional arguments or parameters. A space character is used as the
delimiting character between command names and arguments.
1
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
2
2
Operational Modes
When the >BKM> prompt displays, Debug mode is both enabled and active,
meaning that no code is currently executing and the target is stopped. At the
prompt, users can enter and execute any valid Wind River terminal commands.
You can enter Debug mode any time you connect to your target, any time you use
the IN or INN command, or any time you stop your target from running by typing
Ctrl+C or Ctrl+X. Your target is also placed in Debug mode any time a software
breakpoint is hit.
The >RUN> prompt only displays after you issue a GO command. The target
executes application code in Real-Time; Debug mode is enabled, but not currently
active.
In > RUN > mode, you can enter commands to capture a target snapshot. A
snapshot is a view of the data on your target retrieved by the debugger by
instantaneously forcing the target into Debug mode and then returning it to
Real-Time execution.
3
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Error mode occurs when the unit fails to establish debug mode communications.
There are several possible reasons for this; see the Establishing Communications
chapter of your emulator’s Hardware Reference Guide for more information.
The >PFA> profiling prompt indicates that the emulator is profiling your code (the
performance analysis features are activated with Graphics mode turned off). To
return to a >BKM> prompt, type Ctrl+C or Ctrl+X. In Profiling mode, you can type
a DIP command to view the performance data.
4
3
Low-Level Commands
Use the ASM command to write to memory using instructions instead of opcode.
Syntax
There are three different ways to use this command. Use the first syntax to specify
the start address and the instruction on the same line.
ASM start_addr instruction
5
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The third syntax requires no parameters, and merely places you into ASM mode,
taking the address of your PC as the start address.
ASM Enter
Entering a period (.) at the >ASM> prompt returns you to a >BKM> prompt.
ASM> .
Example
The first example displays memory at 0 and then uses the first syntax for the ASM
command. Then the code is disassembled at 0.
>BKM>dm 0
00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
>BKM>asm 0 addi r2,r2,0x1
>BKM>di 0 1
$00000000 : 0x38420001 :ppc addi R2,R2,0x1
The second example places the emulator into ASM mode, at starting address 20.
Entering a period (.) at the >ASM> prompt returns you to a >BKM> prompt. Then
the code is disassembled at 20.
>BKM>asm 20
$00000020 : 0x00000000 :ppc dc.l 0x0 ASM> addi r2,r2,0x1
$00000024 : 0x00000000 :ppc dc.l 0x0 ASM> .
>BKM>di 20 1
$00000020 : 0x38420001 :ppc addi R2,R2,0x1
>BKM>
The third example places the emulator into ASM mode, taking the current address
of the PC as the starting address. The code is then disassembled at the starting
address of the PC, in this case 50.
>BKM>asm
$00000050 : 0x00000000 :ppc dc.l 0x0 ASM> addi
r2,r2,0x1
$00000054 : 0x00000000 :ppc dc.l 0x0 ASM> .
>BKM>di 50 1
$00000050 : 0x38420001 :ppc addi R2,R2,0x1
>BKM>
The Boot Line (BL) commands are used to set Linux structures and registers. There
are several BL commands with various functions, as described below.
6
3 Low-Level Commands
3.1 Low-Level Commands
NOTE: To use the BL commands you must have both the CF BL and CF MMU
options set to ENABLE.
3
BL ADD REGISTER
This command will enter and present a menu prompting for additional entries for
items to be added into the REGISTER table held in NVRAM. Sequentially, each
entry field will be prompted with the current contents. A new value may be
entered. An RTN/ENTER will keep the existing value and advance to the next field.
To exit the menu, type a period.
Information can be added to the BL ADD REGISTER command to add a new item
at the end of the REGISTER table without going through the menu:
Syntax:
BL ADD REGISTER description type value
Example:
BL ADD REGISTER R6 E(R3) + S(0:19) + S(1)
R6 is the CPU Register selected; E(R3) stands for the value of the entry called R3 in
the REGISTER table; S(0:19) is the sum of the sizes of entries 0 through 19 in the
STRUCTURE table; and S(1) is the size of entry 1 in the STRUCTURE table.
All these arguments must be valid. That is, if there is no entry called R3 in the
REGISTER table, the BL ADD REGISTER command will abort and return a syntax
error.
BL ADD STRUCTURE
This command will enter and present a menu prompting for additional entries for
items to be added into the STRUCTURE table held in NVRAM. Sequentially, each
entry field will be prompted with the current contents. A new value may be
7
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
entered. An RTN/ENTER will keep the existing value and advance to the next field.
To exit the menu, type a period.
Information can be added to the BL ADD STRUCTURE command to add a new
item at the end of the STRUCTURE table without going through the menu:
Syntax:
BL ADD STRUCTURE description type value
Example:
BL ADD STRUCTURE MemSize U32 0x04000000
BL DELETE
Use this command to delete the REGISTER and STRUCTURE tables held in
NVRAM.
Syntax:
BL DELETE [REGISTER,STRUCTURE]
BL DISPLAY
Use this command to display the REGISTER and STRUCTURE tables held in
NVRAM.
Syntax:
BL DISPLAY [REGISTER,STRUCTURE]
8
3 Low-Level Commands
3.1 Low-Level Commands
BL INIT
This command will load the BL parameters into target memory and registers
without performing an IN command. This is useful in cases where the bootROM is
3
run to initialize the target board and the emulator is used to establish the boot line
parameters.
BL MODIFY
This command will display and prompt to modify the field contained in the
specified entry item. Menus are similar to the ADD command menus. Press ENTER
to go on to the next menu item without modifying the current value. Type a period
(.) to exit.
Syntax:
BL MODIFY [REGISTER, STRUCTURE] entryIndex
BL UPLOAD
Use this command to upload and display the STRUCTURE and REGISTER tables
held in NVRAM in playback-command format. This enables the user to cut and
paste into a host-resident file for later playback as an emulator command-script
file. This same file can be concatenated with the typical target initialization register
file normally used to set up the primitives of the target.
Syntax:
BL UPLOAD [REGISTER, STRUCTURE]
Entering BL UPLOAD without specifying a table will upload and display both
tables.
This command disables all or one of the currently enabled software breakpoints. If
a breakpoint is disabled, it is not installed in target memory prior to execution.
Using the BD command allows the emulator to remember the breakpoint for future
use, unlike the RB (remove breakpoint) command, which deletes the breakpoint
entirely.
9
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
BD address
address — The address where the breakpoint is installed. Use the DB command to
display the address. Previously defined symbol names are allowed for address. If
address is not specified, the BD command will disable ALL breakpoints.
Example
The following example disables a breakpoint at address EA0000. First, display all
breakpoints, including the current status. Then disable the breakpoint. Finally,
verify the status of the breakpoint by issuing a DB command. Notice the status
change of the cmp flags.
BKM>DB
1. 0Ea0000 data mask = 000ff cmp_flags = enabled Word_cmp_BEQ
BKM>BD EA0000
BKM>DB
1. 0EA0000 data mask = 000ff cmp_flags = disabled Word_cmp_BEQ
BKM>
This command enables all or one of the currently disabled software breakpoints.
Syntax
BE address
address — This is the address where the breakpoint is installed (use the DB
command to display the address). Previously defined symbol names are allowed
for address. If address is not specified, the BE command will enable all breakpoints.
Example
For this example, enable the breakpoint at address EA0000, which was previously
disabled. First, display all breakpoints and their status. Then enable the
breakpoint. Finally verify the status of the breakpoint by issuing a DB command.
Notice the status change of the cmp_flags.
BKM>DB
1. 0EA0000 data mask = 000ff cmp_flags = disabled Word_cmp_BEQ
BKM>BE EA0000
BKM>DB
10
3 Low-Level Commands
3.1 Low-Level Commands
Please refer to the SB (set breakpoint) command and the DB (display breakpoints)
command for more information.
3
This command fills a block of units from start_addr to end_addr with data.
Syntax
BFunit start_addr end_addr data
unit — This can be either B (byte), W (word), or L (long). If no unit is specified, the
default is W (word).
start_addr — This is the address at which to begin filling.
end_addr — This is the end of the address range to fill.
data — This is a data pattern to be placed into the block range specified.
start_addr and end_addr can be previously defined symbols.
Example 1
In this example, fill a block of memory, 32 bytes (20 Hex) in length with a word of
data = 4121. First, display memory contents. Then fill the block and verify the
command.
BKM>DM 1000 20
001000 0000 0000 0000 0000 0000 0000 0000 0000 ....................
001010 0000 0000 0000 0000 0000 0000 0000 0000 ....................
BKM>BF 1000 1020 4121
BKM>DM 1000 20
001000 4121 4121 4121 4121 4121 4121 4121 4121 ....................
001010 4121 4121 4121 4121 4121 4121 4121 4121 ....................
BKM>
Example 2
In this example, change the command unit size from the last example of a word to
a size L (long):
BKM>DM 1000 20
001000 0000 0000 0000 0000 0000 0000 0000 0000 ....................
001010 0000 0000 0000 0000 0000 0000 0000 0000 ....................
BKM>BFL 1000 1020 4121
BKM>DM 1000 20
11
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
001000 0000 4121 0000 4121 0000 4121 0000 4121 ..A!..A!..A!..A!..A!
001010 0000 4121 0000 4121 0000 4121 0000 4121 ..A!..A!..A!..A!..A!
BKM>
Syntax
BMunit source_start_addr source_end_addr dest_start_addr
Example
In this example, move a 32 byte (20 Hex) block from one area of memory to another.
Memory is displayed before and after the move.
BKM>DM 1000 20
001000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
001010 0000 0000 0000 0000 0000 0000 0000 0000 ................
BKM>BM 1000 1010 1010
BKM>DM 1000 20
001000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
001010 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
BKM>
The Cache Access (CA) commands are used to view and alter the state of the
Instruction and Data caches of the processors. Please note that certain CA
commands are processor specific, as indicated in the command descriptions. There
12
3 Low-Level Commands
3.1 Low-Level Commands
are several CA commands with various functions, as described in the sections that
follow.
Syntax
3
CA
Issuing the CA command without any arguments lists all of the Cache Access
commands and their syntax.
Example
>BKM>ca
CA dis : Disassemble all VALID I cache data.
CA dump <sw> : Display ALL cache sets for I, D or L caches.
CA dump <addr> <sw> : Display the appropriate cache SET for all
WAYs.
CA dump <addr> -il : Display true target i-cache tags and data
directly.
CA dump <addr> -dl : Display true target d-cache tags and data
directly.
CA dump <addr> -ll : Display true target L2-cache tags directly.
CA read <sw> : Display VALID cache sets for I, D or L caches.
CA search <addr..addr> <sw> : Searches for <addr> in the I, D or L caches.
CA enable <sw> : Enables both or just I or D caches.
CA disable <sw> : Disables both or just I or D caches.
CA inv <sw> : Invalidate both or just I or D caches.
CA -s : Display the state for both caches.
CA diff <sw> : Display differences between Cache and memory.
The CA commands that appear above are described in the following sections.
CA dis
This command displays all valid lines in the instruction cache in a disassembly
format. The example displays all the cache information related to where this data
was obtained from in the cache, and what the instructions are for each line.
Example:
BKM>ca dis
Way0 Set 000 $00005000 : 0x48000005 :ppc bl 0x5004
[V,LRU 4] $00005004 : 0x7C6802A6 :ppc mflr R3
$00005008 : 0x3C801122 :ppc lis R4,0x1122
$0000500c : 0x60843344 :ppc ori R4,R4,0x3344
$00005010 : 0x90830040 :ppc stw R4,0x40(R3)
$00005014 : 0xB0830050 :ppc sth R4,0x50(R3)
$00005018 : 0x98830060 :ppc stb R4,0x60(R3)
13
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
CA dump -i
This command displays all of the processor instruction cache lines regardless of the
state of each line. This example shows a processor with an instruction cache
structure that has 5 WAYS and 128 sets per WAY. The entry at way0/set0 is marked
as valid with the /v flag, and all other entries are marked as invalid /i.
Example:
>BKM>CA dump -i
Set Way0 Way1 Way2 Way3 Way4
000 0x00005000/v 0x3C332000/i 0x57FFB000/i 0xB24FC000/i 0xDEE20000/i
001 0xFFFFF020/i 0xFFFFF020/i 0xFFFFF020/i 0x1DAF8020/i 0xE7B28020/i
002 0xAAFE9040/i 0x5BC1D040/i 0x5213E040/i 0x53788040/i 0xC875D040/i
003 0xCC7EC060/i 0x2D662060/i 0x952F6060/i 0x1BB7D060/i 0x18093060/i
004 0xD91BB080/i 0x5A2AB080/i 0x6BDE3080/i 0xED2A2080/i 0x51E43080/i
005 0xD27950A0/i 0x98C0E0A0/i 0x4E5E00A0/i 0x094B40A0/i 0x3A5290A0/i
006 0x3BB400C0/i 0x347A20C0/i 0xA36180C0/i 0xA23300C0/i 0x5099A0C0/i
etc ............
126 0xD27950A0/i 0x98C0E0A0/i 0x4E5E00A0/i 0x094B40A0/i 0x3A5290A0/i
127 0x3BB400C0/i 0x347A20C0/i 0xA36180C0/i 0xA23300C0/i 0x5099A0C0/i
>BKM>
CA dump -d
This command displays all of the processor data cache lines regardless of the state
of each line. This example shows a processor with a data cache structure that has 4
WAYS and 128 sets per WAY. The entry at way0/set2 and set3 are marked as valid
with the /v flag, and all other entries are marked as invalid /i. There is a second
flag associated with the data cache. This flag indicates if the data is dirty (most
recent) or clean (same as memory). If the entry is marked as clean with the /c flag,
then contents in the cache and the contents in memory are the same. If the entry is
valid and it is marked as dirty with a /d flag, then the data in the cache is the most
recently used data and the value in memory is no longer valid.
14
3 Low-Level Commands
3.1 Low-Level Commands
Example:
>BKM>CA dump -d
Set Way0 Way1 Way2 Way3
000 0xE17AF000/i/c 0x80517000/i/d 0xCEF44000/i/c 0x37ECB000/i/d
001 0xBAF43020/i/c 0x56560020/i/d 0x384A2020/i/c 0x0A27A020/i/d 3
002 0x00005040/v/d 0x79F9B040/i/c 0xCB2BC040/i/d 0x80A73040/i/c
003 0x00005060/v/d 0x2F6B2060/i/c 0xED936060/i/d 0x58252060/i/c
004 0xCA098080/i/d 0x7CD4C080/i/c 0xC3BAD080/i/d 0x63B2C080/i/c
005 0xEF70F0A0/i/c 0x1AF4B0A0/i/c 0x1016A0A0/i/d 0x525E00A0/i/c
006 0xF9D5D0C0/i/d 0x458F20C0/i/d 0xAF17F0C0/i/c 0xAE8B70C0/i/c
etc ..............
125 0xD27DFFA0/i/d 0xD8C3FFA0/i/d 0x1D8B9FA0/i/c 0x7B3D3FA0/i/d
126 0x58F00FC0/i/c 0xC5AE3FC0/i/d 0x4512CFC0/i/c 0x9B7ACFC0/i/c
127 0xE94B6FE0/i/d 0x3CECFFE0/i/d 0x6EE65FE0/i/c 0xC14DDFE0/i/d
This command displays all of the possible ways that a specified address could be
found in the instruction cache. The -il switch is used to indicate a long format for
the instruction cache. This example shows all WAYS for set0. The address TAG of
0x5000 is marked as valid, and all other ways are marked as invalid.
Example:
This command displays all of the possible WAYS where a specified address could
be found in the data cache. The -dl switch is used to indicate a long format for the
15
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
data cache. This example shows all 8 WAYS for set2. The address TAG of 0x5040 is
marked as valid, and all other WAYS are marked as invalid.
Example:
CA read -i
This command displays only the processor instruction cache lines that are valid.
This example shows that TAG address 0x5000 from way0/set0 is the only valid
entry found. The LRU flag indicates the Least Recently Used WAY is way0.
Example:
BKM>ca read -i
Set/Way Tag
000/000 0x00005000/lru 0
CA read -d
This command displays only the processor data cache lines that are valid.
This example shows that TAG address 0x5040 and 0x5060 are then only valid
entries found.
>BKM>CA read -d
Set/Way Tag[status]: Data+0 Data+4 Data+8 Data+C Data+10
Data+14 Data+18 Data+1C
002/000 0x00005040[d]:0x80001000 0x11223344 0x00000400 0x00000402 0x08004000
0x33440000 0x00080080 0x00000000
003/000 0x00005060[d]:0x00001000 0x44000C02 0x00100400 0x00000000 0x08000000
0x00000000 0x00400000 0x00000010
>BKM>
16
3 Low-Level Commands
3.1 Low-Level Commands
CA search start_addr..end_addr -i
This command searches the instruction cache for valid cache lines. The command
expects a starting and ending range. The example shows a search of the instruction
3
cache starting from address 0x5000 to 0x6000, and has found 2 valid cache lines
within this address range.
>BKM>CA search 5000..6000 -i
Set/Way Tag
008/000 0x00005100
009/000 0x00005120
>BKM>
CA search start_addr..end_addr -d
This command searches the data cache for valid cache lines. The command expects
a starting and ending range. This example shows a search of the data cache starting
from address 0x5000 to 0x6000, and has found 2 valid cache lines within this
address range.
>BKM>ca search 5000..6000 -d
Set/Way Tag
010/000 0x00005140
011/000 0x00005160
>BKM>
CA -s
This command displays the state of each cache. L2 and L3 caches are level 2 and 3
caches found in the high end PowerPC processors.
BKM>ca -s
Instruction Cache: Enabled
Data Cache : Enabled
L2 Cache : Disabled
L3 Cache : Disabled
>BKM>
CA diff -i
This command displays all differences between the instruction cache and main
memory for all valid cache lines. This example displays one cache line where the
top values are the cache values, and the bottom values are main memory content.
The dash lines indicate that there were no differences found.
17
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
>BKM>CA diff -i
Set/Way Tag Tag+00 Tag+04 Tag+08 Tag+0C Tag+10
Tag+14 Tag+18 Tag+1C
001/000 0x00005020 0xA0A30050 0x88A30060 0x7C0004AC 0x4BFFFFD4
0x80020010 0x80000000 0x80010000 0x80081082
---------- ---------- ---------- ----------
0x00020080 0x00000400 0x00010000 0x00081100
>BKM>
CA diff -d
This command displays all differences between the data cache and main memory
for all valid cache lines. This example displays one cache line where the top values
are the cache values, and the bottom values are main memory content. The dash
lines indicate that there were no differences found.
>BKM>CA diff -d
Set/Way Tag Tag+00 Tag+04 Tag+08 Tag+0C Tag+10
Tag+14 Tag+18 Tag+1C
002/000 0x00005040 0x80001000 0x11223344 0x00000400 0x00000402
0x08004000 0x33440000 0x00080080 0x00000000
---------- 0xAABBCCDD 0x00000000 0x00000000
0xFFFFFFFE 0xFFFFFFFE 0x00100100 ----------
>BKM
You can use the CF command from the > BKM > or >ERR> prompt, but not from
either a > RUN > or a >TRC> prompt.
18
3 Low-Level Commands
3.1 Low-Level Commands
Although the options vary depending on your target architecture, typing CF at the
>BKM> prompt will provide a list of the options that are available for your target.
The CF options that are available vary widely from target to target. For descriptions
of the CF options for the target architectures that are currently supported by Wind
River, see the Wind River Workbench On-Chip Debugging Configuration Options
Reference.
NOTE: Some of the CF options may be the same from target to target. Be aware,
however, that there are options that are unique to specific processor families.
Please be sure to refer to the section that is appropriate for the target that you are
using.
NOTE: This command is processor dependent and not available across all families.
19
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command gives you a table-driven method for setting up the chip-selects for
your processor. This table is stored in non-volatile memory and is automatically
downloaded to the proper target location (via Background Mode memory sets)
after every initialization sequence (IN command). To initialize Background Mode
communications without writing the chip-select table and SIM registers (SC
commands), use the INN command.
Syntax
CS arg
Example
When the emulator is configured for an MPC 8260 target, a CS command with no
arguments will display the following:
BKM>cf tar 8260
BKM>cs
Name BA AM AT ATM PS PARE WP MS V CSNT/SAM ACS BI SCY SETA TRLX
CS0 FFC00000 FFC00000 0 0 16 No RW GP Y Normal 1/2 Y 6ws Int. Norm
CS1 00000000 00000000 0 0 32 No RW GP Y Normal 0 N 0ws Int. Norm
CS2 00000000 FFC00000 0 0 32 No RW UB Y I.M.AMB 0 N 0ws Int. Norm
CS3 00000000 00000000 0 0 32 No RW GP N Normal 0 N 0ws Int. Norm
CS4 00000000 00000000 0 0 32 No RW GP N Normal 0 N 0ws Int. Norm
CS5 00000000 00000000 0 0 32 No RW GP N Normal 0 N 0ws Int. Norm
CS6 00000000 00000000 0 0 32 No RW GP N Normal 0 N 0ws Int. Norm
CS7 00000000 00000000 0 0 32 No RW GP N Normal 0 N 0ws Int. Norm
The above chip-select table shows the factory default settings. To modify any of
these chip-selects, type the CS command followed by the name of the specific
chip-select to modify. The emulator displays the following for the CS0 example,
one line at a time, which shows you the options and current settings, and then
prompts you to make individual changes.
BKM>cs cs0
00000000 -> FFFF8000 | Base Register = FFC00000 >
00000000 -> FFFF8000 | Address Mask = FFC00000 >
0 -> 7 | Address Type = 0 >
0 -> 7 | Address Type Mask = 0 >
(0-2)=32, 8, 16 bits / 3=Rsvd | Port Size = 16 Bits >
0 = Disabled, 1 = Enabled | Parity Enable = Disabled >
0 = Read/Write, 1 = Read Only | Write Protect = Read/Write >
(0-3) = GPCM, Rsvd, UPMA, UPMB | Machine Select = GPCM >
0 = Not Valid, 1 = Valid | Valid state = Valid >
(0-3)=Norm, Rsvd, 1/4 clk, 1/2 clk | Address/CS Setup = 1/2 clk >
20
3 Low-Level Commands
3.1 Low-Level Commands
After you use the CS command to make a change in the emulator’s chip select
table, issue an IN command in order to download the table, and thus the changes
to the target.
3
Syntax
CST Enter
21
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command displays all software breakpoints and their status. The status
includes whether the break is enabled or disabled, and the conditions on which to
break. For viewing convenience, each breakpoint is assigned a number. In
addition, after a breakpoint has occurred, a flag indicates which breakpoint has
interrupted code execution.
Syntax
DB Enter
Example
>BKM>db
Software Code Breakpoints
1. 00040418 count = 0001 actual = 0000 enabled
2. 0004042C count = 0001 actual = 0000 enabled
3. 0004044C count = 0001 actual = 0000 enabled
4. 00040494 count = 0001 actual = 0000 enabled
!INFO! - [msg82001] No internal hardware breakpoints installed
>BKM>
This command displays the current hardware and firmware levels that your
emulator is using.
Syntax
DC Enter
Example
>BKM>dc
Firm Rev = vn1.0m
22
3 Low-Level Commands
3.1 Low-Level Commands
3
3.1.13 Diagnostic Function (DF)
Syntax
DFunits 0 args
units — The units can be either B (byte), W (word), or L (long). By default, this
parameter is set to Word.
args — This is an address range, spanning from begin_addr to end_addr.
Example 1
A simple RAM test is executed on a 128 word memory space. There will be no
errors.
>BKM>DFW 0 00000 000FF
simple ram test running
test complete
>BKM>
Example 2
A simple RAM test is executed on a 128 word memory space. There will be a bad
memory bit 12 at address 0000E. A bit will be stuck low.
BKM>DFW 0 00000 000FF
23
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The DF 1 command runs a simple RAM test continuously. This test can be stopped
by typing Ctrl+C.
Syntax
DFunits 1 args
Example 1
A simple RAM Test is executed continuously on a 128 word memory space. There
are no errors.
>BKM>DFW 1 00000 000FF
!ABORT! - [msg72000] User Command Abort
>BKM>
Example 2
A simple RAM test is executed continuously on a 128 word memory space. There
is a bad memory bit 12 at address 0000E. A bit is stuck low.
BKM>DFW 1 00000 000FF
memory failure: $0000E=$4555 not $5555
PASS# = 1
memory failure: $0000E=$4555 not $5555
PASS# = 2
UNTIL ^C
Syntax
DFunits 2 args
24
3 Low-Level Commands
3.1 Low-Level Commands
Example 1
A complete RAM test is executed on a 128 word memory space. There are no 3
errors.
>BKM>DFW 2 00000 000FF
complete ram test running
test complete
>BKM>
Example 2
A complete RAM test is executed on a 128 word memory space. There is a bad
memory bit 12 at address 0000E. A bit is stuck low.
BKM>DFW 2 00000 000FF
memory failure: $0000E=$efff not $ffff memory failure:
$0000E-$0000 not $1000
complete
BKM>
The DF 3 command runs a complete RAM test continuously. This test can be
stopped by typing Ctrl+C.
Syntax
DFunits 3 args
Example 1
Example 2
A complete RAM test is executed on a 128 word memory space. There is a bad
memory bit 12 at address 0000E. A bit is stuck low.
25
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
DF 4 args
The scope loop routines are useful when troubleshooting with an oscilloscope.
Read/write continuously from/to an address and Write Then Read data are
supported routines.
The DF 5 command consecutively reads from the specified address. This test can be
stopped by typing Ctrl+X.
Syntax
DFunit 5 args
26
3 Low-Level Commands
3.1 Low-Level Commands
Example
Example
Syntax
DFunit 7 args
Example
27
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The DF 8 command writes a pattern to the address specified and rotates the
pattern. The test can be stopped by typing Ctrl+X.
Syntax
DFunit 8 args
Example
Syntax
DFunit 9 args
Example
28
3 Low-Level Commands
3.1 Low-Level Commands
The DF A command tests the address bus for the purpose of locating system shorts
on your target board.
3
Syntax
DFunit A start_address
Example
>BKM>df a 1000 2000
Address Bus Test at 00001000 to 00002000. Bus size 16 bits
.........................
TEST PASSED
>BKM>
The DF D command tests the data bus for the purpose of locating system shorts on
your target board.
Syntax
DFunit D address
Example
>BKM>df d 100
Data bus test at 00000100 size 16 bits
.................................
TEST PASSED
>BKM>
29
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
DI hex_addr count
Example
In this example, eight lines of code located at address 10000 are disassembled. The
display shows the address, the opcodes, and the disassembled instructions.
>BKM>di 40400 8
$00040400 : 0x3D600004 :ppc lis R11, 0x4
$00040404 : 0x382B2800 :ppc addi R1, R11, 0x2800
$00040408 : 0x3DA00005 :ppc lis R13, 0x5
$0004040C : 0x39AD9720 :ppc addi R13, R13, -0x68e0
$00040410 : 0x3C400005 :ppc lis R2, 0x5
$00040414 : 0x38429720 :ppc addi R2, R2, -0x68e0
$00040418 : 0x48000165 :ppc bl 0x4057c
$0004041C : 0x48000000 :ppc b 0x4041c
>BKM>
As with the DI command, this command disassembles the target code beginning
at a specified address or code symbol. The difference between the DI command
and the DIO command is that with the DIO command, no opcode row value is
displayed. If no address or symbol is given, DIO disassembles code starting at the
30
3 Low-Level Commands
3.1 Low-Level Commands
program counter. DIO disassembles one screen (20 lines) as a default, or you can
include an optional count parameter. Pressing Enter immediately following a DIO
command disassembles the next count or page of instructions in memory.
3
Syntax
DIO hex_addr count
Example
>BKM>DIO 40400 8
$00040400 lis R11, 0x4
$00040404 addi R1, R11, 0x2800
$00040408 lis R13, 0x5
$0004040C addi R2, R2, -0x68e0
$00040410 lis R2, 0x5
$00040414 addi R2, R2, -0x68e0
$00040418 bl 0x4057c
$0004041C b 0x4041c
>BKM>
Please see also the DI (Disassemble) and the SI (Single Step) commands.
This command disassembles the target code and shows the corresponding
profiling data for each instruction. After each instruction, the emulator displays
the number of samples that were taken in which the program counter (at the time
of the sample) is equal to the value of the particular disassembled instruction. The
DIP command disassembles starting at either the program counter, a specified addr,
or a previously defined code symbol, for count number of instructions. The default
count is one page of disassembled instructions.
Also included in the DIP output are symbol boundaries and tabulated profile
information for each symbol. The sum of the number of hits and percentages on
the instructions inside each symbol boundary will equal the hits and percentages
shown for the symbol. The numbers shown are accumulated over total profile
31
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
time, and not for the last sample period, which can be shown by utilizing the PFA
graphical display.
32
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
DIP hex_addr count
count — This is the number of instructions (in hex) that you wish to disassemble.
The default is one screen.
Pressing Enter immediately following a DIP command repeats the command for
the next count instructions.
NOTE: In order to have meaningful output with the DIP command, first run your
code under the PFA profiling (see PF RUN command for additional information).
Then use the DIP command.
NOTE: Percentages are calculated to two decimal places, unlike the PFA graphical
display, where percentages are calculated using integer math.
Example
33
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command returns the contents of the memory location(s) requested. The
command will display not only the address and the Hex data, but also the ASCII
representation of that data. In addition, using the syntax indicated below, the DM
command allows both memory-relative and register-relative addressing.
Syntax
DMunit args
Example 1
In this example, display 32 (20 Hex) words of memory starting at location 200010:
>BKM>DM 200010 20
00200010: FFFF DFFF FFFF FFFF FFFF FFFF FFFF FFFF ................
00200020: FFFF FFFE FFFF FFFD FFFF FFFF FFFF FFFF ................
00200030: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ................
00200040: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ................
>BKM>
34
3 Low-Level Commands
3.1 Low-Level Commands
Example 2
Example 3
Example 4
00001068: 00 00 46 45 42 00 00 00 00 00 00 00 00 00 00 00 00 ..FEB.......
BKM>
The DMD command is only for relevant architectures. This command obtains data
via full 64-bit read operations.
Syntax
DMD args
35
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Example 1
Example 2
Syntax
DR options
options can be either reg_name, the name of the register you wish to display the
value for, or group_name, the name of the register group whose registers you want
to display. If you do not specify an option then all of the registers are displayed.
You can specify more than one register at a time, leaving a space between each
reg_name or group_name.
36
3 Low-Level Commands
3.1 Low-Level Commands
Example 1
Displaying all registers with the DR ALL command would take up too much space 3
here. In this example, the DR command is used to display all general purpose
registers.
>BKM>dr
R00 = 00E17F2C R01 = 00EFFF30 R02 = 00E07FF0 R03 = 00000001
R04 = 00000000 R05 = 00EFFF38 R06 = 00000001 R07 = 00EFFF3C
R08 = 000D1788 R09 = 00000008 R10 = 00000000 R11 = 00000000
R12 = 00000000 R13 = 00E22C00 R14 = 00E2847C R15 = 00000000
R16 = 00000000 R17 = 00E294F8 R18 = E396FFBE R19 = ADAEF77B
R20 = 762EFEDD R21 = F813F3A2 R22 = F3E71E7F R23 = A836CDEE
R24 = 7B7F9EFE R25 = 593A65BF R26 = 2513F4FB R27 = E2FB608F
R28 = EC6DCFDF R29 = A9F275EB R30 = 00E23144 R31 = 00E24310
CR = 20000000 MSR = 00009042 LR = 00E19870 SRR0 = 00E1986C
SRR1 = 00009002 SPRG0 = 00000000 SPRG1 = 00000000 SPRG2 = 00000000
SPRG3 = 00000000 XER = 00000300 CTR = 00000000 PC = 00E198BC
>BKM>
Example 2
In this example, set values in some registers. Then display these registers in a
different order:
>BKM>SR R00 1000000 R03 120000 R08 1234 R16 55
>BKM>DR R08 R16 R00 R03
R08 = 00001234 R16 = 00000055 R00 = 01000000 R03 = 00120000
>BKM>
The DT command is used to display both real-time and non-real-time trace. The
options for the DT command are different for the real-time modes.
The non-real-time trace buffer only has valid history if tracing was previously
enabled, either directly with the Trace Enable command or indirectly by setting a
data breakpoint, for example. The trace buffer contains PC-only history
information.
37
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
DT arg1 arg2 num
Example
In this example, the non-real-time trace display of three instructions that were
executed are shown:
BKM>DTB 3
The ESTKEY command displays the actual encrypted license key string for your
emulator.
Syntax
ESTKEY Enter
Example
>BKM>estkey
AC1WXYJNB140G7C6GFD3H28DBK909VUODBO (*) Main Key
>BKM>
The ESTKEY DISPLAY command returns the current Wind River license support
information.
38
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
ESTKEY DISPLAY Enter
Example
3
Below is an example of this command executed on a Wind River Probe unit. If the
product is licensed as a demo unit, notice that you will see a preset maximum
number of downloads as well as current number of downloads that have been
executed. Beside the processor family for which your unit is licensed, you will see
two subheadings - Network and Support, as shown below.
Network Support
EST Tools- EST Network support Demo - Demonstration Support comes with a preset
enables you to have network number of downloads and/or an expiration date.
threads enabled so that you can Your support will end when whichever of these items
use visionCLICK remotely from expires first.
another computer or workstation.
TORNADO (tm) - Network RTOS - RTOS support means that your unit can be
support for Wind River Tornado, used with any RTOS supported by visionCLICK.
enabling you to establish remote
connections to Tornado
>BKM>estkey display
39
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
CPU Support: 505, 509, 555, 560, 561, 563, 565, 801, 821, 823, 823E, 850,
850DC, 850DE, 850DH, 850SE, 850SAR, 850SR, 850DSL, 855T, 857T, 857DSL, 860,
860DC, 860DE, 860DH, 860EN, 860MH, 860SAR, 860T, 860P, 860DP, 862P, 862DP,
862T, 862DT, 862SR, 866T, 866P, 852T, 859DSL, 859T, 885, 880, 875, 870
>BKM>
This command performs the same function as ESTKEY DISPLAY except that it
displays Wind River license support information for the main licensing key.
Syntax
ESTKEY DISPLAY MAIN
Example
>BKM>ESTKEY DISPLAY MAIN
PPC82XX Family:
Base Version: 1.9
Network: EST Tools, TORNADO (tm), pRISM+ (tm)
Support: VCLICK
STARCORE Family:
Base Version: 5.0
Network: EST Tools, TORNADO (tm), pRISM+ (tm)
Support: VCLICK
>BKM>
This command performs the same function as ESTKEY DISPLAY except that it
displays Wind River license support information for the demonstration licensing
key.
Syntax
ESTKEY DISPLAY DEMO
40
3 Low-Level Commands
3.1 Low-Level Commands
Example
BKM>estkey display demo
Key In Use: Temporary Demo Key
Group Id: 0
Creation Date : 1/25/0016:24 3
Expiration Date: 2/25/00
Serial Number : N2X01003
(DEMO) Maximum Downloads: 10
(DEMO) Current Downloads: 1
PPC82XX Family:
Base Version: X.X
Network : EST, WRS, PSOS
Support : DEMO, RTOS
The Fast Step command allows you to step continuously through a specified code
range. To use this command, first make sure that your PC is within the code range
that you specify for fast stepping. If you do not specify a code range to Fast Step
through, the FS command reverts to a simple single step, stepping one instruction
at the current program counter.
Syntax
FS start_address end_address
In this case, start_address and end_address specify the address range for the
debugger to continue stepping until the program counter is outside the range.
Both start_address and end_address are optional parameters.
If neither parameter is specified, the FS command reverts to a simple single step,
stepping one instruction at the current program counter.
If only one parameter is given with the FS command, for example:
FS end_address
...then the start_address is taken as the current program counter. In this case, FS
steps until it is outside of the range of the current program counter, and the
end_address is given.
Examples
In the following examples, memory is at 5000 and the current program counter is
at 5000.
41
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
BKM>FS
@5004
BKM>FS 500E
@5010
BKM>FS 500E 5010
@5004
BKM>
The Fast Step Next command is similar to a Fast Step in that it lets you step
continuously through a specified code range. The difference between them is that
instead of stepping into each line of code, FSN steps over each line. To use this
command, first make sure that your PC is within the code range that you specify
for fast stepping. If you do not specify a code range to Fast Step through, the FSN
command reverts to a simple step over command, stepping over one instruction at
the current program counter.
Syntax
FSN start_address end_address
In this case, start_address and end_address specify the address range for the
debugger to continue stepping until the program counter is outside of the range.
Both start_address and end_address are optional parameters.
If neither parameter is specified, the FSN command reverts to a step over, stepping
one instruction at the current program counter.
If only one parameter is given with the FSN command, for example:
FS end_address
then the start_address is taken as the current program counter. In this case, FSN
steps until it is outside of the range of the current program counter, and the
end_address is given.
Example
>BKM>fsn
@00040d88
>BKM>fsn 40d84 40e7c
>RUN>
@000406c8
>BKM>
42
3 Low-Level Commands
3.1 Low-Level Commands
The GO command deactivates debug mode and begins executing user code on the
target. Code execution continues until either a breakpoint occurs, the system is
3
reset, a double bus fault occurs, or you stop the target by typing Ctrl+C or Ctrl+X.
If breakpoints are enabled, a BKMD instruction is inserted into the target code at
each breakpoint address (TRAP instructions are used in simulation). This allows
real-time execution of target code and still allows for breakpoints to be set.
If the location where execution begins contains a breakpoint, then that breakpoint
is temporarily disabled until the program is stepped off of the breakpoint. If an
assertion has been set then, the GO command enables the trace buffer and checks
for break conditions after each instruction is executed. After the GO command is
issued, the emulator displays the >RUN> prompt, indicating that the target is
running in real-time.
Syntax
GO flag addr
flag — This parameter can be set to either T (Trace Enabled), or D (Trace Disabled.
By default, this is set to no change.
The flag argument is a way to combine the Trace Enable or Trace Disable
commands with the GO command. This is optional, and if it is not specified, then
there is no change to the trace conditions previously set. The tracing mode will
remain in effect until it is specifically changed by another GO command or by the
Trace Enable or Trace Disable commands.
addr — This parameter is the hex address where execution mode will resume.
Example 1
In this example, examine the instructions located at address 10000. Set a breakpoint
and verify that it is the only condition set up. Disable tracing. Finally, issue the GO
command, allowing Execution Mode to operate in Real-Time. Notice the prompts
that are displayed:
BKM>DI 10000 8
00100000 2200 move.l D0,D1
00100002 4282 clr.l D2
00100004 D401 add.b 1,D2
00100006 E289 lsr.l 1,D1
00100008 66FA bne.b $10004
0010000A E20A lsr.b #1,D2
0010000C 55C2 scs D2
0010000E 60FE bra.b $1000E
43
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
BKM>SB 1000E
BKM>DB
Code Break-Points
BKM>GO 10000
.RUN>
BKM>
Example 2
In this example, assume only one address breakpoint is set at location 1000E. First,
issue a GO command with trace enabled. Once the breakpoint is taken, issue
another GO command from the same place. Finally, explicitly disable tracing and
issue the GO command again. Notice that tracing is still enabled for the second GO
command:
BKM>GOT 10000
TRC>
BKM>GO 10000
TRC>
BKM>GOD 10000
RUN>
BKM>
44
3 Low-Level Commands
3.1 Low-Level Commands
This command starts execution of the target system with Performance Profiling
activated. You can only issue a GOP command while the target is in Background
3
Mode. The GOP command begins the sampling process from the specified address
or code symbol. Issuing a GOP command automatically opens the PFA graphic
display (histogram) if the graphics switch is turned on in the PF command. If the
graphics switch is turned off, the GOP command issues the >PFA> prompt. At this
prompt, issue a DIP (Disassemble with Code Coverage) command to view the code
profiling information by disassemble instruction or by symbol, respectively.
Syntax
GOP addr
Examples
BKM>GOP Starts profiling at the current program counter and opens the PFA
histogram and chart display.
BKM>GOP 1000 Starts profiling at 1000 and opens the PFA display if the graphics are
on in the PF command.
BKM>GOP main Starts execution and profiling at main and issues the >PFA> prompt
if graphics are turned off.
NOTE: The GOP command only operates from a stopped system (>BKM> prompt).
To start performance analysis from a running system (>RUN> prompt), use the
PF RUN command.
NOTE: You must disable any active breakpoints before executing the GOP
command. Use the DB (Disable Breakpoints) command or RB (Remove
Breakpoints) command.
NOTE: Performance Analysis does not operate in Trace mode. You must explicitly
disable tracing (using the TD command).
45
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
NOTE: The GOP command either directly opens the PFA graphic display or issues
the >PFA> prompt, depending on whether or not the graphics switch is turned on
or off in the PF command (option 5). If graphics are turned on, the GOP command
opens the display with parameters (PFA range, graph type, sampling period) that
are currently set in non-volatile memory. To change these parameters, use the PF
command, or change them from within the graphic display.
NOTE: From the >PFA> prompt, use the DIP command to disassemble code with
profiling data. Additionally, issue a DM, SM, DR, SR, or DI command in the form
of a special target snapshot from the >PFA> prompt. You cannot issue a trace,
breakpoint, or configuration command.
NOTE: Enter Ctrl+C from the >PFA> prompt to discontinue profiling, stop the
target, and return to a >BKM> prompt. Exiting the graphic display with the F9 key
returns you to the >PFA> prompt, so you must use Ctrl+C to stop the code
profiling.
Syntax
HA, HALT, or Ctrl+C
When entering background mode fails due to a register value set incorrectly by a
software application, the emulator will wait for the amount of time set in the
CF TOUT option before issuing a non-maskable break to the target. If this occurs,
the following message is displayed:
>RUN>
!BREAK! - [msg12007] User forced halt; PC = 0x000142F0
>BKM>
You can stop the target running by typing HA or HALT at the >RUN> or >TRC>
prompt. You can also stop the target or a command that is currently executing by
typing Ctrl+C or Ctrl+X.
The HE command displays the emulator’s help menu. The menu shows the syntax
of the command set. Additional help for each command is provided by typing the
command name as an argument.
46
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
HE arg
arg — This is an optional two-letter command name. If you do not specify this
parameter, all of the available help commands are displayed. 3
Example 1
Example 2
47
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
IHCB addr
Syntax
IHBD optional_qualifier addr optional_data
48
3 Low-Level Commands
3.1 Low-Level Commands
optional_data — This parameter is optional, and you can use it to specify a condition
that you want met before a break occurs. Using this option you can cause the target
to break only when a specified value is read or written at the address specified in
addr.
3
Examples
Set an internal breakpoint at address 0x1000 and break on any access (read or
write) to this address.
BKM>ihbd 1000
Syntax
IN Enter
This command initializes and downloads the chip-select and register settings, and
initializes communications with your target.
Initialization Messages
The emulator goes through the following sequence after the IN command is issued,
assuming that it is able to properly establish background mode communications
with the target:
>BKM>in
49
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
*****************************************************************************
Wind River ICE Initialization Sequence.
Copyright (c) Wind River Systems, Inc., 1999-2004. All rights reserved.
*****************************************************************************
Support Expires....... 6/18/05
Target Processor...... MPC8260
Wind River ICE Group ID#= 0
Wind River ICE Serial#= N2206170 Firmware= vn1.0m
Type CF For a Menu of Configuration Options
Initializing Background Debug Mode..............Successful
>BKM>
Syntax
INN Enter
Initialization Messages
The emulator goes through the same sequence as the IN command when the INN
command is issued, assuming that it is able to properly establish communications
with your target:
>BKM>inn
*****************************************************************************
Wind River ICE Initialization Sequence.
Copyright (c) Wind River Systems, Inc., 1999-2004. All rights reserved.
*****************************************************************************
Support Expires....... 6/18/05
Target Processor...... MPC8260
Wind River ICE Group ID#= 0
Wind River ICE Serial#= N2206170 Firmware= vn1.0m
50
3 Low-Level Commands
3.1 Low-Level Commands
Please see the IN command for more information about initializing your system.
3
The INE command is a special initialization command which allows the emulator
to trap and decode exceptions that are not properly handled by the application
code. You may only use this command from a > BKM > prompt or >ERR> prompt.
The INE command cannot be used as a target snapshot.
The INE command performs the standard initialization sequence (refer to the IN
command for more information), including chip-select and register download. If
valid communications are established with the target, the INE command also
initializes all exception vectors, not including the restart vector at the first eight
longs, by writing a general exception address in each location in the exception
vector table.
After initializing with the INE command and issuing a GO command, if you hit a
breakpoint, the emulator determines if the breakpoint was at the location pointed
to by the general exception. This is the address at the end of the event to which all
uninitialized vectors point. If the target breaks at this location, the emulator
uploads the exception stack frame from the target and decodes it for you.
If you take the general exception and stopped at a breakpoint at the end of the
event, the emulator displays:
■ A !BREAK! - Exception Trap Handler message
■ The location in memory of the exception stack frame
■ The program counter where the exception took place and/or the faulted
address, if they are not the same
■ The exception type and vector offset
■
The target registers at the time of the exception
The INE command assumes that the vector table is located at 0, unless you include
a non-zero VBR as an optional parameter. If your vector table is in ROM, you can
use the INE command by giving it an arbitrary RAM-based VBR, and then
manually changing the VBR using the Set Register command (SR VBR
RAM_Address).
You only need to use the INE command once after system power-up because the
installed vectors remain loaded.
51
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
INE VBR_addr
Examples
BKM>GO If a bus error occurs after code starts executing (GO), the emulator traps
the error and decodes the exception stack frame.
RUN>
!BREAK! - Exception trap handler
Syntax
MMunit base_addr data
unit — This can be either B (byte), W (word), or L (long). By default, the option is
set to word. Do not leave a space between MM and unit.
52
3 Low-Level Commands
3.1 Low-Level Commands
base_addr — This is the beginning address of the memory that you want to modify.
data — This is the data to be written to the address specified by base_addr.
The Memory Modify command can also take an indirect address and a
3
register-relative address as parameters. The syntax is as follows:
MM(*addr) data
Examples
In this example, set a word at 1000 to 0C, set a long at 0FFE to 100, and set a byte
at FB0 to 0A:
BKM>MM 1000 0C
BKM>DM 1000
00001000: 000C 4E00 4645 4200 4D41 5200 4150 5200 ..N.FEB.MAR.APR.
BKM>MML 0FFE 100
BKM>DM 0FFE
00000FFE: 0000 0100 4E00 4645 4200 4D41 5200 4150 ..N.FEB.MAR.APR
BKM>MMB FB0 0A
BKM>DM FB0
00000FB0: 0A00 0000 0000 0000 0000 0000 0000 0000 . . . . . . . . .
In this example, modify the memory at the relative-register address of 1116:
>BKM>mm (*1116) 1234
>BKM>dm (*1116)
00000000: 1234 FFE0 9061 0008 9041 000C 7C7A 02A6 .4...a...A..|z..
>BKM>
The MMD command is for specific architectures. This command modifies memory
via full 64-bit read operations.
Syntax
MMD args
args — base_addr data; a previously defined symbol may be used for base_addr.
Response: addr hex_data ascii_data
The Memory Modify Double command can also take an indirect address and a
register-relative address as parameters. The syntax is as follows:
MMD (*addr) number_of_units
53
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Example 1
In this example, modify the memory starting at location 200010, and then display
it using the DMD command:
>BKM>mmd 100020 1234
>BKM>dmd 100020
00100020: 0000000000001234 7C6802A690610018 .......4|h...a..|
00100030: 4800001D00E07FF0 00E22C0000E2852C H.........,....,
00100040: 00E02B1800000000 00E02A9C7C4802A6 ..+.......*.|H..
00100050: 80620008BC830010 9003000080810000 .b..............
>BKM>
Example 2
The Memory Management Unit commands allow you to add and manipulate data
included in the MMU table. MMU commands are not available for all processors. If
your processor does support MMU commands, you need to enable the MMU
configuration option. Please see the CF command for more information on
enabling the MMU commands.
NOTE: These MMU commands only set up the Memory Management table on the
emulator unit. They do not set up this information on the target. Any information
programmed into the Memory Management table should correspond to the
information that your code is setting up on the target.
54
3 Low-Level Commands
3.1 Low-Level Commands
MMU Commands
MMUD Deletes entries from the table, either one at a time or all at once.
This command lets you add an entry to the table in your Short-form of Product
Name emulator.
Syntax
There are two ways that you can add an entry to your table. The first way is to enter
all of the data on the same line, as shown.
MMUA logical_address physical_address mask
logical_address — This is the virtual address that the applications use to locate a
device on your target.
physical_address — This is the physical location of the device on your target.
The second method is to type the MMUA command with a carriage return.
MMUA Enter
This method prompts you for each of the required parameters (logical_address,
physical_address, and mask).
Example
The first example illustrates adding an entry to the MMU table in the emulator
using the MMUA logical_address physical_address mask syntax. The table is then
displayed using the MMUL command.
>BKM>mmua c000000 0 ff000000
>BKM>mmul
Index | Logical | Physical | Mask
------|--------------|--------------|-------------
01 | 0x0c000000 | 0x00000000 | 0xff000000
>BKM>
55
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The second example illustrates adding an entry to the MMU table in the emulator
using the MMU ENTER syntax.
>BKM>mmua
Logical Address :d0000000
Physical Address :100
Mask :ff000000
>BKM>mmul
Index| Logical | Physical | Mask
-----|------------|--------------|-------------
01 | 0x0c000000| 0x00000000 | 0xff000000
02 | 0x0d000000| 0x00000100 | 0xff000000
>BKM>
NOTE: The entry labelled 01 in the table is only included if you added the line to
the table using the syntax in the first example. If you only worked through the
second example, the line labelled 02 will be labelled 01, and will be the only entry
in the table.
This command displays the MMU table, showing any entries that are included in it.
Syntax
MMUL Enter
Example
56
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
MMUD IndexNumber
IndexNumber — This is the index number of the line that you want to delete from
your MMU table. The index number is visible in the first column of the MMU table. 3
Entering MMUD without specifying an index number will delete the entire table.
Example
The following example displays the MMU table with two entries in it, deletes the
second entry, and displays the MMU table again, this time with only one entry.
>BKM>mmul
Index | Logical | Physical | Mask
------|--------------|--------------|-------------
01 | 0x0c000000 | 0x00000000 | 0xff000000
02 | 0x0d000000 | 0x00000100 | 0xff000000
>BKM>mmud 2
>BKM>mmul
Index | Logical | Physical | Mask
------|--------------|--------------|-------------
01 | 0x0c000000 | 0x00000000 | 0xff000000
The MMUOS commands allow the user to define and manage a set of
addresses/offsets (symbols) to the Linux Page Directories, which the MMU engine
of the emulator firmware (and associated plugin) uses to acquire the necessary
information for Linux Virtual Memory Management emulation.
There are several MMUOS commands with various functions, as described below.
NOTE: To use the MMUOS commands, you must have the CF MMU option set to
ENABLE.
MMUOS ADD
57
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax:
MMUOS ADD
MMUOS DELETE
Syntax:
MMUOS DELETE Name
Name is the entry you want to delete. If you do not specify an entry, this command
will delete the entire MMUOS list.
MMUOS DISPLAY
Syntax:
MMUOS DISPLAY
Example:
NAME | TYPE | VALUE
----------------------------------------------------------------------
pidhash | Constant | 0xc01ab094
swapper_pg_dir | Constant | 0xc01ab094
kernelsp | Constant | 0x00000000
TASK_PId_Offset | Constant | 0x00000080
TASK_THREAD_Offset | Constant | 0x00000270
TASK_HNEXT_Offset | Constant | 0x000000b4
THREAD_PGDIR_Offset | Constant | 0x0000000c
HOOK_PageAlloc | Constant | 0xffffffff
MMUOS SET
This command will set the value of an entry on the MMUOS list.
Syntax:
MMUOS SET Entry Value
58
3 Low-Level Commands
3.1 Low-Level Commands
3
3.1.40 Performance Analysis (PF)
The PF command lets you specify performance analysis parameters (code profiling
start and end range, graph type, display update mode, sample period and sample
rate, and graphics on/off mode). These parameters are stored in non-volatile
memory. When you start the PFA graphic display, it defaults to the settings last
specified with the PF command, or last set inside the PFA display using the
function keys.
Appending the RUN argument to the PF command causes the PFA profiling to start
from a running system. You must have a > RUN > prompt in order to use the PF
RUN command. Use the GOP command if you want to start performance profiling
from a stopped state (>BKM> prompt).
Syntax
PF RUN
The optional RUN keyword starts performance profiling and opens the PFA
display for a target system currently running in Real-Time (>RUN> prompt) with
no breakpoints installed.
If the RUN keyword is not included, the emulator prompts you for a set of
performance analysis parameters that are the defaults every time you start PFA
with the PF RUN or GOP commands.
Examples
>RUN>PF RUN Starts profiling from a running system and starts the PFA
histogram and chart display.
59
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
6.....RUN
enter number to edit or 6 to start >
NOTE: Disable active breakpoints and tracing before using the PF RUN command.
Use the BD (Breakpoint Disable) or RB (Remove Breakpoints) and DT (Disable
Trace) commands.
NOTE: The maximum performance analysis range is 256K; only symbols that are
mapped into the specified range will be shown in the PFA display. Use the PFA
range to filter out data symbols.
NOTE: You can profile your code without using the graphics display. If you execute
a PF RUN or GOP command with graphics off, the emulator issues a > PFA >
prompt, signaling that the unit is sampling your code. From the > PFA > prompt,
you may use the DIP command to disassemble code with profiling data.
Additionally, you may issue a DM, SM, DR, SR, or DI command in the form of a
special target snapshot from the >PFA> prompt. You may not issue a trace,
breakpoint, or configuration command.
NOTE: Enter Ctrl+C from the >PFA> prompt to discontinue profiling, stop the
target, and return to a >BKM> prompt.
Please see also the GOP (Start Performance Analysis) command, and the DIP
(Disassemble with Code Coverage) command for more information.
The PJ UPLOAD command displays all of the project settings that are currently
loaded on your target board.
Syntax
PJ UPLOAD
Example
Output for the PJ UPLOAD command is several pages long, so only the first few
lines of the command are shown here.
60
3 Low-Level Commands
3.1 Low-Level Commands
>BKM>PJ UPLOAD
REM *******************************************
REM CF CONFIGURATION
REM *******************************************
CF TAR 8260 ; OPERATION
CF SB SB ; OPERATION 3
CF VECTOR HIGH ; OPERATION
................................................contd.
Syntax
RB addr
Example
In this example, some previously set up breakpoints are displayed. Then the
breakpoint at address 10000 is removed. Finally, the removal of the breakpoint is
verified. Notice that the second code breakpoint becomes the first breakpoint after
the RB command is issued.
>BKM>db
Software Code Breakpoints
1. 00010000 count = 0001 actual = 0000 enabled
2. 00010010 count = 0001 actual = 0000 enabled
!INFO! - [msg82001] No internal hardware breakpoints installed
>BKM>RB 10000
>BKM>db
Software Code Breakpoints
1. 00010010 count = 0001 actual = 0000 enabled
!INFO! - [msg82001] No internal hardware breakpoints installed
>BKM>
61
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command is for use during multi-core debugging. If you are debugging
multiple processors on your scan chain, you can only use the IN command to
initialize one processor at a time. The RST or RSTIN command will initialize all of
the processors included on the scan chain simultaneously. The RST command
attempts to initialize Background Mode communications for each processor on the
scan chain. Once proper communications have been established,
Wind River ICE SX transfers the Chip Select Table (which can be modified with the
CS command) and the stored register settings (which can be modified with the SC
command) to the target system via Background Mode. To initialize Background
Mode communications for multiple processors without writing the Chip Select
Table and register settings, use the RSTINN command.
Syntax
RST
or
RSTIN
Syntax
RSTINN
Please see also the RST command and the INN command.
62
3 Low-Level Commands
3.1 Low-Level Commands
63
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
then manually changing the VBR using the Set Register command (SR
VBRRAM_Address).
You only need to use the RSTINE command once after system power-up because
the installed vectors will remain loaded.
Syntax
RSTINE VBR_addr
Syntax
64
3 Low-Level Commands
3.1 Low-Level Commands
count — This is an optional parameter, and it causes a break only when the
specified address has been encountered count times.
R# — This is number of the register to be checked, such as R9.
3
value — This is the value that the data in the register must be equal to for the
breakpoint to be hit.
Example
BKM>DI 7000 4
0007000 D081 add.l D1,D0
0007002 E289 move.l D0,D1
0007004 D401 add.b D1,D2
65
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The SBT command sets a temporary breakpoint in your code. Once the breakpoint
is encountered the first time, it disappears. In terms of syntax and usage, the SBT
command can be used in exactly the same way as the SB command. Please refer to
the SB command for more information about the syntax and use of this command.
Use the SC command to view and modify all of the internal registers in your
system. The SC command operates on a host data file which retains register values,
and it works with the SC GRP command in that the SC GRP command is needed to
enable/disable register groups (including chip selects and register settings).
If there are multiple processors included in your scan chain, the SC command will
apply to the first processor included in your scan chain. The System Configuration
settings for the second processor can be used by replacing SC with SC[1], and the
settings for the third processor can be used by replacing SC with SC[2]. In the
sections that follow describing all of the SC commands, please make the
replacement to SC[1] or SC[2] so that you can access the correct processor on your
scan chain.
The following table lists the many features and options supported by the SC
command.
66
3 Low-Level Commands
3.1 Low-Level Commands
SC Lists all the values stored in the host data file that belong to
currently active groups. 3
SC reg_name Prompts the user for input by first displaying the location and
value of the specified register.
SC reg_name value Allows the user to specify a value for a register without being
prompted for the input.
SC UPLOAD Uploads all of the current settings that are stored in the
emulator to the host. This includes values for all registers, both
the enabled and the disabled groups.
SC ASM This command generates the assembly code for the enabled
groups that would be required to initialize the registers during
run time. This code may be captured by the host, assembled,
and linked in with the rest of the system boot code.
SC DEFAULT Resets all of the emulator settings in the host data file to the
default factory settings.
The SC command allows users to display the current register settings and target
settings stored in the emulator. To display the current data file settings at the
prompt, type SC. The emulator displays the internal registers, which include the
name of the register, its target address, and the value stored in the emulator. These
values are displayed by group, and only those groups that are enabled using the
CF GRP command are displayed.
Syntax
SC
Example
The following example displays the configuration settings for an 8260 target.
>BKM>sc
****************** SIU *****************
IMMR 0F0101A8 0F000000 SIUMCR 0F010000 0E240000
SYPCR 0F010004 FFFFFFC3 SWSR 0F01000E 0000
BCR 0F010024 00000000 PPC_ACR 0F010028 02
PPC_ALRH 0F01002C 01234567 PPC_ALRL 0F010030 89ABCDEF
LCL_ACR 0F010034 02 LCL_ALRH 0F010038 01234567
LCL_ALRL 0F01003C 89ABCDEF TESCR1 0F010040 80020000
TESCR2 0F010044 00000000 LTESCR1 0F010048 00000000
LTESCR2 0F01004C 00000000 PDTEA 0F010050 00000000
67
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Any register can be modified by typing the SC command followed by the name of
the register you want to modify. To set a value in Immediate Mode, the register
name followed by a value will load the value into the host data file and then the
68
3 Low-Level Commands
3.1 Low-Level Commands
emulator. By specifying the register name without a value, the emulator will
prompt you for the new value by displaying the current settings and asking for
input. You may also specify the form with which to input data. The default data
input format is hex, but if you include a /B at the end of the command line, the
3
input can be in binary format.
Syntax
SC regname /b
Example
The > positions the cursor just over the first bit of the SYPCR, and you can specify
each bit by typing a 1 or a 0, or by pressing the spacebar. The spacebar indicates
that you do not want to change the current setting of that bit. You have the option
of modifying all of the bits, or changing only one or two bits by using the spacebar.
To upload the settings that are stored in the emulator to your host computer, use
the SC UPLOAD command.
Syntax
SC UPLOAD
The SC command can be used to turn all of your system configuration settings into
assembly code. The assembly code that is generated may need to be edited to suit
your specific programming needs, but the SC ASM command provides a starting
point for generating assembly code that can be inserted into the code that you are
using to bring up your board, such as a Board Support Package (BSP).
69
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
SC ASM
Example
The following example shows how the SC ASM command can be used.
>BKM>sc asm
lis r4,0x0F00
ori r4,r4,0x0000 # r4 is the IMMR Base Address
lis r12,0x0000 # r12 is the SDRAM Base Address
lis r3,0x0E24 # SIUMCR
ori r3,r3,0x0000
lis r7,0x0001
ori r7,r7,0x0000
stwx r3,r7,r4
lis r3,0xFFFF # SYPCR
ori r3,r3,0xFFC3
lis r7,0x0001
ori r7,r7,0x0004
stwx r3,r7,r4
li r3,0x0000 # SWSR
....
The SC DEFAULT command restores the default configuration settings for your
processor.
Syntax
SC DEFAULT
The SCA command is used to add custom registers to the existing set of system
configuration registers. Custom registers can be any memory mapped peripheral
register. Custom registers will be initialized with the IN command if the custom
register group is enabled (CF GRP command). Custom registers are initialized in
the sequence that they are originally created with the SCA command. The size
(byte, word, or long word) of the register is determined by the number bytes in the
70
3 Low-Level Commands
3.1 Low-Level Commands
value argument. Custom registers can be saved in the emulator with the SC SAVE
command.
Syntax
3
SCA name_addr_value
Examples
Create a custom register called IO1 at address 0x1000. Initialize this byte size
register with a value of 0xde.
SCA IO1 1000 DE
Create a custom register called IO2 at address 0x1010. Initialize this word size
register with a value of 0x0.
SCA IO2 1010 0000
Create a custom register called IO3 at address 0x1020. Initialize this long word size
register with a value of 0x12345678.
SCA IO3 1020 12345678
Syntax
SCD name
Example
Use the command SC UPLOAD CUSTOM to view the newly created registers.
71
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The SCT command behaves similarly to the SC command, except that it affects only
the system configuration settings on the target. It allows you to view and modify
all of the internal registers on the target.
If you use the SCT command to configure your target, be aware that any time you
issue an IN command or power cycle the emulator, all of your target values get
overwritten by the information that is stored in the emulator. For that reason it is
best to make sure that your target settings and the settings stored in the emulator
are the same whenever possible.
The following table lists the many features and options supported by the SCT
command.
SCT Lists all the current target settings for the enabled groups. Any
value displayed that differs from the value stored in the
emulator is highlighted with an asterisk.
SCT COPY Copies the values that are stored on the target into the
emulator.
SCT regname Prompts the user for input by first displaying the current
target settings. Entering a value changes the value on the target
but not in the emulator.
SCT regname value Sets the target register to the value specified.
SCT DIFF This command displays the differences between the current
target values and the values stored in the host data file.
72
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
SCT DIFF
Example 3
The following example shows output from the SCT DIFF command.
This command is used to create registers within a specified register group. The
register group may be one that already exists, in which case the new register is just
added to it, or if the register group does not exist it is created with the new register
in it. Up to 32 custom register groups can be created, a total of 960 custom registers.
Syntax
SCGA GroupName RegisterName Address Data Options
GroupName — This is the name of the register group that the new register is added
to.
73
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
RegisterName — This is the name of the register that you are creating.
Address — This is the address where the new register is located.
Data — This is the data that is stored in the register you are creating.
Options — There are many options associated with the SCGA command. Table 3-8
describes them.
/cpur This option specifies that the register you are creating is a CPU core
register (that is, SPR, or other non-memory mapped register.)
/hide This option means that the register is not visible when an SC or DR
command is executed. It is only visible when an SC/SCG UPLOAD
command is issued.
/lendian This option signifies that the register you are creating is a little-endian
register. It will only work on targets that are able to switch between
little-endian and big-endian modes.
/memr This option signifies that the register is a memory mapped register. It is
the default for self-defined registers.
/no_in This option means that the register you are creating does not get set on
the target during an IN sequence.
/r, /rw These options specify Read Only and Read/Write registers. The default
is /rw.
/Sz:B, /Sz:W, /S These options force the size of the register to either Byte (8 bits), Word
z:L, /Sz:D (16 bits), Long (32 bits), or Double (64 bits). The default register size is
determined by the amount of characters used to specify the default
value.
/w, /rw These options are Write and Read/Write flags. The default is /rw.
/wo This option defines a fixed value register. That register is not affected by
an SCT COPY command.
/w(nwf) This option specifies a write cycle (next write first.) It indicates that to
write a value to the register, you need to write the following register
value to the target first.
74
3 Low-Level Commands
3.1 Low-Level Commands
/r(nwf) This option specifies a read cycle (next write first.) It indicates that to 3
read a register, you need to write the following register value to the
target first.
/r(nwa) This option specifies a write cycle (next write after.) It indicates that to
write a value to this register, you need to write the next register value to
the target afterwards.
Example
The first example creates a new group called SIM_MMU, with a core register
SIM_IBATOL included in it.
>BKM>SCGA SIM_MMU SIM_IBATOL 4014 00000004 /cpur
>BKM>
The second example describes the /w(nwf) option. In this case, a register called
PCICMD is created in register group MPC_PCI, however the option specifies that
the register cannot be written to unless a write to the register ADDR_04, located in
the same register group, is performed first.
SCGA MPC_PCI PCICMD 80000CFC 0600 /w(nwf) /r(nwf)
SCGA MPC_PCI ADDR_04 80000CF8 04000080 /wo /hide
This command allows you to delete specific registers in a group or all registers in
a group.
Syntax
There are two ways to use this command. The first way causes all of the registers
included in a register group to be deleted. The register group will still be available.
SCGD Groupname
Groupname — This is the name of the register group that the registers are to be
deleted from.
This second way to use the SCGD command is to specify a register within a register
group to delete. In that case, only the specified register is deleted.
75
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Groupname — This is the name of the group where the register to delete is located.
Regname — This is the name of the register to delete from register group
Groupname.
Example
>BKM> SCGD SIM_MMU SIM_IBATOL
>BKM>
The SET VERBOSE ON command puts the emulator in verbose mode, which is
useful when diagnosing communication problems with your target. When the
emulator is not able to place your target in Background Mode after initialization, a
failure message is displayed:
Initializing Background Debug Mode...... Failed
Additional information about the failure may be obtained by using the verbose
mode at the > ERR > prompt. When in verbose mode, a number of pass/fail
diagnostic messages are displayed as the emulator attempts to place the target in
Background Mode. Using verbose mode will help you to diagnose why your target
cannot be placed in Background Mode.
NOTE: The tests described may vary depending on your target architecture.
76
3 Low-Level Commands
3.1 Low-Level Commands
Here is a brief description of the tests with some possible reasons why each test
would fail.
This tests the hardware connectivity, and examines the communications path
between the host and the emulator. If the test fails, ensure that you have the power
properly connected and turned on, that the emulator is correctly connected to the
host computer, and that your emulator hardware is properly connected to the
target.
If this test fails, verify that the paddle board is correctly connected to the emulator
unit. If it fails, it is likely that there is a problem with this paddle board. Verify that
the connection between the paddle board and the unit is secure, and that all of the
pins are intact.
This function tests the RESET signal of the JTAG connector to verify that it is high.
The emulator is not driving the RESET signal during this test, so the target must
drive the RESET signal via a pull-up resistor. If this test fails, check to see if the
target board has a pull-up resistor on the RESET signal to the HRESET pin of the
JTAG connector. Also, check the target board reset logic and verify that it is not
continually driving RESET low.
The RESET signal is a bi-directional signal for your unit. The emulator drives the
RESET signal low and clocks it back in to verify that it is low. If this test fails, you
may have contention on your reset signal. Check to see if a device on your target
board is continually driving reset high. Verify that the device on your target board
that is driving the RESET signal is an open collector device with a pull-up resistor.
77
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
During this test, the emulator stops the processor and attempts to establish JTAG
communications. If this fails, check to see that your hardware is connected
properly, and that the tests preceding this one passed accordingly. It is also possible
that there is contention on your board.
The emulator only drives RESET low for a specified period of time. After RESET is
driven low for the allotted time, it tri-states the RESET driver and clocks the RESET
signal back in to see if the RESET signal went high. It continues to check for RESET
to go high until is sees it go high or until you type Ctrl+X. If this test fails, check to
see if your target board reset logic is still driving the RESET signal low. Also check
that your target board has a pull-up resistor to drive RESET high.
This test verifies that the processor stopped during the preceding JTAG
Communications test by polling the processor status. If the target is still running,
this test fails.
This test verifies that you are properly configured for the appropriate target
processor by comparing the processor type on your target with the processor type
specified in your board file. If the test fails, use the CF TAR command to properly
configure your target. For example, if this test fails and you are using an MPC8260
board, execute a CF TAR 8260 command sequence in the OCD Command Shell.
This tests the JTAG communication using a slow internal clock rate.
This test only completes for the PowerPC 82xx designs. It attempts to verify the
location of the IMMR register, which serves as a pointer to all of the other registers.
If it fails, none of the internal registers are accessible. If the test fails, check the reset
configuration word, located in the Flash, and ensure that it is set to the correct
value.
78
3 Low-Level Commands
3.1 Low-Level Commands
This test examines the JTAG Communication between the emulator and the target
using the internal clock rate for which the emulator is configured. If this test fails,
use the CF CLK command to lower the internal clock rate.
NOTE: BDM is not currently supported for Wind River Probe. This section applies
only to Wind River ICE SX.
Here is a brief description of the tests with reasons why each test might fail.
79
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Testing Communication
This item checks the hardware connectivity, and examines the communications
path between the host and the emulator. If this fails, ensure that power is properly
connected and turned on, that the emulator is correctly connected to the host
computer, and that your emulator hardware is properly connected to the target.
This function tests the RESET signal of the BDM connector to verify that it is high.
The emulator is not driving the RESET signal during this test, so the target must
drive the RESET signal via a pull-up resistor. If this test fails, check to see if the
target board has a pull-up resistor on the RESET signal to the HRESET pin of the
BDM connector. Also, check the target board reset logic and verify that it is not
continually driving reset low.
The RESET signal is a bi-directional signal for your unit. The emulator drives the
RESET signal low and clocks it back in to verify that it is low. If this test fails, you
may have contention on your RESET signal. Check to see if a device on your target
board is continually driving RESET high. Verify that the device on your target
board that is driving the RESET signal is an open collector device with a pull-up
resistor.
The emulator only drives RESET low for a specified period of time. After the
debugger has driven RESET low for the allotted time, it tri-states the RESET driver
and clocks the RESET signal back in to see if the signal went high. It continues to
check for RESET to go high until is sees it go high or until you type Ctrl+X. If this
test fails, check to see if your target board reset logic is still driving the RESET
signal low. Also check that your target board has a pull-up resistor to drive RESET
high.
This test determines whether or not the processor is in Freeze state. The emulator
monitors the VFLS signals to see if the processor is frozen. These signals are high
if the processor is in the Freeze state. If the Freeze signal is being used instead of
the VFLS signals, then the emulator checks that the Freeze signal is high. This test
usually fails if the Hardware Reset Configuration word is incorrect. Verify that bits
D9 and D10 of the Reset Configuration Word are driven high and bits D11 and D12
80
3 Low-Level Commands
3.1 Low-Level Commands
are driven low during the reset. Bits D9 and D10 select the VFLS functionality on
the appropriate multifunction pins.
The emulator tests the serial communications channel by writing a test pattern to
register R00 and then reading register R00 to verify that the write was correct.
The emulator initializes the internal target registers. This test is not performed if an
INN command is used to initialize the target. The emulator initializes all registers
in enabled register groups. Register groups can be enabled or disabled with the
CF GRP command.
The emulator test the serial communication channel a second time by writing a test
pattern to register R00 and then reading register R00 to verify that the write was
correct. This test is repeated because the debug port may be inadvertently disabled
by the previous tests. If this test fails, check to make sure that the initial value for
the SUIMCR register does not disable the debug port.
The emulator initializes CPU registers that are loaded. If this fails, check your
register values.
The emulator automatically logs all of its command responses and error messages
in an internal buffer. The SH command allows you to display this text buffer, thus
displaying a history of the command responses.
Essentially, any ASCII characters that the emulator transmits to a host PC, either in
direct communication mode or as a response to a source-level debugger command,
are logged in this buffer. The system does not log commands that were received
from the host, only responses. In most cases, the emulator echoes back the received
81
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
command before it processes it, so that this echo of the original command is in the
history buffer.
Binary interfaces to source-level debuggers denote a special case of the SH
command. The emulator does not log its binary response to the source-level
debugger command; however, before the unit sends its binary packet to the host,
it logs the ASCII equivalent response in the history buffer. This can be extremely
useful in trapping target problems that may be hidden by the source debugger
interface. For example, the target may take a double bus fault, but the emulator has
no way to communicate this specific problem to the host debugger. The SH
command allows you to view the output history log, which in this case lets you
display the entire ASCII double bus fault message as you would have seen it had
you been in direct ASCII communication mode.
The emulator uses a 2K circular text buffer to log the history. The SH command
allows you to display the log backward (B) or forward (F) in the buffer. The default
is to display the log backward. The SH command also takes the number of lines
you wish to display as an optional parameter. If you use this parameter, the SH
command displays that number of lines forward or backward from the current
buffer pointer. The SH command, without the lines parameter, resets the buffer
pointer to the very last command that was logged. A carriage return immediately
following an SH command displays the next page of the buffer, either forward or
backward, depending on the previous SH command. The SH command is valid
from a > BKM >, > ERR >, >RUN> or >TRC> prompt.
Syntax
SHdirection number_of_lines
direction — This determines whether you display the log forward (F) or backward
(B). By default this option is set to B. Do not leave a space between SH and the
direction parameter.
number_of_units — This specifies the number of logged ASCII lines you wish to
display.
A carriage return immediately following a SH command repeats the SH command,
while updating the buffer pointer either forward or backward.
82
3 Low-Level Commands
3.1 Low-Level Commands
Examples
The Single-Step command steps the emulator count number of target instructions.
The default count is one instruction. There are optional arguments for displaying
registers and disassembling the last instruction that was just executed.
Syntax
SIarg1arg2 count
Example
In this example, single-step the target for one instruction. View the contents of the
registers and the instruction that was executed.
BKM>SIDIDR
D0 = 00000000 D1 = 00000000 D2 = 00000000 D3 = 00000000
D4 = 00000000 D5 = 00000000 D6 = 00000000 D7 = 00000000
A0 = 00200000 A1 = 00000000 A2 = 00000000 A3 = 00000000
A4 = 00000000 A5 = 00000000 A6 = 00000000 A7 = 00000000
USP= 00000000 SSP= 00000000 PC = 00000000 SR = 0000
VBR= 00000000 SFC = 0000 DFC = 0000
MOVE.W #$7F00,(A0)
BKM>
83
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command sets memory with data in byte, word (default), or long format,
starting at addr.
Using the syntax indicated below, the SM command allows both memory-relative
and register-relative addressing.
The SM command differs from the MM command in that the MM command only
modifies the memory at a specified address whereas the SM command reads back
the value to verify that it wrote correctly.
Syntax
SMunit base_addr data1 optional_data2 optional_dataN
unit — This parameter can be either B (byte), W (word), or L (long). By default, this
option is set to Word.
addr — This parameter is the target address at which to begin setting data.
data — This parameter can be one or more Hex strings of data in units.
The Set Memory command can also take an indirect address and a register-relative
address as parameters. The syntax is as follows:
SM(*addr)
Example
In this example, display the contents of memory both before and after setting three
bytes of memory to the specified values:
BKM>DMB 200010 3
200010: FF 0F 00
BKM>SMB 200010 0B 7F 34
BKM>DMB 200010 3
200010: 0B 7F 34
BKM>
Please see also the DM (Display Memory) command and the MM (Memory
Modify) command.
The SMD command is for supported architectures. This command is similar to the
SM command in that it sets memory with data starting at addr. However, it will
write data with full 64-bit write operations.
84
3 Low-Level Commands
3.1 Low-Level Commands
Using the syntax indicated below, the SMD command allows both
memory-relative and register-relative addressing.
Syntax
3
SMD addr data
Example
The following example first reads the memory at location 200010, then writes some
data to the location, and then reads it again.
>BKM>dmd 200010 3
00200010: FFFFDFFFFFFFFFFF FFFFFFFFFFFFFFFF ................
00200020: FFFFFFFFFFFFFFFD ................
>BKM>smd 200010 0B 7F 34
>BKM>dmd 200010 3
00200010: 000000000000000B 000000000000007F ................
00200020: 0000000000000034 .......4........
>BKM>
The SR command sets the register reg_name to the values designated by hex_string.
The all parameter is useful when clearing all of the registers.
Syntax
SR reg_name1 data1 reg_nameX dataX
reg_name1 — The name of the first register to have data added to it.
data1 — The data to add to reg_name1.
The reg_nameX dataX can be repeated for as many registers as you want to modify
at one time.
The other syntax that can be used for this command is shown below.
Example
In this example, display registers R00 and R01. Then modify the values of those
registers using the SR command, then display them again to verify their contents.
>BKM>dr r00 r01
R00 = 00000000 R01 = 00001234
85
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The Search for String command allows you to search for a string in memory. The
string may be an ASCII string or Hex data. The search begins at strt_addr and ends
at end_addr. If the string exists more than once in the block of memory, pressing
Enter continues the search.
Syntax
SSunit strt_addr end_addr string
unit — This parameter can be either H (hex) or A (ASCII). By default, this option is
set to ASCII.
strt_addr — This option is the starting address of the search.
end_addr — This option is the ending address of the search.
string — This is the string to search for.
Example
In this example, search for the ASCII string hello between 10000H and 12000H.
Find one string and continue the search until all of the locations are checked. There
is only one occurrence of this string in the memory that is searched.
BKM>SSA 10000 12000 hello
String found at 1000f
BKM>cr
String not found
BKM>
3.1.60 SY Commands
86
3 Low-Level Commands
3.1 Low-Level Commands
NOTE: Please note that some JTAG diagnostic commands are specific for different
processors, and do not necessarily support them all. Refer to command
descriptions for information on which processors each command supports.
3
SY HELP
This command lists all available commands and their syntax. It is for use with
PowerPC processors. Entering SY HELP displays the following SY commands:
SYNC : Synchronize the emulator with the target.
SY REV : Display the PVR Register value.
SY pci : Display the MPC106 PCI bridge Registers.
SY 106 mapa : Initialize the MPC106 for DRAM using mapA.
SY 106 mapb : Initialize the MPC106 for DRAM using mapB.
SY 106 sdram : Initialize the MPC106 for SDRAM using mapB.
SY BS : Display Boundary Information.
SY PROMPT : Force the prompt to BKM mode.
SY CHAIN : Display the loength of the LSRL chain.
SY MOD {ADDR} {VAL} : Modify one of the mpc106 registers.
SY PROG1 {ADDR} : Download basic program to target at ADDR.
SY PROG2 {ADDR} : Download read/write program to target at ADDR.
SY PROG3 {ADDR} : Download exception program to target at ADDR.
SY CMD <v> : Issue a COP command v=COP command
SY BAT : Display the BAT register formatted.
SY BAT
This command obtains the BAT registers and formats them to determine memory
blocks, sizes, and configurations. It is for use with PowerPC processors.
Name PageIndex BaseAddress Size W I M G Access Protection
IBAT0 fff00000 fff00000 16MEG 0 1 0 0 Supr & User Read Only
IBAT1 00000000 00000000 128MEG 0 0 1 0 Supr & User Read/Write
IBAT2 fe000000 fe000000 16MEG 0 1 0 0 Supr & User Read/Write
IBAT3 00000000 00000000 128K 0 0 0 0 Disabled
DBAT0 fff00000 fff00000 16MEG 0 1 0 0 Supr & User Read Only
DBAT1 00000000 00000000 128MEG 0 1 1 0 Supr & User Read/Write
DBAT2 fe000000 fe000000 16MEG 0 1 0 0 Supr & User Read/Write
DBAT3 00000000 00000000 128K 0 0 0 0 Disabled
SY BS
Scans out the boundary scan chain and displays most signals and their logic state.
For use with PowerPC processors. The (s) indicates a static signal read directly
87
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
from the pin. All others are based on the last clock before the processor has
stopped, as shown below.
Scan Address = ffffffff
QREQ = LOW QACK(s) = LOW
MCP(s) = HGH SRESET(s) = HGH
HRESET(s) = HGH CKSTPIN(s) = HGH
INT (S) = LOW AACK(s) = HGH
ABB = HGH DBB = HGH
DBG(s) = HGH DBDIS(s) = HGH
TS = HGH TA(s) = HGH
TEA(s) = HGH BR = HGH
BG(s) = LOW GBL = HGH
DRTRY(s) = HGH ARTRY = HGH
SMI(s) = HGH TLBSYNC = HGH
CKSTPOUT = LOW
PLL0..3(s) = 4 133Mhz
TSIZ = 0
TTx = 1f
SY CHAIN
This command scans and counts each bit throughout the scan chain to determine
its exact length. This is helpful to determine which processor you are working
with. Some PowerPC processors have scan chains that are not supported. This will
be the quickest indication that the processor and emulator are not compatible. The
command can be used with PowerPC processors.
Chain Length in bit = 7488
SY CMD value
This command provides a way to send JTAG commands directly to the JTAG
interface. The value(s) are any of the JTAG commands supported by the processor
you are working with. For use with PowerPC processors.
CPu is Stopped, BIST is Complete
SY PCI
Displays the MPC 106 configuration registers in big endian mode. This command
also displays the current map being used. For use with PowerPC processors.
Using MAP b........
Device and Vendor ID = 00021057 Memory Starting Address = ffff0800
Memory Ending Address = ffff0f07 Processor Configure #1 = ff341c48
88
3 Low-Level Commands
3.1 Low-Level Commands
The SY PROG command is used to write a tight loop of code at a given address.
This command is used to see if the processor is operational (can execute code out
of internal RAM, for example). The SY PROG1 command writes a tight loop
consisting of NOPs followed by a branch back. The SY PROG2 command writes a
tight loop to load and store instructions.
This command is only supported for PowerPC microprocessors.
Syntax
SY PROGn
n = 1, 2
Examples
Write a NOP loop to internal RAM, located at 0x2000 offset from IMMR register
(0xff000000):
BKM>sy prog1 ff002000
Write Load/Store loop to external RAM located at 0x40000:
BKM>sy prog2 40000
SY REV
This command scans out the PVR register of the processor and formats the value
into the product name and revision. For use with PowerPC processors.
Part PVR Value = 0x00060400, Stretch 603e Revision 4.0
SYNC or SY PROMPT
When the emulator enters error mode, the JTAG interface can resynchronize and
then the scan chain can be read. In some cases, this information can help diagnose
the reason for an error condition. This can be used with PowerPC processors.
Synchronization Complete. Current PC = 0xfff00100
89
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The SY MAP command provides the chip select start and end addresses for each
chip select when using the emulator with a PowerPC 8xx target.
Syntax
SY MAP
Example
BKM> sy map
IMMR = FF000000 -> FF003FFF
CS0 = FFF00000 -> FFFFFFFF
CS1 = FFE00000 -> FFE7FFFF
CS2 = 30000000 -> 3000FFFF
CS3 = 04000000 -> 0407FFFF
CS4 = 00000000 -> 003FFFFF
CS5 = DISABLED..
CS6 = DISABLED..
CS7 = DISABLED..
BKM>
Syntax
TD Enter
The target diagnostic functions are similar to the diagnostic functions (DF
commands) described previously in this chapter. The difference is that in this case,
the diagnostics are run directly on the target instead of through the emulator.
Typing TDF LIST at the >BKM> prompt displays a list of all of the available target
diagnostic functions. Typing TDF VERSION displays the versions of each of the
target diagnostic functions.
90
3 Low-Level Commands
3.1 Low-Level Commands
The code that runs the diagnostic will be loaded at the memory address indicated
by the CF WSPACE configuration option. Make sure you are not trying to test the
same memory area that you are specifying in CF WSPACE.
There are five target diagnostic function tests available. 3
This diagnostic function runs a simple RAM test through a single pass only.
Syntax
TDFunit 0 startaddress endaddress
Example
>BKM>tdf 0 1000 1100Single-pass Simple Memory Test loaded. Now executing TDF.
Test Complete
>BKM>
The TDF 1 command runs a simple RAM test continuously. This test can be
stopped by typing Ctrl+X.
Syntax
TDFunit 1 startaddress endaddress
Example
>BKM>TDF 1 1000 1100
Continuous Simple Memory Test loaded. Now executing TDF.
test looping press ^X to abort pass count 1
test looping press ^X to abort pass count 2
test looping press ^X to abort pass count 3
test looping press ^X to abort pass count 4
test looping press ^X to abort pass count 5
test looping press ^X to abort pass count 6
test looping press ^X to abort pass count 7
91
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The TDF 2 command runs a complete RAM Test for a single pass.
Syntax
TDFunit 2 startaddress endaddress
Example
>BKM>TDF 2 1000 1100Single-pass Complete Memory Test loaded. Now executing
TDF.
Test Complete
>BKM>
Syntax
TDFunit 3 startaddress endaddress
Example
>BKM>tdf 3 1000 1100Continuous Complete Memory Test loaded. Now executing
TDF.
92
3 Low-Level Commands
3.1 Low-Level Commands
The TDF 4 command runs a CRC test over a specified range of memory.
Syntax
TDFunit 4 startaddress endaddress
Example
>BKM>tdf 4 1000 1100CRC-16 Test loaded. Now executing TDF.
Completed... CRC-16 Value = 101
>BKM>
The TDFD command is for JTAG processors only. This command performs the
same functions as the TDF commands with full 64-bit read/write operations.
Syntax
The syntax for the TDFD command is the same as the syntax for all of the other TDF
commands, except that the unit option is not available since the unit is already set
to double with this command.
TDFD testnumber startaddress endaddress
testnumber — This is the number of the diagnostic test you wish to run. There are
five target diagnostic tests available, labelled 0 - 4.
startaddress — This is the address where the diagnostic test is to start.
endaddress — This is the address where the diagnostic test is to finish.
93
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
The TE command enables the non real-time software trace. Software trace is
disabled by default. Note that software trace is automatically activated (a >TRC>
prompt appears) if you set a software breakpoint on ROM code or a software data
breakpoint.
Syntax
TE
No arguments are required for this command. Please see also the CF (Configure)
command.
The TF commands are associated with programming Flash memory. There are a
number of usable TF commands, each with specific functions, as described in this
section.
The TF CONF command is used to configure the emulator for Flash programming
and erasing. This command allows you to specify the device type, target RAM
workspace, and base address. The actual erase and program instructions are
downloaded into the RAM workspace. The target processor then executes the
erase and program algorithms out of the RAM workspace.
Syntax
There are two different ways to use the TF CONF command. The first way is to use
the following syntax.
TF CONF
With this syntax, you are prompted to specify the start address of the RAM
workspace, and the start address of the Flash bank on your target.
NOTE: To use this command syntax to configure the emulator for Flash
programming, first use the TF DEVICE command to specify the Flash device on
your target and the TF CONF SIZE command to specify the RAM workspace size.
94
3 Low-Level Commands
3.1 Low-Level Commands
The syntax for the second method of using the TF CONF command is as follows:
TF CONF device_number RAM_workspace_address workspace_size base_address
device_number — This selects a device from a list of available devices. This is the
same number that is used with the TF DEVICE command. 3
RAM_workspace_address — This is the base address for the target RAM workspace.
workspace_size — This is the size (in bytes) required for the erase and program
algorithm in RAM.
base_address — The is the base address (in hex) of the Flash device.
Example
The first example assumes that Flash device AMD 29F040 (512x8) 4 devices is
selected using the TF DEVICE command, and uses the TF CONF syntax. Select
0xff002000 for the RAM workspace. The base address of the flash should be
0xffc00000.
>BKM>tf conf
- BDM TFlash programming Interface Settings -
Current device selected : AMD 29F040 ( 512 x 8 ) 4 Devices
Start of work space in target : 00000000 > 0FF00200
Start address of the flash : FFFFFFFF > FFC00000
>BKM>
Please see also the TF DEVICE command and the TF CONF SIZE command.
The TF CONF SIZE command is used to specify the RAM workspace size. This is
the size (in hex) required for the erase and program algorithm in RAM.
Syntax
TF CONF SIZE size_in_hex
Example
>BKM>TF CONF SIZE 0xFFFFFFFF
95
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
>BKM>
The TF DEVICE command is used to select the particular Flash device for erasing
and programming that is included on your target.
Syntax
TF DEVICE optional_device_number
You can use this command without the optional_device_number, and a list displays
of all of the available Flash devices with a corresponding device number. Using
this syntax, you can find your device on the list and enter the device number that
appears beside it.
You may also elect to specify an optional_device_number if you know the number of
your Flash device. That allows you to simply select that device, and does not
display all of the included Flash devices.
Example
Keep pressing ENTER to display additional pages of Flash devices. At the end of
the list, enter the number of your selection as shown.
96
3 Low-Level Commands
3.1 Low-Level Commands
For the second example, select device number 5 without displaying the list of
devices.
>BKM>tf device 5
>BKM>
The TF ERASE command is used to erase Flash device. Prior to using the TF ERASE
command, configure the emulator properly for Flash programming using the
TF DEVICE, TF CONF, and TF TIMEOUT commands. The erase algorithm is
downloaded into RAM workspace (which is specified using the TF CONF
command) on the target.
Syntax
TF ERASE optional_addr1 optional_addr2
optional_addr1 — This is the first address to erase (it must be a sector boundary)
optional_addr2 — This is the last address to erase (it must be a sector boundary)
If no optional addresses are given, the entire flash device is erased.
Examples
Erase the entire flash device, which was configured previously using the TF CONF
and TF DEVICE commands.
BKM>tf erase
AMD 29F016 ( 2048 x 8 ) 2 Devices
Erasing Flash(s)...Done
BKM>
Erase the Flash devices from sector boundary address 0xFFC00000 to 0xFFD00000
BKM>tf erase ffc00000 ffd00000
AMD 29F016 ( 2048 x 8 ) 2 Devices
97
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Erasing Flash(s)...Done
BKM>
The TF TEST command is used to test erasing and programming target flash. The
benefit of TF TEST is that a file is not required to program flash. Instead, the
emulator directly programs a 0x2ff Byte test pattern into the target Flash. The
TF TEST command downloads the erase and program algorithms into RAM
workspace (as determined by the TF CONF command). After downloading these
algorithms, execute the erase/program algorithms with the GO command. The
processor executes a software breakpoint when the algorithm completes.
The test pattern is *WRS_FLASH*_ (ASCII format) repeated for 0x2ff bytes.
Syntax
TF TEST
GO addr
addr — This is the start address of the erase and/or program algorithm.
Example
BKM>go FF00201c
RUN>
!HALT! - [msg90004] Unexpected software breakpoint encountered; PC=0xFF0022E0
BKM>dm ffc00000
FFC00000: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ...........................
BKM>
FFC00010: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ...........................
BKM>tf test
The flash algorithm : AMD 29F016 ( 2048 x 8 ) 2 Devices
has been loaded. The remaining Workspace is filled with a pattern
Flash to be programmed starts at = $FFC00000
98
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
TF TIMEOUT optional_seconds
optional_seconds — This is the time in seconds that Wind River Workbench waits
when erasing flash.
If no parameter is specified, this command shows you the present value for
timeout. Timeout values for both erase timeout and program timeout are
displayed.
The TF TIMEOUT command only allows you to modify the erasetimeout value.
The erasetimeout value can be any number of seconds between 1 and 500. The
progtimeout value can be any number of seconds between 1 and 8. To modify the
progtimeout value, use the following syntax:
TF PROGTIMEOUT seconds
Example
Set the erasetimeout period to 30 seconds.
>BKM>tf timeout 30
>BKM>
99
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
This command provides a list of the starting addresses of all of the different sectors
of your Flash device based on the Flash algorithm that you have specified.
Syntax
TF UPLOAD SECTOR
Example
>BKM>tf upload sector
Sector 0 : 0x00000000
Sector 1 : 0x00040000
Sector 2 : 0x00080000
Sector 3 : 0x000C0000
Sector 4 : 0x00100000
Sector 5 : 0x00140000
Sector 6 : 0x00180000
Sector 7 : 0x001C0000
>BKM>
100
3 Low-Level Commands
3.1 Low-Level Commands
Syntax
[SB, IHBC] breakAddress > TRG
SB sets the system to trigger on a software breakpoint.
3
IHBC sets the system to trigger on an internal hardware breakpoint.
breakAddress = the breakpoint address.
Example
Hardware Breakpoints
2. HBC 00040578 BRK enabled (i0.0) Trigger is ENABLED
RUN >
!BREAK! - [msg12000] Software breakpoint; PC = 0x00041244
BKM >
101
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Syntax
TRGOUT
102
4
Wind River ICE Network
Operation Commands
NOTE: This chapter applies only to the Wind River ICE SX emulator.
4.1.1 APPLOAD
Syntax
APPLOAD processor:designator:Filename
processor = This is the processor that is resident on your target, such as MPC8260.
designator = This is the reference designator that is assigned to the device that you
are loading the firmware for. It is the designator that identifies that device in the
JTAG scan chain, and it is the parameter that you specify in your board file.
Filename = This is the name of the board file to be loaded.
designator and Filename are optional in this command. If there is only a single
device on the JTAG scan chain, you only need to specify a processor.
103
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Example
*****************************************************************************
Wind River ICE Target Driver
Copyright (c) 2004, Wind River Systems, Inc. All rights reserved
*****************************************************************************
Firmware Type PPC82XX Version 1.0q Created On: Jul 23 2002 17:45:20
Starting TCP BKM tools server ESTD0 [ 1234] ........ PASSED
Starting TCP BKM tools server TCPD0 [ 1235] ........ PASSED
Starting TCP BKM tools server LOADD0 [ 1236] ........ PASSED
Starting TCP TGTVIO server TVIOD0 [ 1237] ........ PASSED
Starting with Saved Parameters....................... PASSED
*****************************************************************************
WIND River ICE UJD module
Copyright (c) 2002, Wind River Systems, Inc. All rights reserved
*****************************************************************************
Firmware Type UJD Module Version 1.0m Created On: Jul 23 2002 14:47:02
Initializing the UJD module.......................... PASSED
Attaching to the UJD Module.......................... PASSED
!PORT! - [ 1234] Attached to the Application Task.... PASSED
>NET>display
module_name:parms port
ppc82xx.elf:U0:Motorola_2_PPC8260.brd 1234
servers.elf N/A
>NET>
4.1.2 ARP
Syntax
arp [-a] [-d] [-s] [host]
Synopsis
Description:
The ARP command allows for various operations on the network Address
Resolution Protocol table (ARP table). The ARP table translates IP addresses into
104
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
Ethernet addresses and vice versa. The simplest form of the ARP command is ARP
host where host is the IP address of another node. The command will display the
associated Ethernet address for host if it is in the ARP table. The command ARP -a
displays the entire contents of the ARP table.
It is possible to remove a host from the ARP table with the command ARP -d host
4
where host is the IP address of the node you wish to delete. This is sometimes
useful for testing or if a host changes its Ethernet address.
Hosts can be manually added to the ARP table with the command ARP -s host
ether_addr. In this case, host is the IP address you wish to associate with ether_addr.
ether_addr is a 6 byte number delimited with colon characters (for example,
00:0A:00:99:01:ff).
4.1.3 BKM
Syntax
BKM [-n]
Synopsis
Description
The BKM command allows users to open a channel to the BDM board and interact
with the target via the BKM commands. Upon entering BKM Mode, the >NET>
prompt will disappear and be replaced by a >BKM> prompt. All commands and
responses will be from the BDM card in the Wind River ICE SX. To exit from the
>BKM> prompt, type CTRL+D. This will return a >NET> prompt. The -n option
suppresses sending an initial new line character. This is useful in some instances
since a new line will restart an old BKM command.
Before a BKM command will pass, you need to perform an APPLOAD. See the
APPLOAD command.
Example:
NET> bkm
>BKM>
>BKM> in
105
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
***********************************************************************
Wind River ICE Initialization Sequence.
Copyright (c) Wind River Systems, Inc., 1999-2004. All rights reserved.
***********************************************************************
WIND River ICE UNIT#= none
Support Expires....... 01/01/1995
Warranty Number....... demo
Target Processor...... 68341
Serial Baud Rate...... 38400
Host Debugger......... PSOS
VisionControl Serial#= none Firmware=c2.8a / 6.0x
Type CF For A Menu of Configuration Options
Initializing Background Debug Mode........Successful
>BKM> ^D
NET>
4.1.4 BOOTLOG
Syntax
BOOTLOG
Description
The BOOTLOG command displays the tests that were run during the last
Wind River ICE SX reset. The information that is displayed includes information
about the network configuration for Wind River ICE SX, as well as all of the
hardware and firmware tests that were run and whether or not they passed.
Example
The following is the display that appears when the BOOTLOG command is entered
at the >NET> prompt.
****************************************************************************
Wind River ICE SX Ethernet Platform
Copyright (c) 2004, Wind River Systems, Inc. All Rights Reserved
****************************************************************************
Firmware Type Wind River ICE SX BSP Version 1.2f Created On: Jun 10 2004
14:06:39
Configuring TCP/IP Network Suite:
IP Address......DHCP
DHCP Sending DISCOVER 0 - 1 - +
DHCP OFFER received
DHCP Sending REQUEST 0 - 1 - +
DHCP ACK received
DHCP Server at 172.16.12.114 returned IP address 172.16.17.35
DHCP IP address 172.16.17.35 lease time - 7 days, 0 hours, 0 min
Netmask.........DHCP = 0xFFFF0000
106
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
4.1.5 CAT
Syntax
CAT filename
filename = This is the name of the file in Wind River ICE SX that
you wish to display.
Description
The CAT command displays the contents of a file in the Wind River ICE SX Flash
File System in ASCII format.
Example
The following example uses the CAT command to display the contents of the
8260_2.xml file in ASCII format.
>NET>cat 8260_2.xml
<DEVICE_TABLE>
<TABLE_MODE>SLOW</TABLE_MODE>
<TABLE_CLOCK>6MHZ</TABLE_CLOCK>
<!--Enable Multiple devices on a chain-->
<TABLE_MULTI>ENABLE</TABLE_MULTI>
<DEVICE>
<NAME>8260_1</NAME>
<DESCRIPTION>8260 Processor</DESCRIPTION>
<TYPE>MICROPROCESSOR</TYPE>
<TARGET>8260</TARGET>
<DESIGNATOR>U0</DESIGNATOR>
<IR_LEN>8</IR_LEN>
</DEVICE>
107
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
<DEVICE>
<NAME>8260_2</NAME>
<DESCRIPTION>8260 Processor</DESCRIPTION>
<TYPE>MICROPROCESSOR</TYPE>
<TARGET>8260</TARGET>
<DESIGNATOR>U1</DESIGNATOR>
<IR_LEN>8</IR_LEN>
</DEVICE>
</DEVICE_TABLE
>NET>
4.1.6 COMTAP
NOTE: You must make a connection with your software before executing a
COMTAP session.
Syntax
COMTAP process_name [-o | -i] [-b]
where process_name is the name of the server to tap (for example, bkm or tcpd)
[-o | -i] will trace only output or only input (both by default)
[-b] will monitor binary protocols (ASCII by default)
Synopsis
Description:
Examples:
NET>comtap bkm -o /* Will echo BKM data to a telnet session */
NET>comtap bkm -o -b /* Will display dump of BKM data to telnet session*/
NET>comtap udpd /* Will monitor all UDP debugger transactions */
NET>comtap loadd -o /* Will monitot all LOADER ASCII data net->host */
Exceptions:
■
Monitoring tcpd or udpd is always done in Binary Mode.
■
Loading .BDX files will only display initial ASCII sequence unless the -b
switch is specified.
108
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
■
Since all data is echoed in BDM Mode, the -o switch should be used unless you
are interested in double echo of input.
■
BKM is a legal process name (even if it does not show up in a pstat) as long as
a BKM session is active.
COMTAP can only be used from Telnet sessions. It will simply return on the RS232 4
console. To exit Comtap Mode, press the ENTER key in the Telnet session
displaying the monitored data. Note that there may be some data queued up, so it
may take a moment before output stops.
To see a list of running processes that are available for a COMTAP session, type the
command PSTAT at the >NET> prompt.
4.1.7 DATE
Syntax
DATE [yyyymmddhhmm[.ss]]
Synopsis
Displays and/or sets the current system calendar date and time of day.
Description
The Wind River ICE SX system maintains a calendar date and time while it is
running. This is used primarily for system log purposes to time correlate data.
Entering the date command with no arguments yields the current system date and
time of day. At system startup, the date is set to January 1, 1990 at midnight.
You may change the system date, although it is not necessary to do so unless you
wish to use the system date/day to time the duration of tests, etc.
Example:
NET> date
0:15:20 Jan 1 1990
NET> date 199403050900.00
9:0:0 Mar 5 1994
NET> date
9:0:1 Mar 5 1994
NET>
109
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
4.1.8 DEFRAG
Syntax
DEFRAG
Description
Example
The following example illustrates the output that appears when the DEFRAG
command is being used.
>NET>defrag
Defragmenting the FFS will free up invalid blocks
!DO NOT reset or power-cycle the ICE during this operation
>NET>
4.1.9 DIR
Syntax
DIR
Description
The DIR command displays all of the files that are currently stored in
Wind River ICE SX.
Example
>NET>dir
Volume in FFS is 45.0.0
2048 BITMAP.SYS
14336 FLIST.SYS
1850316 81v3r16p.bin
18575 vp_dll.cfg
108681 cachsp2k.elf
211408 xyimage.hex
211408 flxppc6xx.hex
216561 servers.elf
1668785 msc81xx.elf
453 Motorola_8101ADS.brd
343860 MSC81XX_U17.dat
110
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
347 BD_WRS8260.brd
7104 tdfppc.bin
126497 cache6xx.elf
303720 ppcjtflh.bin
304984 ppcjtflhr.bin
2544929 ppc82xx.elf
343860 MPC82XX_U1.dat
347 BD_WRS82xx.brd 4
854560 flashbsp.bin
628 8260_2.xml
343860 MPC82XX_U0.dat
22 file(s) 9477267 bytes
0 dir(s) 17564525 bytes free
>NET>
4.1.10 DISPLAY
Syntax
display
Description
The DISPLAY command displays information about the application firmware that
you have running on your Wind River ICE SX unit. Entering the DISPLAY
command without any parameters will list all of the application firmware that is
currently running on your Wind River ICE SX unit.
Example
4.1.11 ETHSETUP
Syntax
ETHSETUP
Synopsis
111
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Description
The ETHSETUP command allows users to modify the non-volatile copy of the
Ethernet setup parameters. Unlike the Configuration Switch method, ETHSETUP
allows users to return to the >NET> prompt. Any new parameters will take effect
after the next hardware reset (reset performed by tripping the switch on the rear of
the emulator) or RESET command.
Example
>NET>ethsetup
Ethernet Setup Mode
Select from the operations below
1. Display Basic IP parameters 2. Modify Basic IP parameters
3. Display Routing parameters 4. Modify Routing parameters
5. Display Server parameters 6. Modify Server parameters
7. View ethernet address 8. Save parameters
9. Exit setup mode 10. Port A/B select
11. Advanced Options
Make a selection:
4.1.12 HELP
Syntax
HELP topic
Synopsis
Description
The HELP command displays help for a given topic (when a topic is specified) or
general help concerning available commands when entered with no arguments.
Example:
>NET>help
appload arp bkm bootlog brd cat cd
coldstart comtap date defrag dir display download
du echo ethsetup firmup help ifconfig load
netinfo netstat ping pstat query reset route
runtime sync syslog unload version ftp telnet
tftp tget tput update
>NET>help appload
Command Description Syntax
======= ===================== ==================================
appload Load a application with APPLOAD </t/s(hostip or hostname)>
112
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
4.1.13 IFCONFIG
4
Syntax
IFCONFIG interface_number
[ af [ address [ dest_addr ] ] [ up ] [ down ]
[netmask mask ] [ broadcast broad_addr ] ]
[ arp | -arp ]
ifconfig -a
Synopsis
Description
The IFCONFIG command allows viewing and modifying of the network interfaces
in Wind River ICE SX. There are two interfaces available: The Ethernet interface
and Loopback interface. The Loopback interface should never need modification.
When combined with just the -a switch, the IFCONFIG command will display the
state of the network interfaces, as shown below:
>NET>ifconfig -a
1: flags=120201<BROADCAST,UP>
inet 172.16.17.35 netmask ffff0000 broadcast 172.16.255.255
6: flags=212<NOARP,UP>
inet 127.0.0.1 netmask ff000000
>NET>
When used in combination with other flags, the IFCONFIG command allows users
to temporarily change the network interface settings. The new settings will be lost
on power-off or reset unless they are programmed using the ETHSETUP command.
The example below shows how to change Wind River ICE SX's IP address:
NET> ifconfig 3 192.9.201.10 up
NET> ifconfig -a
1: flags=120201<BROADCAST,UP>
inet 192.9.200.103 netmask ffffff00 broadcast 192.9.200.255
3: flags=202<NOARP,UP>
inet 192.9.201.10 netmask ffffff00
NET>
113
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
4.1.14 NETINFO
Syntax
NETINFO
Description
The NETINFO command returns information about the Wind River ICE SX
network configuration, including the IP address, netmask, and broadcast address.
Example
>NET>netinfo
TCP/IP on PORT B
1: flags=120201<BROADCAST,UP>
inet 172.16.17.35 netmask ffff0000 broadcast 172.16.255.255
>NET>
4.1.15 NETSTAT
Syntax
NETSTAT [-a, -i, -r, -s]
Description
The NETSTAT command displays information about the TCP/IP protocol stack in
Wind River ICE SX. It operates in a fashion similar to the NETSTAT command in a
UNIX environment. The example below shows the output from various forms of
the NETSTAT command.
Example
>NET>netstat
Proto Local Address Foreign Address (state)
tcp 172.16.17.35.1234 172.16.18.142.1957 ESTABLISHED
>NET>netstat -a
Proto Local Address Foreign Address (state)
udp 0.0.0.0.520
udp 0.0.0.0.111
114
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
udp 0.0.0.0.2049
udp 0.0.0.0.771
udp 0.0.0.0.1024
udp 0.0.0.0.68
udp 0.0.0.0.69
tcp 0.0.0.0.1237 0.0.0.0.0 LISTEN
tcp 0.0.0.0.111 0.0.0.0.0 LISTEN
tcp 0.0.0.0.1233 0.0.0.0.0 LISTEN 4
tcp 0.0.0.0.1236 0.0.0.0.0 LISTEN
tcp 0.0.0.0.23 0.0.0.0.0 LISTEN
tcp 0.0.0.0.1232 0.0.0.0.0 LISTEN
tcp 0.0.0.0.1024 0.0.0.0.0 LISTEN
tcp 172.16.17.35.1234 172.16.18.142.1957 ESTABLISHED
tcp 0.0.0.0.21 0.0.0.0.0 LISTEN
tcp 0.0.0.0.1235 0.0.0.0.0 LISTEN
>NET>netstat -i
I/F Mtu Address Ipkts Ierrs Opkts Oerrs Queue
1 1500 172.16.17.35 32232 0 1993 0 100
6 1536 127.0.0.1 151 0 151 0 0
>NET>netstat -r
Destination Gateway Flags Interface
default 172.16.1.1 UG 1
127.0.0.1 127.0.0.1 U 6
172.16.0.0 172.16.17.35 U 1
>NET>netstat -s
udp:
11123 datagrams delivered to users
0 datagrams received for unknown ports
281 datagrams received with other errors
997 datagrams sent
tcp:
1104 segments sent
0 segments retransmitted
0 segments sent with RST flag
1139 segments received
0 segments received in error
0 failed TCP connection attempts
1 TCP connections reset
ip:
13581 received from interfaces
0 drops due to format errors
1038 drops due to invalid addresses
0 drops due to unknown protocol
0 discarded with no problems
2101 supplied by IP user protocols
0 dropped due to no routes
0 IP datagrams forwarded
>NET>
115
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
4.1.16 PING
Syntax
PING [-s] host_ip [repeat_count]
Synopsis
Description
The PING command provides a method to test that a connection can be established
over the network to a specific host. It is very useful in diagnosing the ability to send
packets to and from a host from the Wind River ICE SX unit.
By specifying the -s switch, the PING command will repeat the operation 10 times
or repeat_count times. When reporting results, the PING command will print the
elapsed time to send/receive for each ICMP ECHO_REQUEST / ECHO_REPLY pair.
The time is rounded to the nearest millisecond.
4.1.17 PSTAT
Syntax
PSTAT
Synopsis
Description
Type Description
116
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
Type Description
Example:
>NET>pstat
NAME TSK_ID TYPE PRIORITY STATE
--------------------------------------------------------------------------
dhcp 00000017 DynProc 00000025 ConnWait 0.0.0.0 (0)
TGTCONS *00000026 PrmServ 00000190 ConnWait 0.0.0.0 (1232)
SHELLD *00000027 PrmProc 00000065 ConnWait 0.0.0.0 (1233)
PPC82XX 00000045 00000180 running
ESTD0 *00000047 PrmServ 00000200 Connected to 172.16.18.142
(1957)
TCPD0 *00000048 PrmServ 00000200 ConnWait 0.0.0.0 (1235)
LOADD0 *00000049 PrmServ 00000210 ConnWait 0.0.0.0 (1236)
TVIOD0 *00000050 PrmServ 00000190 ConnWait 0.0.0.0 (1237)
UJD 00000066 PrmServ 00000210 running
* = Tapable with comtap
>NET>
4.1.18 QUERY
Syntax
QUERY
Description
The QUERY command displays a list of all of the firmware versions that are
currently stored in the Wind River ICE SX Flash File System. The display is a table
that includes the file names, the type of file, the version of the firmware, and the
date and time that it was added to Wind River ICE SX.
Example
>NET>query
FFSNAME NAME TYPE VER DATE/TIME
--------------------------------------------------------------------
cachsp2k.elf STARCORE TARGET APP 1.6p May 21 2002 14:36:13
servers.elf UJD Module SERVER 1.0h Jun 13 2002 15:27:28
msc81xx.elf STARCORE TARGET APP 1.6p May 21 2002 14:36:31
117
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
4.1.19 RESET
Syntax
RESET
Synopsis
Description
The RESET command power cycles the Wind River ICE SX unit. This command is
provided as a convenience and is typically issued after using the ETHSETUP
command to modify the basic operating parameters of the Wind River ICE SX unit.
4.1.20 ROUTE
Syntax
ROUTE [ADD,DELETE] [hostip|netip] destination [gateway [metric]]
Synopsis
Description
The ROUTE command allows users to temporarily add and delete network routes
on Wind River ICE SX. To permanently add/delete routes, use ETHSETUP or
consult your software documentation if dynamic routing is enabled. The ROUTE
command is provided primarily for the purpose of testing routing entries or
adding temporary routes.
Example:
NET> netstat -r
Destination Gateway Flags Interface
127.0.0.1 127.0.0.1 U 3
192.9.200.0 192.9.200.103 U 1
NET> route add 192.9.201.0 192.9.200.100 1
assuming route via gateway
118
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
4.1.21 RUNTIME
Syntax
RUNTIME
Description
The RUNTIME command displays the length of time in days, hours, minutes, and
seconds since the last Wind River ICE SX initialization.
Example
>NET>runtime
4.1.22 SYSLOG
Syntax
SYSLOG
Synopsis
Displays a log of the last 25 events on the Wind River ICE SX unit.
Description
Wind River ICE SX maintains a log of the last 25 significant events that have
occurred since the last time it was reset. These events are stored in a FIFO that can
119
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
be displayed by using the SYSLOG command. The SYSLOG command is useful for
looking at the usage of particular facilities on Wind River ICE SX.
In addition to usage information, any abnormal conditions are also saved in the
system log. For example, if a server loses synchronization with a client and restarts
itself, a message will be placed in the system log.
System log information is shown with the most recent event first, followed by
older events. The time stamps are relative to system start time or the last time/date
set command. The format of the time is dd:hh:mm:ss.
Example:
>NET>syslog
[00:00:00:06] LOADAPPS : bootapps.lst not found in FFS
[00:00:00:06] TGTCONS : Server awaiting connection.
[00:00:00:06] TGTCONS : Starting TCP TGTCONS server TGTCONS [ 1232]
[00:00:00:06] FFS : Task Started
[00:00:00:00] DHCP : Rebinding Time - 6 days, 3 hours, 0 min
[00:00:00:00] DHCP : Renewal Time - 3 days, 12 hours, 0 min
[00:00:00:00] DHCP : BOUND state
[00:00:00:00] DHCP : daemon started
>NET>
4.1.23 TELNET
Syntax
TELNET IP_Address
Synopsis
Allows connection to other telnet capable hosts from the RS232 console.
Description
The TELNET command allows users to telnet from the RS232 console on
Wind River ICE SX to any other host on the network that Wind River ICE SX can
talk to. The telnet client in Wind River ICE SX is a close implementation of the BSD
telnet command found in most UNIX systems.
4.1.24 UNLOAD
Syntax
UNLOAD port_number or NameOfProcess
120
4 Wind River ICE Network Operation Commands
4.1 Wind River ICE SX Network Command Reference
port_number = This is the port number that was assigned to your activated
firmware during the APPLOAD command. You can view the port number using
the DISPLAY command.
NameOfProcess = You can specify the name of the application firmware that you
wish to deactivate instead of its associated port number. View the name of the
4
application using the DISPLAY command.
Instead of specifying a port number or a process name, using the command
UNLOAD * will unload all active firmware sets.
Description
Wind River ICE SX supports dynamic firmware uploads and downloads. The
UNLOAD command can be used to dynamically deactivate any set of firmware
that is currently active on the Wind River ICE SX unit. Currently active processes
can be viewed using the DISPLAY command.
Example
The first example uses the display command to view the active sets of firmware.
Then a set of firmware is deleted using the UNLOAD command.
>NET>display
module_name:parms port
ppc82xx.elf:U0:Motorola_2_PPC8260.brd 1234
servers.elf N/A
>NET>unload /1234
The second example uses the UNLOAD * command to delete two sets of firmware
that are active simultaneously.
>NET>unload *
4.1.25 VERSION
Syntax
VERSION
121
Wind River Workbench
On-Chip Debugging Command Reference , 2.3
Description
The VERSION command displays the build date and revision number of the
Wind River ICE SX firmware.
Example:
>NET>version
******************************************************************
Wind River ICE Ethernet Controller.
Copyright (c) Wind River Systems, Inc., 1999-2004. All rights reserved.
******************************************************************
Firmware Type BSP Version 1.2f Created On: Jun 10 2002 14:06:39
OS version = V2.5.0
REPC version = V2.5.0
NA version = V4.0.5
>NET>
122