Skip to main content.

4.11.1. BDI2000 Installation and Configuration

Build Linux command line config tool:

Usage:

[mrk@sokrates bdisetup]$ bdisetup 
Usage of BDI setup program V1.16:
bdisetup -v [-pP] [-bB] [-s]
  -v  Read current versions
   P  Port e.g. /dev/ttyS0
   B  Baudrate 9, 19, 38, 57 or 115
  -s  if present, exit loader and start firmware

bdisetup -e [-pP] [-bB]
  -e  Erase firmware and logic
   P  Port e.g. /dev/ttyS0
   B  Baudrate 9, 19, 38, 57 or 115

bdisetup -u [-pP] [-bB] [-aA] [-tT] [-dD]
  -u  Update firmware and/or logic
   P  Port e.g. /dev/ttyS0
   B  Baudrate 9, 19, 38, 57 or 115
   A  Application type STD,GDB,ADA,TOR,ACC
   T  Target type: PPC400,MPC500,PPC600,PPC700,MPC800
                   MPC7400,MPC7450,MPC8200,MPC8300,MPC8500,MPC8641
                   ARM,ARM11,XSCALE,MIPS,MIPS64
                   CPU32,MCF,HC12,MCORE
   D  Directory with the firmware/logic files

bdisetup -c [-pP] [-bB] [-iI] [-hH] [-mM] [-gG] [-fF]
  -c  Program network configuration
   P  Port e.g. /dev/ttyS0
   B  Baudrate 9, 19, 38, 57 or 115
   I  BDI IP address e.g. 100.100.100.100
   H  Host IP address
   M  Subnet mask (default: 255.255.255.255)
   G  Gateway IP address (default: 255.255.255.255)
   F  Configuration file name

Example: Query the current bdi configuration:

(Note: this is a simple tool. It does not perform any device locking, so root permissions are required to access the serial port.)

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# bdisetup -v -p/dev/ttyS0 -b115
BDI Type : BDI2000 Rev.C (SN: 93202220)
Loader   : V1.05
Firmware : V1.05 bdiGDB for MPC85xx
Logic    : V1.05 PPC6xx/PPC7xx
MAC      : 00-0c-01-93-20-22
IP Addr  : 192.168.10.6
Subnet   : 255.255.0.0
Gateway  : 255.255.0.255
Host IP  : 192.168.1.1
Config   : bdi6.cfg

