终于解决问题了!
原来ixp425的软中断是自动生效的!
完整调试如下:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "USB<=>JTAG&RS232"
ft2232_layout jtagkey
ft2232_vid_pid 0x1457 0x5118
jtag_speed 0
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
#srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 7 0x1 0x7f 0x7e
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target xscale big run_and_halt 0 IXP42x
target_script 0 reset ixp425.init
run_and_halt_time 0 30
# flash bank cfi <base> <size> <chip width> <bus width> <target#>
flash bank cfi 0x50000000 0x800000 2 2 0
#-----------------begin xscale-olimex-ipx42x.actions-----------------------------
# openocd rev 728 - flash writing
wait_halt
#set big endian mode
reg XSCALE_CTRL 0xF8
#setup expansion bus CS#0, write enable, @0x50000000
#mww 0xc4000000 0xbcd23c42
mww 0xc4000000 0xbd113c42
#setup expansion bus CS#1, write enable, @0x51000000
mww 0xc4000004 0x80000002
flash probe 0
# 32 MB, CAS3
mww 0xcc000000 0x00000018
# 64 MB, CAS2
#mww 0xcc000000 0x00000002
# 64 MB, CAS3
# mww 0xcc000000 0x0000000A
### disable refresh
mww 0xcc000004 0x00000000
### nop
mww 0xcc000008 0x00000003
#######sleep 60
### set refresh value
#mww 0xcc000004 0x0000081a
mww 0xcc000004 0x00000412
### precharge all
mww 0xcc000008 0x00000002
sleep 20
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000001
mww 0xcc000008 0x00000006
sleep 200
# map SDRAM to 0x00000000
mww 0xc4000020 0x00fffffe
sleep 200
mww 0x800000 0xFEED
sleep 2000
mdw 0x800000
sleep 6000
#xscale mmu enable
#xscale dcache enable
#xscale trace_buffer enable
# Obviously you'll need to change this. I'll leave it enabled...
# 誹 red boot 竚 劍竚隔挦蛤ゅン嗭
# DD-Wrt 匟 424ノ redboot
# 娀凂乬 稱ノ儶碞儶
# flash write_image erase rb-mi424wr-ROM-1_joe8.bin 0x50000000 bin
# OpenWRT 匉ガㄏノ redboot セ僶 joe4
#flash write_image erase redboot.bin 0x50000000 bin
#sleep 2000
#shutdown
#-------------------end xscale-olimex-ipx42x.actions-----------------------------
打开终端
jian@feng-desktop

/ecos/rdbuild/armmi425_install/bin$ xscale-elf-gdb
(gdb) target remote 127.0.0.1:3333
Remote debugging using 127.0.0.1:3333
warning: Can not parse XML memory map; XML support was disabled at compile time
0x00000000 in ?? ()
(gdb) monitor reset
JTAG device found: 0x19275013 (Manufacturer: 0x009, Part: 0x9275, Version: 0x1)
executing reset script 'ixp42x.actions'
XSCALE_CTRL (/32): 0x000000f8
flash 'cfi' found at 0x50000000
Ignoring packet error, continuing...
flash 'cfi' found at 0x50000000
(gdb) set endian little
The target is assumed to be little endian
(gdb) load redboot.elf
Loading section .rom_vectors, size 0x40 lma 0x100000
Loading section .text, size 0x1c0a8 lma 0x100040
Loading section .rodata, size 0x44e6 lma 0x11c0e8
Loading section .data, size 0xebc lma 0x1205d0
Start address 0x100040, load size 136330
Transfer rate: 14 KB/sec, 11360 bytes/write.
(gdb) file redboot.elf
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from /home/jian/ecos/rdbuild/armmi425_install/bin/redboot.elf...done.
(gdb) br start
Breakpoint 1 at 0x100050
(gdb) c
Continuing.
Breakpoint 1, 0x00100050 in start ()
(gdb) br cyg_start
Breakpoint 2 at 0x110b70: file /home/jian/ecos/mi424wr/redboot-ixp4xx/packages/redboot/current/src/main.c, line 280.
(gdb) c
Continuing.
Breakpoint 2, cyg_start ()
at /home/jian/ecos/mi424wr/redboot-ixp4xx/packages/redboot/current/src/main.c:280
280 CYGACC_CALL_IF_MONITOR_RETURN_SET(return_to_redboot);
(gdb) quit