Abatron bdiWind PowerPC MPC8xx User manual

bdi
Wind
BDM interface for Tornado
™
PowerPC MPC8xx/MPC5xx
User Manual
ManualVersion 1.38 for BDI2000
©1997-2007 by Abatron AG

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 2
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
1 Introduction .................................................................................................................................4
1.1 BDI2000.................................................................................................................................4
1.2 BDI Configuration ..................................................................................................................5
2 Installation ...................................................................................................................................6
2.1 Connecting the BDI2000 to Target.........................................................................................6
2.1.1 Changing Target Processor Type .................................................................................8
2.2 Connecting the BDI2000 to Power Supply.............................................................................9
2.2.1 External Power Supply.................................................................................................9
2.2.2 Power Supply from Target System.............................................................................10
2.3 Status LED «MODE»...........................................................................................................11
2.4 Connecting the BDI2000 to Host.........................................................................................12
2.4.1 Serial line communication..........................................................................................12
2.4.2 Ethernet communication ............................................................................................13
2.5 Installation of the Configuration Software............................................................................14
2.6 Initial configuration of the bdiWind system ..........................................................................15
2.7 Testing the BDI2000 to host connection ..............................................................................15
2.8 TFTP server for Windows NT...............................................................................................16
3 Using bdiWind...........................................................................................................................17
3.1 Principle of operation...........................................................................................................17
3.1.1 Gateway mode ...........................................................................................................17
3.1.2 Agent mode................................................................................................................18
3.2 Configuration File ................................................................................................................20
3.2.1 Part [INIT]...................................................................................................................21
3.2.2 Part [TARGET] ...........................................................................................................22
3.2.3 Part [HOST]................................................................................................................25
3.2.4 Part [FLASH]..............................................................................................................26
3.2.5 Part [REGS] ...............................................................................................................32
3.3 BDM GATEWAY mode.........................................................................................................34
3.3.1 Create a new directory for your hardware..................................................................34
3.3.2 Tornado 1.01 and Tornado II ......................................................................................35
3.3.3 Tornado II ...................................................................................................................36
3.3.4 Tornado 1.01 ..............................................................................................................37
3.3.5 bdiWind UDP-lite packet driver ..................................................................................38
3.3.5.1. Transferring the communciation base address............................................38
3.3.5.2. Polling for requests......................................................................................39
3.3.5.3. Automatic change to Agent mode...............................................................39
3.3.6 PPC Interrupt Handling..............................................................................................40
3.4 AGENT mode ......................................................................................................................41
3.4.1 Target setup................................................................................................................41
3.4.2 Configure VxWorks ....................................................................................................41
3.4.3 Target Server Setup ...................................................................................................42
3.4.4 Debugging with GDB..................................................................................................42
3.4.5 PPC Interrupt Handling..............................................................................................43
3.5 Serial GATEWAY mode .......................................................................................................44
3.5.1 Target connection.......................................................................................................44
3.5.2 VxWorks configuration ...............................................................................................45
3.6 Target serial I/O via BDI.......................................................................................................46
3.7 Telnet Interface ....................................................................................................................47
4 Specifications............................................................................................................................49
5 Environmental notice................................................................................................................50

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 3
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
6 Declaration of Conformity (CE)................................................................................................50
7 Warranty.....................................................................................................................................51
Appendices
A BDI2000 Setup/Update .............................................................................................................52
B Troubleshooting........................................................................................................................54
C Maintenance..............................................................................................................................55
D Trademarks................................................................................................................................57

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 4
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
1 Introduction
bdiWind enhancesTornado, the latest generation of development and execution environment for em-
bedded and real-time applications, with Background Debug Mode (BDM) debugging for MPC8xx/
MPC5xx based targets.With bdiWind there is no need for Boot ROMs, because theVxWorks core is
automatically loaded into the target RAM after every target restart.With the builtin Ethernet interface
you get a very fast download speed of up to 150Kbytes/sec. This combination loads a typical Vx-
Works core in a few seconds.No target communication channel (e.g.serial line) is wasted for debug-
ging purposes.Even better, you can use fast Ethernet debugging with target systems without network
capability. In contrast to ICE debugging, bdiWind supports task mode and system mode debugging.
The following figure shows how the BDI2000 interface is connected between the host and the target:
1.1 BDI2000
The BDI2000 is the main part of the bdiWind system. This small box implements the interface be-
tween the BDM pins of the target CPU and a 10Base-T Ethernet connector. The firmware and the
programable logic of the BDI2000 can be updated by the user with a simple Windows based config-
uration program.The BDI2000 supports 1.8 – 5.0Volts target systems (3.0 – 5.0Volts target systems
with Rev. A/B).
UNIX / PC Host
To r nado
Development
Environment
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
Target System
BDM Interface
Ethernet (10 BASE-T)
MPC
8xx

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 5
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
1.2 BDI Configuration
As an initial setup, the IP address of the BDI2000, the IP address of the host with the configuration
file and the name of the configuration file is stored within the flash of the BDI2000.
Every time the BDI2000 is powered on, it reads the configuration file viaTFTP.
Following an example of a typical configuration file:
; bdiWind configuration file for MPC860ADS board
; ----------------------------------------------
;
[INIT]
; init core register
WSPR 638 0x02200000 ;IMMR : internal memory at 0x02200000
WSPR 158 0x00000007 ;ICTRL:
; init SIU register
WM32 0x02200000 0x01632440 ;SIUMCR
WM32 0x02200004 0xFFFFFF88 ;SYPCR
WM16 0x02200200 0x0002 ;TBSCR
WM16 0x02200220 0x0102 ;RTCSC
WM16 0x02200240 0x0002 ;PTSCR
; init UPM
SUPM 0x02200168 0x0220017c ;set address for MCR and MDR
WUPM 0x00000000 0x8FFFEC24 ;UPMA single read
WUPM 0x00000001 0x0FFFEC04
WUPM 0x00000002 0x0CFFEC04
WUPM 0x00000003 0x00FFEC04
..........
WUPM 0x0000003C 0x33FFCC07 ;UPMA exception
WUPM 0x0000003D 0xFFFFFFFF
WUPM 0x0000003E 0xFFFFFFFF
WUPM 0x0000003F 0xFFFFFFFF
; init memory controller
WM32 0x02200104 0xFFE00D34 ;OR0 : 2MB, all accesses, 6ws, time relax
WM32 0x0220010C 0xFFFF8110 ;OR1
WM32 0x02200114 0xFFC00800 ;OR2
WM32 0x02200100 0x02800001 ;BR0
WM32 0x02200108 0x02100001 ;BR1
WM32 0x02200110 0x00000081 ;BR2
WM16 0x0220017A 0x0400 ;MPTPR : divide by 16
WM32 0x02200170 0x13A01114 ;MAMR
[TARGET]
CPUCLOCK 25000000 ;the CPU clock rate after processing the init list
BDIMODE AGENT ;the BDI working mode (LOADONLY | AGENT | GATEWAY)
BREAKMODE SOFT ;<AGENT> SOFT or HARD, HARD uses PPC hardware breakpoints
MEMBASE 0 ;<AGENT> base of target memory
MEMSIZE 0x400000 ;<AGENT> size of target memory
POOLBASE 0x300000 ;<AGENT> base of host controlled target memory
POOLSIZE 0x100000 ;<AGENT> size of host controlled target memory
[HOST]
IP 151.120.25.100
FILE F:\TornadoPPC\target\config\860agent\vxworks
FORMAT ELF
LOAD AUTO ;<AGENT> load VxWorks code MANUAL or AUTO after reset
DEBUGPORT 0x4321
Based on the information in the configuration file, the target is automatically initialized after every re-
set.

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 6
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2 Installation
2.1 Connecting the BDI2000 toTarget
The cable to the target system is a ten pin flat ribbon cable. In case where the target system has an
appropriate connector, the cable can be directly connected.The pin assignment is in accordance with
the Motorola specification.
In order to ensure reliable operation of the BDI (EMC, runtimes, etc.) the target cable length must not
exceed 20 cm (8").
For BDI MAIN / TARGET A connector signals see table on next page.
!
BDI TRGT MODE BDI MAIN BDI OPTION
Target Connector
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
Target System
MPC
8xx
9
1
10 2
The green LED «TRGT» marked light up when target is powered up
1 - VFLS0
2 - SRESET
3 - GROUND
4 - DSCK
5 - GROUND
6 - VFLS1
7 - HRESET
8 - DSDI
9 - Vcc Target
10 - DSDO
1
9
210
Rev. A
«Rev. A» is the first BDI2000 version, produced until June 1999
Target Connector
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
Target System
MPC
8xx
The green LED «TRGT» marked light up when target is powered up
1 - VFLS0
2 - SRESET
3 - GROUND
4 - DSCK
5 - GROUND
6 - VFLS1
7 - HRESET
8 - DSDI
9 - Vcc Target
10 - DSDO
1
9
210
Rev B/C
BDI TRGT MODE TARGET A TARGET B
9 1
10 2

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 7
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
BDI MAIN /TARGET A Connector Signals:
Mention of sources used: MPC860ADS User’s Manual, Revision A
Enhanced Debug Mode Detection:
For MPC8xx and MPC555 targets, debug mode (Freeze) detection also works when the BDM con-
nector pins VFLS0 and VFLS1 are not connected to the target.If not connected toVFLSx, this BDM
connector pins should be left open or tied toVcc.The BDI uses the following algorithm to check if the
target is in debug mode (freezed):
BOOL PPC_TargetFreezed(void) {
if ((VFLS0 != 1) | (VFLS0 != 1)) return FALSE;
read debug port status;
if (status == freezed) return TRUE;
else return FALSE;
Pin Name Describtion
1VFLS0 These pin and pin 6 (VFLS1) indicate to the debug port controller whether or not the MPC
is in debug mode.When both VFLS0 and VFLS1 are at "1", the MPC is in debug mode.
2 SRESET This is the Soft-Reset bidirectional signal of the MPC8xx. On the MPC5xx it is an output.
The debug port configuration is sampled and determined on the rising-edge of SRESET
(forboth processor families).On the MPC8xx it is a bidirectionalsignal which maybe driven
externally to generate soft reset sequence.This signal is in fact redundant regarding the
MPC8xx debug port controller since there is a soft-reset signal integrated within the debug
port protocol.However, the local debug port controller uses this signal for compatibility with
MPC5xx existing boards and s/w.
3+5 GND
System Ground
4 DSCK
Debug-port Serial Clock
During asynchronous clock mode, the serial data is clocked into the MPC according to the
DSCK clock.The DSCK serves also a role during soft-reset configuration.
6VFLS1 These pin and pin 1 (VFLS0) indicate to the debug port controller whether or not the MPC
is in debug mode.When both VFLS0 and VFLS1 are at "1", the MPC is in debug mode.
7 HRESET This is the Hard-Reset bidirectional signal of the MPC.When this signal is asserted (low)
the MPC enters hard reset sequence which include hard reset configuration.This signal is
made redundant with the MPC8xx debug port controller since there is a hard-reset com-
mand integrated within the debug port protocol.
8 DSDI
Debug-port Serial Data In
Via the DSDI signal, the debug port controller sends its data to the MPC.The DSDI serves
also a role during soft-reset configuration.
9 Vcc Target
1.8 – 5.0V:
This is the target reference voltage.It indicates that the target has power and it is also used
to create the logic-level reference for the input comparators.It also controls the output logic
levels to the target.It is normally fed from Vdd I/O on the target board.
3.0 – 5.0V with Rev. A/B :
This input to the BDI2000 is used to detect if the target is powered up.If there is a current
limiting resistor between this pin and the target Vdd, it should be 100 Ohm or less.
10 DSDO
Debug-port Serial Data Out
DSDO is clocked out by the MPC according to the debug port clock, in parallel with the
DSDI being clocked in.The DSDO serves also as "READY" signal for the debug port con-
troller to indicate that the debug port is ready to receive controller’s command (or data).

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 8
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.1.1 ChangingTarget ProcessorType
Before you can use the BDI2000 with an other target processor type (e.g.CPU32 <--> PPC), a new
setup has to be done (see Appendix A). During this process the target cable must be disconnected
from the target system.The BDI2000 needs to be supplied with 5 Volts via the BDI OPTION connec-
tor (Rev. A) or via the POWER connector (Rev. B/C). For more information see chapter 2.2.1
«External Power Supply».
To avoid data line conflicts, the BDI2000 must be disconnected from the target system while
programming the logic for an other target CPU.
!

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 9
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.2 Connecting the BDI2000 to Power Supply
2.2.1 External Power Supply
The BDI2000 needs to be supplied with 5Volts (max.1A) via the BDI OPTION connector (Rev.A) or
via POWER connector (Rev. B/C).The available power supply from Abatron (option) or the enclosed
power cable can be directly connected. In order to ensure reliable operation of the BDI2000, keep
the power supply cable as short as possible.
For error-free operation, the power supply to the BDI2000 must be between 4.75V and 5.25V DC.
The maximal tolerable supply voltage is 5.25 VDC. Any higher voltage or a wrong polarity
might destroy the electronics.
Please switch on the system in the following sequence:
• 1 --> external power supply
• 2 --> target system
!
BDI TRGT MODE BDI MAIN BDI OPTION
13
1
14 2
BDI OPTION
1 - NOT USED
2 - GROUND
3 - NOT USED
4 - GROUND
5 - NOT USED
6 - GROUND
7 - NOT USED
8 - GROUND
9 - NOT USED
10 - GROUND
11 - NOT USED
12 - Vcc (+5V)
13 - Vcc Target (+5V)
14 - Vcc (+5V)
Vcc GND
Connector
The green LED «BDI» marked light up when 5V power is connected to the BDI2000
Rev. A
BDI TRGT MODE TARGET A TARGET B
POWER
1 - Vcc (+5V)
2 - VccTGT
3 - GROUND
4 - NOT USED
Connector
The green LED «BDI» marked light up when 5V power is connected to the BDI2000
RS232 POWER LI TX RX 10 BASE-T
1 Vcc
2
GND 3
4
Rev. B Version
Rev. B/C

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 10
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.2.2 Power Supply fromTarget System
The BDI2000 needs to be supplied with 5 Volts (max. 1A) via BDI MAIN target connector (Rev. A) or
via TARGET A connector (Rev. B/C).This mode can only be used when the target system runs with
5V and the pin «Vcc Target» is able to deliver a current up to 1A@5V. For pin description and layout
see chapter 2.1 «Connecting the BDI2000 toTarget».Insert the enclosed Jumper as shown in figure
below. Please ensure that the jumper is inserted correctly.
For error-free operation, the power supply to the BDI2000 must be between 4.75V and 5.25V DC.
The maximal tolerable supply voltage is 5.25 VDC. Any higher voltage or a wrong polarity
might destroy the electronics.
!
BDI TRGT MODE BDI MAIN BDI OPTION
13
1
14 2
BDI OPTION
Connector
The green LEDs «BDI» and «TRGT» marked light up when target is powered up
Jumper
and the jumper is inserted correctly
1 - NOT USED
2 - GROUND
3 - NOT USED
4 - GROUND
5 - NOT USED
6 - GROUND
7 - NOT USED
8 - GROUND
9 - NOT USED
10 - GROUND
11 - NOT USED
12 - Vcc (+5V)
13 - Vcc Target (+5V)
14 - Vcc BDI2000 (+5V)
Rev. A
BDI TRGT MODE TARGET A TARGET B
POWER
1 - Vcc BDI2000 (+5V)
2 - Vcc Target (+5V)
3 - GROUND
4 - NOT USED
Connector
RS232 POWER LI TX RX 10 BASE-T
1
2
3
4
The green LEDs «BDI» and «TRGT» marked light up when target is powered up
and the jumper is inserted correctly
Jumper
Rev. B/C

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 11
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.3 Status LED «MODE»
The built in LED indicates the following BDI states:
MODE LED BDI STATES
OFF The BDI is ready for use, the firmware is already loaded.
ON The power supply for the BDI2000 is < 4.75VDC.
BLINK The BDI «loader mode» is active (an invalid firmware is loaded or loading firmware is active).
BDI TRGT MODE BDI MAIN BDI OPTION
BDI TRGT MODE TARGET A TARGET B
Rev. A
Rev. B/C

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 12
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.4 Connecting the BDI2000 to Host
2.4.1 Serial line communication
Serial line communication is only used for the initial configuration of the bdiWind system.
The host is connected to the BDI through the serial interface (COM1...COM4).The communication
cable (included) between BDI and Host is a serial cable.There is the same connector pinout for the
BDI and for the Host side (Refer to Figure below).
RS232 Connector
(for PC host)
5 2 3 7 8 6 1 4
5 2 3 7 8 6 1 4
GND
RD
TD
RTS
CTS
DSR
DCD
DTR
GND
RD
TD
RTS
CTS
DSR
DCD
DTR
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
Target System
RS232
MPC
8xx
RS232 LI TX RX 10 BASE-T
54321
9876
PC Host
Rev. A
RS232 Connector
(for PC host)
5 2 3 7 8 6 1 4
5 2 3 7 8 6 1 4
GND
RD
TD
RTS
CTS
DSR
DCD
DTR
GND
RD
TD
RTS
CTS
DSR
DCD
DTR
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
Target System
RS232
MPC
8xx
PC Host
Rev. B/C
RS232 POWER LI TX RX 10 BASE-T
54321
9876

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 13
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.4.2 Ethernet communication
The BDI2000 has a built-in 10 BASE-T Ethernet interface (see figure below). Connect an UTP (Un-
shilded Twisted Pair) cable to the BD2000. For thin Ethernet coaxial networks you can connect a
commercially available media converter (BNC-->10 BASE-T) between your network and the
BDI2000. Contact your network administrator if you have questions about the network.
Ethernet communication is used when communicating with the Tornado Development Environment.
The following explains the meanings of the built-in LED lights:
LED Name Description
LI Link When this LED light is ON, data link is successful between the UTP
port of the BDI2000 and the hub to which it is connected.
TX Transmit WhenthisLEDlightBLINKS,dataisbeing transmittedthrough theUTP
port of the BDI2000
RX Receive When this LED light BLINKS, data is being received through the UTP
port of the BDI2000
10 BASE-T
Host
Target System
Ethernet (10 BASE-T)
1 - TD+
2 - TD-
3 - RD+
4 - NC
5 - NC
6 - RD-
7 - NC
8 - NC
Connector
RS232 LI TX RX 10 BASE-T
BDI2000
AA
AAbb
bbaa
aattttrr
rroo
oonn
nn AA
AAGG
GG SS
SSww
wwiiiiss
ssss
ss MM
MMaa
aadd
ddeeee
18
RS232 POWER LI TX RX 10 BASE-T
Rev. A
Rev. B/C
18 MPC
8xx

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 14
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.5 Installation of the Configuration Software
On the enclosed diskette you will find the BDI configuration software and the firmware required for
the BDI2000. For Windows users there is also a TFTP server included.
For the initial configuration or to update the firmware, a PC running at leastWindows 3.1 is required.
The following files are on the diskette.
b20ppcwr.exe Configuration program (16bit Windows application)
b20ppcwr.hlp Windows help file for the configuration program
b20ppcwr.xxx Firmware for the BDI2000
ppcjwr20.xxx JEDEC file for the BDI2000 (Rev. A/B) logic device
ppcjwr21.xxx JEDEC file for the BDI2000 (Rev. C) logic device
tftpsrv.exe TFTP server for WindowsNT/ Windows95 (WIN32 console application)
ads860.cfg A sample configuration file for the ADS860 evaluation board
bdipkt.h The header file for the BDM UDP-lite packet driver
bdipkt.c The implementation file for the BDM UDP-lite packet driver
bdiSlip.h The header file for the example SLIP UDP-lite packet driver
bdiSlip.c The implementation file for the example SLIP UDP-lite packet driver
bdiHdlc.h The header file for the example HDLC UDP-lite packet driver
bdiHdlc.c The implementation file for the example HDLC UDP-lite packet driver
tornado.add A text file with information how to extend theTornado environment
Used for updating some existing source files via copy/paste
wdbBdi.c Tornado II : Main module for the BDI WDB communication
wdbFslip.c Tornado II : Main module for the fast SLIP WDB communication
wdbHdlc.c Tornado II : Main module for the HDLC WDB communication
wdbBdi.cdf Tornado II : Component descriptions for the BDI WDB communication
*.def Register definition files
Example of an installation process:
• Create a new directory on your hard disk, for example E:\bdi\ppc
• Copy the entire contents of the enclosed diskette into this directory
•You may create a new Windows Program Manager entry for the bdiWind configuration
program.

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 15
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.6 Initial configuration of the bdiWind system
Before you can use the bdiWind system, an initial setup has to be done (see Appendix A).During this
setup you define the following items and stores them in the flash memory of the BDI2000.
BDI2000 IP address The BDI2000 is assigned an individual IP address. Ask your network ad-
ministrator for a free one.
HOST IP address The IP address of the host with the target configuration file has to be
known by the BDI2000.
Configuration file name The name (including the path) of the file with the target configuration.The
string entered is used as the filename when accessing the configuration
file via TFTP. Use the naming convention of the host which holds the con-
figuration file.
For more information about using the bdiWind configuration program consult the online help.
Remark: Don't forget to press <Transmit> after you entered the configuration values.
Activating BOOTP:
The BDI can get the network configuration and the name of the configuration file also via BOOTP.
For this simply enter 0.0.0.0 as the BDI’s IP address.If present, the subnet mask and the default gate-
way (router) is taken from the BOOTP vendor-specific field as defined in RFC 1533.
2.7 Testing the BDI2000 to host connection
After the initial setup is done, you can test the communication between the host and the BDI2000.
There is no need for a target configuration file and no TFTP server is needed on the host.
• If necessary, disconnect the BDI2000 system from the Windows PC used for the initial
configuration.
• If not already done, connect the bdiWind system to the network.
• Power-up the BDI2000.
• Start aTelnet client on the host and connect to the BDI2000 (the IP address you entered dur-
ing initial configuration).
• If everything is okay, a sign on message like «BDI Debugger for Embedded PowerPC» should
be displayed in the Telnet window.

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 16
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
2.8 TFTP server forWindows NT
The bdiWind system uses TFTP to access the configuration file and to load the initial VxWorks core.
Because there is no TFTP server bundled with Windows NT, Abatron provides a TFTP server appli-
cation tftpsrv.exe. This WIN32 console application runs as normal user application (not as a system
service).
Command line syntax: tftpsrv [p] [w] [dRootDirectory]
Without any parameter, the server starts in read-only mode. This means, only read access request
from the client are granted.This is the normal working mode.The bdiWind system needs only read
access to the configuration and VxWorks files.
The parameter [p] enables protocol output to the console window.Try it.
The parameter [w] enables write accesses to the host file system.
The parameter [d] allows to define a root directory.
tftpsrv p Starts the TFTP server and enables protocol output
tftpsrv p w Starts the TFTP server, enables protocol output and write accesses are
allowed.
tftpsrv dC:\tftp\ Starts the TFTP server and allows only access to files in C:\tftp and its
subdirectories. As file name, use relative names.
For example "bdi\mpc860.cfg" accesses "C:\tftp\bdi\mpc860.cfg"
You may enter the TFTP server into the Startup group so the server is started every time you login.

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 17
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
3 Using bdiWind
3.1 Principle of operation
To understand the principle of operation, we assume that you are familiarly with the Tornado devel-
opment environment.Elements of this environment likeTarget Server,Target Agent orVxWorks core
will no be explained in this manual. See the appropriate Tornado manuals.
3.1.1 Gateway mode
For ease of understanding, you can look at the bdiWind system as an alternative communication
channel between the Target Server running on the host and the Target Agent running on the target.
This mode supports anything the originalWindRiver target agent supports (task specific breakpoints,
dynamically loading of new moduls, and so on).
Whenever the bdiWind system is started (target is powered on) the following sequence starts:
In BDM Gateway mode, the UDP frames are transfered via the target BDM interface.
In Serial Gateway mode, the UDP frames are transfered via a serial connection (UART or HDLC) be-
tween the BDI2000 and the target (e.g. via a SMC channel).
Power On
initial
configuration
valid?
Get configuration file
via TFTP
Process target init list
via TFTP or start it from ROM
Load initial VxWorks core
Transfer UDP frames between
Host and Target
Power OFF
activate BDI2000 loader
Power OFF
no
yes

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 18
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
3.1.2 Agent mode
In this mode, the target agent runs within the BDI.There is no need for any debug software on the
target system. After loading the VxWorks core (or even any other fully linked executable) debugging
can begin at the very first statement (e.g.sysInit).This mode is useful to get an initial VxWorks code
running or in the final state of a development, when no debug support is linked into the application.
This mode also supports the PowerPC built in breakpoint logic. It’s possible to debug ROM resident
applications.
Whenever the bdiWind system is started (target is powered on) the following sequence starts:
Power On
initial
configuration
valid?
Get configuration file
via TFTP
Process target init list
via TFTP and set the PC
Load initial VxWorks core
Process WDB request
Power OFF
activate BDI2000 loader
Power OFF
no
yes
RUN selected?
Start loadedVxWorks core

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 19
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
Breakpoints:
There are two breakpoint modes supported.One of them (SOFT) is implemented by replacing appli-
cation code with a TRAP instruction.The other (HARD) uses the built in breakpoint logic.If HARD is
used, only up to 4 breakpoints can be active at the same time.
The following example selects SOFT as the breakpoint mode:
BREAKMODE SOFT ;<AGENT> SOFT or HARD, HARD uses PPC hardware breakpoints
All the time the application is suspended (i.e. caused by a breakpoint) the target processor remains
freezed.
Restrictions when using Agent mode:
This mode supports only system level debugging. Only fully linked systems can be debugged.Load-
ing of modules is not supported because an agent not running within the target cannot create Vx-
Works tasks.In general only the system context is supported.
Following a list of unsupported WDB requests and WDB requests with restrictions:
bkendModeSet Only WDB_MODE_EXTERN is accepted
bkendMemFill Supported, but large memory blocks may cause a target agent time-out
bkendMemMove Supported, but large memory blocks may cause a target agent time-out
bkendMemChecksum Supported, but large memory blocks may cause a target agent time-out
bkendMemProtect Returns OKAY but does nothing
bkendCacheTextUpdate Returns OKAY but does nothing
bkendMemScan Supported, but large memory blocks may cause a target agent time-out
bkendVIOWrite not supported
bkendFuncCall not supported
bkendDirectCall not supported
For large VxWorks core, the target server time-out value may be increased.
Tornado II:
Hardware breakpoints are also supported with Tornado II.There are 4 instruction and 2 data hard-
ware breakpoints available. Hardware breakpoints can be set with the Tornado Shell (enter help).
The following example sets a hardware breakpoint on writing to the variable "loopCount":
bh &loopCount,3

bdi
W
ind
for Tornado™, BDI2000 (MPC8xx/MPC5xx) User Manual 20
© Copyright 1997-2007 by ABATRON AG Switzerland V 1.38
3.2 Configuration File
The configuration file is automatically read by the BDI after every power on.
The syntax of this file is as follows:
; comment
[part name]
identifier parameter1 parameter2 ..... parameterN ; comment
identifier parameter1 parameter2 ..... parameterN
.....
[part name]
identifier parameter1 parameter2 ..... parameterN
identifier parameter1 parameter2 ..... parameterN
..... etc.
Numeric parameters can be entered as decimal (e.g.700) or as hexadecimal (0x80000).
This manual suits for next models
1
Table of contents