[U-Boot-Users] gdb debug!

junping feng junpingfeng at yahoo.com.cn
Thu Jul 14 12:33:07 CEST 2005

Hi,I have some question on gdb-debugger with
BDI2000.My board is like MPC8260ADS,ppcboot version is
2.0.0. I have programed ppcboot.bin into flash with
BDI2000. After power on board ,information printed is

PPCBoot 2.0.0 (Jul 10 2005 - 11:54:35)                

Rewin Tech :fengjunping && huangjianzhong             

MPC8260 Reset Status: External Soft, External Hard    

MPC8260 Clock Configuration                           
 - Bus-to-Core Mult 5x, VCO Div 2, 60x Bus Freq  20-60
, Core Freq 100-300                                   
 - dfbrg 0, corecnf 0x0b, busdf 5, cpmdf 1, plldf 0,
pllmf 2                                               
 - vco_out  199999998, scc_clk   49999999, brg_clk  
 - cpu_clk  166666665, cpm_clk   99999999, bus_clk  

CPU:   MPC8260 (Rev 14, Mask unknown
[immr=0x0064,k=0x002d]) at 166.666 MHz                
Board: Motorola MPC8260ADS                
I2C:   ready                     
DRAM:  16 MB    
(stop here!)

Then ,cpu hangs!

When I debug source code with gdb,I am troubled with
the problem below:
I don't know where is wrong!

[root at localhost root]# cd ./ppcboot
[root at localhost ppcboot]# ppc-linux-gdb ppcboot
GNU gdb Yellow Dog Linux (5.2.1-4b_4)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "--host=i386-redhat-linux
(gdb) target remote
Remote debugging using
0xff812568 in crc32 (crc=1165264316,
    buf=0xff845760 '?' <repeats 200 times>...,
len=239780) at crc32.c:166
166           DO8(buf);
(gdb) b cpu_init_f
Breakpoint 1 at 0xff803be8: file cpu_init.c, line 118.
(gdb) cont
warning: Cannot insert breakpoint 1:
Error accessing memory address 0xff803be8: Unknown
error 4294967295.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) c
Program received signal SIGSTOP, Stopped (signal).
0x00000800 in ?? ()

Below is the configure file for BDI2000.

; bdiGDB configuration file for myppc8250 board

; ----------------------------------------------



; init core register

WREG MSR        0x00000000;clear MSR

WM32 0xF00101A8 0xF0000000 ;IMMR : internal space @

WM32 0xF0010004 0xFFFFFFC3 ;SYPCR: disable watchdog

WM32 0xF0010C80 0x00000001 ;SCCR : normal operation

WM32 0xF0010000 0x02600000 ;SIUMCR

; init memory controller

WM32 0xF0010104 0xFF800836 ;OR0: Boot Rom 8

WM32 0xF0010100 0xFF801001 ;BR0: Flash @0xFF800000

WM32 0xF0010114 0xFF003080 ;OR2: SDRAM 16M,each chip
organzied 512K*32bits*4banks,total two chips.

WM32 0xF0010110 0x00000041 ;BR2: SDRAM @0x0000000

; init SDRAM Init (PPC bus)
WM16 0xF0010184 0x1900     ;MPTPR

WM8  0xF001019C 0x10       ;PSRT 

WM32 0xF0010190 0x2869A452 ;PSDMR: Precharge all banks

WM8  0x00000000 0xFF       ;Access SDRAM

WM32 0xF0010190 0x0869A452 ;PSDMR: CBR Refresh

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM8  0x00000000 0xFF       ;Access SDRAM

WM32 0xF0010190 0x1869A452 ;PSDMR: Mode Set

WM8  0x00000000 0xFF       ;Access SDRAM

WM32 0xF0010190 0x4069A452 ;PSDMR: enable refresh,


CPUTYPE         8260       ;the CPU type

JTAGCLOCK       0         ;use 16 MHz JTAG clock

BOOTADDR        0xFFF00100 ;boot address used for
start-up break

;WORKSPACE       0x00000000 ;workspace in target RAM
for fast download

BDIMODE         AGENT     ;the BDI working mode

BREAKMODE       HARD       ;SOFT or HARD, HARD uses
PPC hardware breakpoints

;STEPMODE HWBP ;TRACE or HWBP, HWPB uses a hardware

VECTOR          CATCH      ;catch unhandled exceptions

DCACHE          NOFLUSH    ;data cache flushing (FLUSH

;MMU             XLAT       ;translate effective to
physical addressa

;PTBASE 0x000000F0 ;here is the pointer to the page
table pointers

POWERUP         5000       ;start delay after power-up
detected in ms



FILE            /tftpboot/ppcboot

FORMAT          ELF

LOAD            MANUAL     ;load code MANUAL or AUTO
after reset

DEBUGPORT       2001

PROMPT          MPC8260>   ;new prompt for Telnet


CHIPTYPE        STRATAX16  ;Flash type (Intel

CHIPSIZE        0x800000  ;The size of one flash chip
in bytes(16MB)

BUSWIDTH        16         ;The width of the flash
memory bus in bits

;WORKSPACE       0x00000000 ;workspace in SDRAM

FORMAT          BIN        0x0

FILE            /tftpboot/ppcboot.bin

ERASE           0xFF800000 CHIP  ;erase whole chip


DMM1            0xF0000000 ;Internal Memory Map Base

FILE            reg8260.def

Now, many people are still using ppcboot, please help

Thanks in advance!!


More information about the U-Boot mailing list