[U-Boot-Users] BDI2000 flashing problem

Santoso, Yusdi Yusdi_Santoso at adaptec.com
Tue Oct 19 06:47:20 CEST 2004


Hi all,

I have a problem using BDI2000 to flash u-boot into my board. I had it working yesterday, but this morning it just refused to work.
Does the BDI flashing require some boot loader code to be already available in the flash?

Thanks,


Yusdi

The BDI telnet log:

// Board: Motorola Hidden Dragon, quite similar to Sandpoint
// Processor: MPC8241
// Memory: start = 0x00000000
//         size  = 32 MB
// Flash: start = 0xff800000
//        size = 2 MB = 1 bank x 16 bits x 1 M

// Initialization message
- TARGET: waiting for target Vcc
- TARGET: waiting for target Vcc
- TARGET: processing power-up delay
- TARGET: processing user reset request
- BDI asserts HRESET
- Reset JTAG controller passed
- Bypass check: 0x000000001 => 0x00FFFFFF
- JTAG exists check failed
- Remove HRESET and try again
- Bypass check: 0x000000001 => 0x00000001
- JTAG exists check passed
- COP status is 0x01
- Check running state passed
- BDI scans COP freeze command
- BDI removes HRESET
- Target PVR is 0x80811014
- COP status is 0x05
- Check stopped state passed
- Check LSRL length passed
- BDI resumes program execution
- COP status is 0x01
- Waiting for target stop failed
// Flash is still blank (0xffff)
- TARGET: Break at boot vector failed, freeze forced
- TARGET: Target PVR is 0x80811014
- TARGET: resetting target passed
- TARGET: processing target startup ....
- TARGET: processing target startup passed

BDI>info
    Target CPU        : MPC82xx (G2H4)
    Target state      : debug mode
    Debug entry cause : COP freeze (startup)
// The reset vector is at 0xfff00100, seems like the processor has executed few bytes
// but not sure why stop here.
    Current PC        : 0xfff00800
    Current CR        : 0x00000000
    Current MSR       : 0x00000000
    Current LR        : 0x00000000
    
BDI>md 0xfff00000
fff00000 : ffffffff ffffffff ffffffff ffffffff  ................
fff00010 : ffffffff ffffffff ffffffff ffffffff  ................
fff00020 : ffffffff ffffffff ffffffff ffffffff  ................
fff00030 : ffffffff ffffffff ffffffff ffffffff  ................
fff00040 : ffffffff ffffffff ffffffff ffffffff  ................
fff00050 : ffffffff ffffffff ffffffff ffffffff  ................
fff00060 : ffffffff ffffffff ffffffff ffffffff  ................
fff00070 : ffffffff ffffffff ffffffff ffffffff  ................
fff00080 : ffffffff ffffffff ffffffff ffffffff  ................
fff00090 : ffffffff ffffffff ffffffff ffffffff  ................
fff000a0 : ffffffff ffffffff ffffffff ffffffff  ................
fff000b0 : ffffffff ffffffff ffffffff ffffffff  ................
fff000c0 : ffffffff ffffffff ffffffff ffffffff  ................
fff000d0 : ffffffff ffffffff ffffffff ffffffff  ................
fff000e0 : ffffffff ffffffff ffffffff ffffffff  ................
fff000f0 : ffffffff ffffffff ffffffff ffffffff  ................

// Erasing flash is ok
BDI>erase 0xff800000 CHIP
Erasing flash at 0xff800000
Erasing flash passed

// Program a 65 bytes binary file, failed
BDI>prog 0xfff00000 /tftpboot/dummy.bin BIN
Programming /tftpboot/dummy.bin , please wait ....
# Programming flash memory failed at 0x00000000

// Programming u-boot binary file, failed
BDI>prog 0xfff00000 /tftpboot/u-boot.bin BIN
Programming /tftpboot/u-boot.bin , please wait ....
# Programming flash memory failed at 0x00000000