Example: Install firmware for ppc4xx processors

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# bdisetup -u -p/dev/ttyS0 -b115 -aGDB -tPPC400 -d.
Connecting to BDI loader
Erasing CPLD
Programming firmware with ./b20pp4gd.116
Erasing firmware flash ....
Erasing firmware flash passed
Programming firmware flash ....
............................................................................................................................................
Programming firmware flash passed
Programming CPLD with ./pp4jed21.103
............................................................................................................................................................................................................................................................................
Programming CPLD passed
[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# 

Check everything went ok:

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# bdisetup -v -p/dev/ttyS0 -b115
BDI Type : BDI2000 Rev.C (SN: 93202220)
Loader   : V1.05
Firmware : V1.16 bdiGDB for PPC400
Logic    : V1.03 PPC400
MAC      : 00-0c-01-93-20-22
IP Addr  : 192.168.10.6
Subnet   : 255.255.0.0
Gateway  : 255.255.0.255
Host IP  : 192.168.1.1
Config   : bdi6.cfg

Setting Configuration Parameters:

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# bdisetup -c -p/dev/ttyS0 -h192.168.5.1 -i192.168.5.11 \
-m255.255.0.0 -fsequoia/sequoia.cfg
Connecting to BDI loader
Writing network configuration
Configuration passed

then check if it went ok (note the -s to exit loader and start the firmware):

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# bdisetup -v -p/dev/ttyS0 -b115 -s
BDI Type : BDI2000 Rev.C (SN: 93202220)
Loader   : V1.05
Firmware : V1.16 bdiGDB for PPC400
Logic    : V1.03 PPC400
MAC      : 00-0c-01-93-20-22
IP Addr  : 192.168.5.11
Subnet   : 255.255.0.0
Gateway  : 255.255.255.255
Host IP  : 192.168.5.1
Config   : /tftpboot/sequoia/sequoia.cfg

Quick Test:

[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# telnet 192.168.5.11
Trying 192.168.5.11...
Connected to bdi (192.168.5.11).
Escape character is '^]'.
BDI Debugger for Embedded PowerPC
=================================

MD    [<address>] [<count>]  display target memory as word (32bit)
MDH   [<address>] [<count>]  display target memory as half word (16bit)
MDB   [<address>] [<count>]  display target memory as byte (8bit)
DUMP  <addr> <size> [<file>] dump target memory to a file
MM    <addr> <value> [<cnt>] modify word(s) (32bit) in target memory
MMH   <addr> <value> [<cnt>] modify half word(s) (16bit) in target memory
MMB   <addr> <value> [<cnt>] modify byte(s) (8bit) in target memory
MC    [<address>] [<count>]  calculates a checksum over a memory range
MV                           verifies the last calculated checksum
RD    [<name>]               display general purpose or user defined register
RDUMP [<file>]               dump all user defined register to a file
RDSPR <number>               display special purpose register
RDDCR <number>               display device control register
RM    {<nbr>&#65533;<name>} <value> modify general purpose or user defined register
RMSPR <number>   <value>     modify special purpose register
RMDCR <number>   <value>     modify device control register
TLB   <from> [<to>]          display TLB entry
WTLB  <idx> <epn> <rpn>      write TLB entry (only PPC440)
DFLUSH [<addr>]              flush data cache (addr = cached memory address)
IFLUSH                       invalidate instruction cache
DCACHE <from> [<to>]         display L1 data cache (440: lines, 405: sets)
ICACHE <from> [<to>]         display L1 inst cache (440: lines, 405: sets)
BOOT                         reset the BDI and reload the configuration
RESET [HALT | RUN [time]]    reset the target system, change startup mode
BREAK [SOFT | HARD]          display or set current breakpoint mode
GO    [<pc>]                 set PC and start target system
GO    <n> <n> [<n>[<n>]]     start multiple cores in requested order
TI    [<pc>]                 trace on instuction (single step)
TC    [<pc>]                 trace on change of flow
HALT                         stop all cores via HALT pin
STOP  [<n>[<n>[<n>[<n>]]]]   stop core(s) via JTAG port (n = core number)
BI  <addr>                   set instruction breakpoint
CI  [<id>]                   clear instruction breakpoint(s)
BD  [R|W] <addr>             set data breakpoint (32bit access)
BDH [R|W] <addr>             set data breakpoint (16bit access)
BDB [R|W] <addr>             set data breakpoint ( 8bit access)
CD [<id>]                    clear data breakpoint(s)
INFO                         display information about the current state
LOAD   [<offset>] [<file> [<format>]] load program file to target memory
VERIFY [<offset>] [<file> [<format>]] verify a program file to target memory
PROG   [<offset>] [<file> [<format>]] program flash memory
                                      <format> : SREC or BIN or AOUT or ELF
ERASE  [<address> [<mode>]]  erase a flash memory sector, chip or block
                   <mode>  : CHIP, BLOCK or SECTOR (default is sector)
ERASE  <addr> <step> <count> erase multiple flash sectors
UNLOCK [<addr> [<delay>]]    unlock a flash sector
UNLOCK <addr> <step> <count> unlock multiple flash sectors
FLASH  <type> <size> <bus>   change flash configuration
DELAY  <ms>                  delay for a number of milliseconds
SELECT <core>                change the current core
HOST   <ip>                  change IP address of program file host
PROMPT <string>              defines a new prompt string
CONFIG                       display or update BDI configuration
CONFIG <file> [<hostIP> [<bdiIP> [<gateway> [<mask>]]]]
HELP                         display command list
JTAG                         switch to JTAG command mode
QUIT                         terminate the Telnet session

- TARGET: waiting for target Vcc
440EPx>quit
Connection closed by foreign host.
[root@sokrates gdbpp421-1.16-4xx-2006-11-03]# 
4.11. Using the BDM/JTAG Debugger, BDI2000, Part 1 1. Denx Training Topics 4.11.2. Downloading U-Boot to flash
Prev Home Next