Abatron QorIQ P3, QorIQ P4, QorIQ P5 User Guide

bdi GDB
JTAG debug interface for GNU Debugger
QorIQ P3/P4/P5
User Manual
Manual Version 1.03 for BDI3000
©1997-2012 by Abatron AG
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 2
1.1 BDI3000................................................................................................................................. 3
1.2 BDI Configuration ..................................................................................................................4
2 Installation ................................................................................................................................... 5
2.1 Connecting the BDI3000 to Target ........................................................................................ 5
2.2 Connecting the BDI3000 to Power Supply ............................................................................7
2.3 Status LED «MODE»............................................................................................................. 8
2.4 Connecting the BDI3000 to Host ........................................................................................... 9
2.4.1 Serial line communication ............................................................................................9
2.4.2 Ethernet communication ............................................................................................10
2.5 Installation of the Configuration Software............................................................................ 11
2.5.1 Configuration with a Linux / Unix host........................................................................ 12
2.5.2 Configuration with a Windows host ............................................................................ 14
2.5.3 Configuration via Telnet / TFTP .................................................................................16
2.6 Testing the BDI3000 to host connection.............................................................................. 18
2.7 TFTP server for Windows....................................................................................................18
3 Using bdiGDB ............................................................................................................................ 19
3.1 Principle of operation........................................................................................................... 19
3.2 Configuration File.................................................................................................................20
3.2.1 Part [INIT]................................................................................................................... 21
3.2.2 Part [TARGET] ...........................................................................................................24
3.2.3 Part [HOST]................................................................................................................ 28
3.2.4 Part [FLASH] ..............................................................................................................30
3.2.5 Part [REGS] ...............................................................................................................34
3.3 Debugging with GDB ........................................................................................................... 36
3.3.1 Target setup ...............................................................................................................36
3.3.2 Connecting to the target............................................................................................. 36
3.3.3 GDB monitor command.............................................................................................. 36
3.3.4 Target serial I/O via BDI............................................................................................. 37
3.3.5 Embedded Linux MMU Support ................................................................................. 38
3.4 Telnet Interface.................................................................................................................... 40
3.5 Multi-Core Support...............................................................................................................43
4 Specifications ............................................................................................................................ 45
5 Environmental notice................................................................................................................46
6 Declaration of Conformity (CE)................................................................................................46
7 Warranty and Support Terms...................................................................................................47
7.1 Hardware ............................................................................................................................. 47
7.2 Software ..............................................................................................................................47
7.3 Warranty and Disclaimer .....................................................................................................47
7.4 Limitation of Liability ............................................................................................................47
Appendices
A Troubleshooting .......................................................................................................................48
B Maintenance .............................................................................................................................. 49
C Trademarks ............................................................................................................................... 49
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 3

1 Introduction

bdiGDB enhances the GNU debugger (GDB), with JTAG/COP debugging for QorIQ P4 based tar­gets. With the built-in Ethernet interface you get a very fast code download speed. No target commu­nication 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 be­tween 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 interac­tively via Telnet/TFTP. The BDI3000 supports 1.2 – 5.0 Volts target systems.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 4

1.2 BDI Configuration

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:
;bdiGDB configuration file for P4080-DS ;-------------------------------------­; [INIT] ; Initialize LAWBAR's WM32 0xfe000c00 0x00000000 ;LAWBAR0 : Flash @0_e0000000 WM32 0xfe000c04 0xe0000000 WM32 0xfe000c08 0x81f0001b ;LAWAR0 : eLBC 256MB
.......
; 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 re­set.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 5

2 Installation