// Content of RAM at 0x00000000
BDI>md 0x00000000
00000000 : 7ebbfaa6 7e19faae 7c55f2a6 5214a5fe  ~...~...|U..R...
00000010 : 7f36f2b6 7d192eae 5e75a43e 7e5cfea6  .6..}...^u.>~\..
00000020 : 7e77f2a6 7e92c6a6 7eab3aa6 7eddcaa6  ~w..~...~.:.~...
00000030 : 7ef9f2a6 7f13ceae 7fbf5aa6 7f514ea6  ~.........Z..QN.
00000040 : 7f7b4ab6 7f934eae 7fa67526 7fdbdaa6  .{J...N...u&....
00000050 : 7ffab2a6 bee57f8e 7c5db5bd b882fd49  ........|].....I
00000060 : 7df77d35 6488dcee 7fff7329 60447656  }.}5d.....s)`DvV
00000070 : 6befa062 abababab bbababab abababab  k..b............
00000080 : ebbbabab abababab abababab abababab  ................
00000090 : abebabab abababab abbbabab abababab  ................
000000a0 : bbbbbbab ab88c6ab ed7330ab cd43c9ab  .........s0..C..
000000b0 : edf973ab cd20fdab edbbd2ab cd82bfab  ..s.. ..........
000000c0 : cd55adab cdc7cfab eded51ab cd00ddab  .U........Q.....
000000d0 : edbf65ab cd8047ab edba9dab cd285eab  ..e...G......(^.
000000e0 : edbaf4ab cd406eab cdd6f5ab cdc4adab  ..... at n.........
000000f0 : edd9bbab cd02fbab fdf422ab cd4577ab  .........."..Ew

// Load a 65 bytes file to RAM, failed
BDI>load 0x00000000 /tftpboot/dummy.bin BIN
Loading /tftpboot/dummy.bin , please wait ....
# PPC: timeout while waiting for freeze

// Load a 63 bytes file to RAM, ok
BDI>load 0x00000000 /tftpboot/dummy.bin BIN
Loading /tftpboot/dummy.bin , please wait ....
Loading program file passed

// The content of the file is 0x00
BDI>md 0x00000000
00000000 : 00000000 00000000 00000000 00000000  ................
00000010 : 00000000 00000000 00000000 00000000  ................
00000020 : 00000000 00000000 00000000 00000000  ................
00000030 : 00000000 00000000 00000000 000000a6  ................
00000040 : 7f7b4ab6 7f934eae 7fa67526 7fdbdaa6  .{J...N...u&....
00000050 : 7ffab2a6 bee57f8e 7c5db5bd b882fd49  ........|].....I
00000060 : 7df77d35 6488dcee 7fff7329 60447656  }.}5d.....s)`DvV
00000070 : 6befa062 abababab bbababab abababab  k..b............
00000080 : ebbbabab abababab abababab abababab  ................
00000090 : abebabab abababab abbbabab abababab  ................
000000a0 : bbbbbbab ab88c6ab ed7330ab cd43c9ab  .........s0..C..
000000b0 : edf973ab cd20fdab edbbd2ab cd82bfab  ..s.. ..........
000000c0 : cd55adab cdc7cfab eded51ab cd00ddab  .U........Q.....
000000d0 : edbf65ab cd8047ab edba9dab cd285eab  ..e...G......(^.
000000e0 : edbaf4ab cd406eab cdd6f5ab cdc4adab  ..... at n.........
000000f0 : edd9bbab cd02fbab fdf422ab cd4577ab  .........."..Ew

// But modifying the RAM address manually is fine
BDI>mmb 0x00000000 0xaa 100


//--------------------------------------------------------------
// GDB: no u-boot loaded yet, so I don't think this make any sense
//--------------------------------------------------------------
/home/test> ${CROSS_COMPILE}gdb u-boot

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 --target=ppc-linux"...
(gdb) target remote 192.168.0.5:2001
Remote debugging using 192.168.0.5:2001
FPUnavailable () at /home/yusdi/project/u-boot/cpu/mpc824x/start.S:254
254             STD_EXCEPTION(EXC_OFF_FPUNAVAIL, FPUnavailable, UnknownException)
(gdb)


-----------------------------------------------------------------
hdragon.cfg: based on Sandpoint 8240 with some modification for memory settings
-----------------------------------------------------------------

;bdiGDB configuration file for Sandpoint 8240 evaluation system
;--------------------------------------------------------------
;
[INIT]
; init core register
WREG    MSR             0x00000000      ;clear MSR

; init memory controller (based on DINK32)
WM32    0xFEC00000      0x80000080      ;select MSAR1
WM32    0xFEE00000      0x00204060      ;
WM32    0xFEC00000      0x84000080      ;select MSAR2
WM32    0xFEE00000      0x80a0c0e0      ;
WM32    0xFEC00000      0x90000080      ;select MEAR1
WM32    0xFEE00000      0x1f3f5f7f      ;
WM32    0xFEC00000      0x94000080      ;select MEAR2
WM32    0xFEE00000      0x9fbfdfff      ;
WM32    0xFEC00000      0xa0000080      ;select MBEN
WM8     0xFEE00000      0x03            ;
WM32    0xFEC00000      0xa0000080      ;select MPM
WM8     0xFEE00003      0x32            ;
WM32    0xFEC00000      0xf0000080      ;select MCCR1
WM32    0xFEE00000      0x00006088      ;do not set MEMGO
WM32    0xFEC00000      0xf4000080      ;select MCCR2
WM32    0xFEE00000      0x3c020000      ;
WM32    0xFEC00000      0xf8000080      ;select MCCR3
WM32    0xFEE00000      0x00004078      ;
WM32    0xFEC00000      0xfc000080      ;select MCCR4
WM32    0xFEE00000      0x39323035      ;
WM32    0xFEC00000      0xf0000080      ;select MCCR1
WM32    0xFEE00000      0x00006888      ;now set MEMGO
;
WM32    0xFEC00000      0x78000080      ;select EUMBBAR
WM32    0xFEE00000      0x000000fc      ;Embedded utility memory block at 0xFC000000
;
WM32    0xFEC00000      0xa8000080      ;select PICR1
WM32    0xFEE00000      0x901014ff      ;enable flash write (Flash on processor bus)
;
;  Added to use the high drive strength for the memory selects & addressing
;WM32    0xFEC00000      0x70000080      ; select ODCR
;WM8     0xFEE00003      0xff            ; high drive for everything
;
;  Added to toggle the DLL_RESET bit
WM32    0xFEC00000      0xe0000080      ; select AMBOR
WM8     0xFEE00000      0xe0            ; DLL_RESET on
WM32    0xFEC00000      0xe0000080      ; select AMBOR
WM8     0xFEE00000      0xc0            ; DLL_RESET off
;
; define maximal transfer size
;TSZ1    0xFF800000      0xFFFFFFFF      ;ROM space (only for PCI boot ROM)
TSZ4    0xFF800000      0xFFFFFFFF      ;ROM space (only for Local bus flash)


[TARGET]
CPUTYPE     8240        ;the CPU type (603EV,750,8240,8260)
JTAGCLOCK   0           ;use 16 MHz JTAG clock
WORKSPACE   0x00000000	;workspace in target RAM for fast download
BDIMODE     AGENT     	;the BDI working mode (LOADONLY | AGENT | GATEWAY)
BREAKMODE   SOFT      	;SOFT or HARD, HARD uses PPC hardware breakpoint
VECTOR      CATCH       ;catch unhandled exceptions
DCACHE      NOFLUSH	;data cache flushing (FLUSH | NOFLUSH)
STARTUP     RESET

[HOST]
IP          192.168.0.1
;FILE        E:\cygnus\root\usr\demo\sp8240\vxworks
FORMAT      ELF
LOAD        MANUAL      ;load code MANUAL or AUTO after reset
DEBUGPORT   2001

[FLASH]
; Chip = 29LV160TE
; Size = 1x16 bitsx1M

; Am29LV800BB on local processor bus (RCS0)
; set PPMC8240 switch SW2-1 OFF => ROM on Local bus
; enable flash write in PICR1 (see INIT part)
; set maximal transfer size to 4 bytes (see INIT part)
CHIPTYPE    AM29BX8     ;Flash type (AM29F | AM29BX8 | AM29BX16 | I28BX8 | I28BX16)
CHIPSIZE    0x200000    ;The size of one flash chip in bytes (e.g. Am29LV800BB = 0x100000)
BUSWIDTH    8           ;The width of the flash memory bus in bits (8 | 16 | 32 | 64)
WORKSPACE   0x00000000  ;workspace in SDRAM
FILE        /tftpboot/u-boot.bin  ;The file to program
ERASE       0xFFF00000  ;erase sector 0 of flash
ERASE       0xFFF04000  ;erase sector 1 of flash
ERASE       0xFFF06000  ;erase sector 2 of flash
ERASE       0xFFF08000  ;erase sector 3 of flash
ERASE       0xFFF10000  ;erase sector 4 of flash
ERASE       0xFFF20000  ;erase sector 5 of flash
ERASE       0xFFF30000  ;erase sector 6 of flash
ERASE       0xFFF40000  ;erase sector 7 of flash
ERASE       0xFFF50000  ;erase sector 8 of flash
ERASE       0xFFF60000  ;erase sector 9 of flash
ERASE       0xFFF70000  ;erase sector 10 of flash

[REGS]
DMM1        0xFC000000                  ;Embedded utility memory base address
IMM1        0xFEC00000  0xFEE00000      ;configuration registers at byte offset 0
IMM2        0xFEC00000  0xFEE00001      ;configuration registers at byte offset 1
IMM3        0xFEC00000  0xFEE00002      ;configuration registers at byte offset 2
IMM4        0xFEC00000  0xFEE00003      ;configuration registers at byte offset 3
FILE        /tftpboot/reg8240.def





More information about the U-Boot mailing list