bdiGDB enhances the GNU debugger (GDB), with JTAG/COP debugging for QorIQ P4 based targets. With the built-in Ethernet interface you get a very fast code download speed. No target communication channel (e.g. serial line) is wasted for debugging purposes. Even better, you can use fast
Ethernet debugging with target systems without network capability. The host to BDI communication
uses the standard GDB remote protocol.
An additional Telnet interface is available for special debug tasks (e.g. force a hardware reset,
program flash memory).
The following figure shows how the BDI3000 interface is connected between the host and the target:
Target System
P4080
COP Interface
BDI3000
GNU Debugger
(GDB)
Ethernet (10/100 BASE-T)
1.1 BDI3000
The BDI3000 is the main part of the bdiGDB system. This small box implements the interface between the JTAG pins of the target CPU and a 10/100Base-T Ethernet connector. The firmware of the
BDI3000 can be updated by the user with a simple Linux/Windows configuration program or interactively via Telnet/TFTP. The BDI3000 supports 1.2 – 5.0 Volts target systems.
As an initial setup, the IP address of the BDI3000, the IP address of the host with the configuration
file and the name of the configuration file is stored within the flash of the BDI3000.
Every time the BDI3000 is powered on, it reads the configuration file via TFTP.
Following an example of a typical configuration file:
; Release cores for booting
WM32 0xfe0E00E4 0x00000003 ;BRR: release core 0 and 1
;
;
[TARGET]
; common parameters
POWERUP 5000 ;start delay after power-up detected in ms
JTAGCLOCK 1 ;use 16 MHz JTAG clock
WAKEUP 1000 ;give reset time to complete
;
; CoreID#0 parameters (active vCPU after reset)
#0 CPUTYPE P4080 0 0 ;Core0 / SOC0
#0 STARTUP HALT ;halt at the reset vector (this halts all cores !!!)
;
; CoreID#1 parameters
#1 CPUTYPE P4080 1 0 ;Core1 / SOC0
#1 STARTUP HALT ;halt at the reset vector
;
[HOST]
IP 151.120.25.112
FILE E:\temp\dump1024k.bin
FORMAT BIN 0x10000
;
#0 PROMPT P4080#0>
#1 PROMPT P4080#1>
;
[FLASH]
; only to test execution of target code
WORKSPACE 0x80001000 ;workspace in CPC1/SRAM
CHIPTYPE AM29BX16 ;Flash type
CHIPSIZE 0x00200000 ;The size of one flash chip in bytes
BUSWIDTH 16 ;The width of the flash memory bus in bits
FILE E:\temp\dump16k.bin
FORMAT BIN 0x00300000
[REGS]
FILE $regP4080.def
Based on the information in the configuration file, the target is automatically initialized after every reset.
The cable to the target system is a 16 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 COP connector specification.
!
In order to ensure reliable operation of the BDI (EMC, runtimes, etc.) the target cable length must not
exceed 20 cm (8").
Target System
P4080
1
15
COP/JTAG Connector
1 - TDO
2 - NC (
3 - TDI
4 -
5 - NC (
6 - Vcc Target
7 - TCK
8 -
9 - TMS
10 - NC
11 12 - GROUND
13 -
14 - NC (key)
15 -
16 - GROUND
QACK)
TRST
QREQ)
CHKSTP_IN
SRESET
HRESET
CHKSTP_OUT
BDI3000
2
TARGET A TARGET B
BDI
TRGT
The green LED «TRGT» marked light up when target is powered up
MODE
16
151
16
2
For BDI TARGET B connector signals see table on next page.
Note:
For critical designs (long traces on the target board) there is a shorter target cable available (p/n
90020-S).This may improve JTAG communication reliability. But best is to keep the JTAG traces on
the board as short as possible.
Warning:
Before you can use the BDI3000 with an other target processor type (e.g. PPC <--> ARM), a new
setup has to be done (see chapter 2.5). During this process the target cable must be disconnected
from the target system.
!
To avoid conflicts between data lines, the BDI3000 must be disconnected from the target system while programming a new firmware for an other target CPU.
This input to the BDI3000 connects to the target TDO pin.
2IO2General purpose I/O
Currently not used.
3TDIJTAG Test Data In
This output of the BDI3000 connects to the target TDI pin.
4
TRSTJTAG Test Reset
This output of the BDI3000 resets the JTAG TAP controller on the target.
5IN0General purpose Input
Currently not used.
6Vcc Target1.2 – 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 connected to Vdd I/O on the target board.
7TCKJTAG Test Clock
This output of the BDI3000 connects to the target TCK pin.
8IO8General purpose I/O
This output of the BDI3000 connects to the target CKSTP_IN pin. Currently not used.
9TMSJTAG Test Mode Select
This output of the BDI3000 connects to the target TMS line.
10IO10General purpose I/O
Currently not used.
11
12GROUNDSystem Ground
13
14<reseved>
15IN1General purpose Input
16GROUNDSystem Ground
SRESETSoft-Reset
This open collector output of the BDI3000 connects to the target HRESET pin.
HRESETHard-Reset
This open collector output of the BDI3000 connects to the target PORESET pin.
This input to the BDI3000 connects to the target CKSTP_OUT pin. Currently not used.
The BDI3000 needs to be supplied with the enclosed power supply from Abatron (5VDC).
!
Before use, check if the mains voltage is in accordance with the input voltage printed on power
supply. Make sure that, while operating, the power supply is not covered up and not situated near
a heater or in direct sun light. Dry location use only.
!
For error-free operation, the power supply to the BDI3000 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.
+5 VDC GND
RS232POWER
casing connected to ground terminal
TARGET A TARGET B
BDI
TRGT
The green LED «BDI» marked light up when 5V power is connected to the BDI3000
MODE
Please switch on the system in the following sequence:
Serial line communication is only used for the initial configuration of the bdiGDB 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).
The BDI3000 has a built-in 10/100 BASE-T Ethernet interface (see figure below). Connect an UTP
(Unshielded Twisted Pair) cable to the BD3000. Contact your network administrator if you have questions about the network.
Target System
10/100 BASE-T
18
Connector
1 - TD+
2 - TD 3 - RD+
4 - NC
5 - NC
6 - RD-
7 - NC
8 - NC
RS232 POWER
PC / Unix
Host
The following explains the meanings of the built-in LED lights:
LED1 LED2
Ethernet (10/100 BASE-T)
P4080
BDI3000
LEDFunctionDescription
LED 1
(green)
LED 2
(amber)
Link / ActivityWhen this LED light is ON, data link is successful between the UTP port
of the BDI3000 and the hub to which it is connected.
The LED blinks when the BDI3000 is receiving or transmitting data.
SpeedWhen this LED light is ON, 100Mb/s mode is selected (default).
When this LED light is OFF, 10Mb/s mode is selected
On the enclosed diskette you will find the BDI configuration software and the firmware required for
the BDI3000. For Windows users there is also a TFTP server included.
The following files are on the diskette.
b30qp4gd.exeWindows Configuration program
b30qp4gd.xxxFirmware for the BDI3000
tftpsrv.exeTFTP server for Windows (WIN32 console application)
*.cfgConfiguration files
*.defRegister definition files
bdisetup.zipZIP Archive with the Setup Tool sources for Linux / UNIX hosts.
Overview of an installation / configuration process:
• Create a new directory on your hard disk
• Copy the entire contents of the enclosed diskette into this directory
• Linux only: extract the setup tool sources and build the setup tool
• Use the setup tool or Telnet (default IP) to load/update the BDI firmware
Note: A new BDI has no firmware loaded.
• Use the setup tool or Telnet (default IP) to load the initial configuration parameters
- IP address of the BDI.
- IP address of the host with the configuration file.
- Name of the configuration file. This file is accessed via TFTP.
The BDI can get the network configuration and the name of the configuration file also via BOOTP.
For this simple enter 0.0.0.0 as the BDI’s IP address (see following chapters). If present, the subnet
mask and the default gateway (router) is taken from the BOOTP vendor-specific field as defined in
RFC 1533.
With the Linux setup tool, simply use the default parameters for the -c option:
The MAC address is derived from the serial number as follows:
MAC: 00-0C-01-xx-xx-xx , replace the xx-xx-xx with the 6 left digits of the serial number
Example: SN# 33123407 ==>> 00-0C-01-33-12-34
Default IP: 192.168.53.72
Before the BDI is configured the first time, it has a default IP of 192.168.53.72 that allows an initial
configuration via Ethernet (Telnet or Setup Tools). If your host is not able to connect to this default
IP, then the initial configuration has to be done via the serial connection.
The firmware update and the initial configuration of the BDI3000 is done with a command line utility.
In the ZIP Archive bdisetup.zip are all sources to build this utility. More information about this utility
can be found at the top in the bdisetup.c source file. There is also a make file included.
Starting the tool without any parameter displays information about the syntax and parameters.
!
To avoid data line conflicts, the BDI3000 must be disconnected from the target system while
programming the firmware for an other target CPU family.
Following the steps to bring-up a new BDI3000:
1. Build the setup tool:
The setup tool is delivered only as source files. This allows to build the tool on any Linux / Unix host.
To build the tool, simply start the make utility.
[root@LINUX_1 bdisetup]# make
cc -O2 -c -o bdisetup.o bdisetup.c
cc -O2 -c -o bdicnf.o bdicnf.c
cc -O2 -c -o bdidll.o bdidll.c
cc -s bdisetup.o bdicnf.o bdidll.o -o bdisetup
2. Check the serial connection to the BDI:
With "bdisetup -v" you may check the serial connection to the BDI. The BDI will respond with information about the current loaded firmware and network configuration.
Note: Login as root, otherwise you probably have no access to the serial port.
$ ./bdisetup -v -p/dev/ttyS0 -b115
BDI Type : BDI3000 (SN: 30000154)
Loader : V1.00
Firmware : unknown
MAC : ff-ff-ff-ff-ff-ff
IP Addr : 255.255.255.255
Subnet : 255.255.255.255
Gateway : 255.255.255.255
Host IP : 255.255.255.255
Config : яяяяяяя........
3. Load/Update the BDI firmware:
With "bdisetup -u" the firmware is programmed into the BDI3000 flash memory. This configures the
BDI for the target you are using. Based on the parameters -a and -t, the tool selects the correct firmware file. If the firmware file is in the same directory as the setup tool, there is no need to enter a -d
parameter.
$ ./bdisetup -u -p/dev/ttyS0 -b115 -aGDB -tP4080
Connecting to BDI loader
Programming firmware with ./b30qp4gd.100
With "bdisetup -c" the configuration parameters are written to the flash memory within the BDI.
The following parameters are used to configure the BDI:
BDI IP AddressThe IP address for the BDI3000. Ask your network administrator for as-
signing an IP address to this BDI3000. Every BDI3000 in your network
needs a different IP address.
Subnet MaskThe subnet mask of the network where the BDI is connected to. A subnet
mask of 255.255.255.255 disables the gateway feature. Ask your network
administrator for the correct subnet mask. If the BDI and the host are in
the same subnet, it is not necessary to enter a subnet mask.
Default GatewayEnter the IP address of the default gateway. Ask your network administra-
tor for the correct gateway IP address. If the gateway feature is disabled,
you may enter 255.255.255.255 or any other value.
Config - Host IP Address Enter the IP address of the host with the configuration file. The configura-
tion file is automatically read by the BDI3000 after every start-up.
Configuration fileEnter the full path and name of the configuration file. This file is read via
TFTP. Keep in mind that TFTP has it’s own root directory (usual /tftpboot).
You can simply copy the configuration file to this directory and the use the
file name without any path.
For more information about TFTP use "man tftpd".
The BDI is in loader mode when there is no valid firmware loaded or you connect to it with the setup
tool. While in loader mode, the Mode LED is blinking. The BDI will not respond to network requests
while in loader mode. To exit loader mode, the "bdisetup -v -s" can be used. You may also power-off
the BDI, wait some time (1min.) and power-on it again to exit loader mode.
$ ./bdisetup -v -p/dev/ttyS0 -b115 -s
BDI Type : BDI3000 (SN: 30000154)
Loader : V1.00
Firmware : V1.00 bdiGDB for P4080
MAC : 00-0c-01-30-00-01
IP Addr : 151.120.25.102
Subnet : 255.255.255.255
Gateway : 255.255.255.255
Host IP : 151.120.25.112
Config : /bdi3000/mytarget.cfg
The Mode LED should go off, and you can try to connect to the BDI via Telnet.
First make sure that the BDI is properly connected (see Chapter 2.1 to 2.4).
!
To avoid data line conflicts, the BDI3000 must be disconnected from the target system while
programming the firmware for an other target CPU family.
dialog box «BDI3000 Update/Setup»
Before you can use the BDI3000 together with the GNU debugger, you must store the initial configuration parameters in the BDI3000 flash memory. The following options allow you to do this:
PortSelect the communication port where the BDI3000 is connected during
this setup session. If you select Network, make sure the Loader is already
active (Mode LED blinking). If there is already a firmware loaded and running, use the Telnet command "boot loader" to activate Loader Mode.
SpeedSelect the baudrate used to communicate with the BDI3000 loader during
this setup session.
ConnectClick on this button to establish a connection with the BDI3000 loader.
Once connected, the BDI3000 remains in loader mode until it is restarted
or this dialog box is closed.
CurrentPress this button to read back the current loaded BDI3000 firmware ver-
sion. The current firmware version will be displayed.
ErasePress this button to erase the current loaded firmware.
UpdateThis button is only active if there is a newer firmware version present in the
execution directory of the bdiGDB setup software. Press this button to
write the new firmware into the BDI3000 flash memory.
BDI IP AddressEnter the IP address for the BDI3000. Use the following format:
xxx.xxx.xxx.xxx e.g.151.120.25.101
Ask your network administrator for assigning an IP address to this
BDI3000. Every BDI3000 in your network needs a different IP address.
Subnet MaskEnter the subnet mask of the network where the BDI is connected to.
Use the following format: xxx.xxx.xxx.xxxe.g.255.255.255.0
A subnet mask of 255.255.255.255 disables the gateway feature.
Ask your network administrator for the correct subnet mask.
Default GatewayEnter the IP address of the default gateway. Ask your network administra-
tor for the correct gateway IP address. If the gateway feature is disabled,
you may enter 255.255.255.255 or any other value.
Config - Host IP Address Enter the IP address of the host with the configuration file. The configura-
tion file is automatically read by the BDI3000 after every start-up.
Configuration fileEnter the full path and name of the configuration file. This name is trans-
mitted to the TFTP server when reading the configuration file.
TransmitClick on this button to store the configuration in the BDI3000 flash
memory.
Note:
Using this setup tool via the Network channel is only possible if the BDI3000 is already in Loader
mode (Mode LED blinking). To force Loader mode, enter "boot loader" at the Telnet. The setup tool
tries first to establish a connection to the Loader via the IP address present in the "BDI IP Address"
entry field. If there is no connection established after a time-out, it tries to connect to the default IP
(192.168.53.72).