2.1 Connecting the BDI3000 to Target

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
15 1
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 sys­tem while programming a new firmware for an other target CPU.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 6
BDI TARGET B Connector Signals:
Pin Name Describtion
1 TDO JTAG Test Data Out
This input to the BDI3000 connects to the target TDO pin.
2 IO2 General purpose I/O
Currently not used.
3 TDI JTAG Test Data In
This output of the BDI3000 connects to the target TDI pin.
4
TRST JTAG Test Reset
This output of the BDI3000 resets the JTAG TAP controller on the target.
5 IN0 General purpose Input
Currently not used.
6 Vcc Target 1.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.
7 TCK JTAG Test Clock
This output of the BDI3000 connects to the target TCK pin.
8 IO8 General purpose I/O
This output of the BDI3000 connects to the target CKSTP_IN pin. Currently not used.
9 TMS JTAG Test Mode Select
This output of the BDI3000 connects to the target TMS line.
10 IO10 General purpose I/O
Currently not used.
11
12 GROUND System Ground
13
14 <reseved>
15 IN1 General purpose Input
16 GROUND System Ground
SRESET Soft-Reset
This open collector output of the BDI3000 connects to the target HRESET pin.
HRESET Hard-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.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 7

2.2 Connecting the BDI3000 to Power Supply

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
RS232 POWER
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:
• 1 –> external power supply
• 2 –> target system
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 8

2.3 Status LED «MODE»

The built in LED indicates the following BDI states:
TARGET A TARGET B
BDI
TRGT
MODE LED BDI STATES
OFF The BDI is ready for use, the firmware is already loaded.
ON The output voltage from the power supply is too low.
BLINK The BDI «loader mode» is active (an invalid firmware is loaded or loading firmware is active).
MODE
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 9

2.4 Connecting the BDI3000 to Host

2.4.1 Serial line communication

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).
RS232 Connector
(for PC host)
1 - NC
2 - RXD data from host 3 - TXD data to host
4 - NC
5 - GROUND
6 - NC 7 - NC 8 - NC 9 - NC
54321
9876
RS232 POWER
PC Host
Target System
P4080
BDI3000
RS232
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 10

2.4.2 Ethernet communication

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 ques­tions 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
LED Function Description
LED 1
(green)
LED 2
(amber)
Link / Activity When 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.
Speed When this LED light is ON, 100Mb/s mode is selected (default).
When this LED light is OFF, 10Mb/s mode is selected
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 11

2.5 Installation of the Configuration Software

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.exe Windows Configuration program
b30qp4gd.xxx Firmware for the BDI3000
tftpsrv.exe TFTP server for Windows (WIN32 console application)
*.cfg Configuration files
*.def Register definition files
bdisetup.zip ZIP 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.
- Optional network parameters (subnet mask, default gateway).
Activating BOOTP:
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:
[root@LINUX_1 bdisetup]# ./bdisetup -c -p/dev/ttyS0 -b57
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.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 12

2.5.1 Configuration with a Linux / Unix host

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 infor­mation 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 firm­ware 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
Erasing firmware flash ....
Erasing firmware flash passed
Programming firmware flash ....
Programming firmware flash passed
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 13
4. Transmit the initial configuration parameters:
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 Address The 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 Mask The 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 Gateway Enter 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 file Enter 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".
$ ./bdisetup -c -p/dev/ttyS0 -b115 \ > -i151.120.25.102 \ > -h151.120.25.112 \ > -fe:/bdi3000/mytarget.cfg Connecting to BDI loader Writing network configuration Configuration passed
5. Check configuration and exit loader mode:
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.
$ telnet 151.120.25.102
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 14

2.5.2 Configuration with a Windows host

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 config­uration parameters in the BDI3000 flash memory. The following options allow you to do this:
Port Select 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 run­ning, use the Telnet command "boot loader" to activate Loader Mode.
Speed Select the baudrate used to communicate with the BDI3000 loader during
this setup session.
Connect Click 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.
Current Press this button to read back the current loaded BDI3000 firmware ver-
sion. The current firmware version will be displayed.
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
bdiGDB for BDI3000 (QorIQ P3/P4/P5) User Manual 15
Erase Press this button to erase the current loaded firmware.
Update This 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 Address Enter 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 Mask Enter 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 Gateway Enter 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 file Enter the full path and name of the configuration file. This name is trans-
mitted to the TFTP server when reading the configuration file.
Transmit Click 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).
© Copyright 1997-2012 by ABATRON AG Switzerland V 1.03
Loading...
+ 34 hidden pages