Pollux JTAG with Wiggler
Introduction
For now I'm just going to dump my configuration files here that I use to debug the kernel. To speed up the debug process, I use Micromon to load the kernel to memory, rather than waiting on the slow Wiggler.
Please see Pollux JTAG with FTDI or the Didj JTAG How To for more info on OpenOCD or GDB.
openocd.cfg
interface parport parport_port 0 parport_cable wiggler # length of reset signal: [ms] jtag_nsrst_assert_width 100 # don't talk to JTAG after reset for: [ms] jtag_nsrst_delay 250 reset_config trst_and_srst separate # end reset config # reset_config trst_only if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME pollux } if { [info exists ENDIAN] } { set _ENDIAN $ENDIAN } else { set _ENDIAN little } if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { # force an error till we get a good number set _CPUTAPID 0x07926f0f } #jtag scan chain jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs
.gdbinit
define dmesg set $log_buf = log_buf set $log_end = log_end set $log_buf_len = log_buf_len set $logged_chars = logged_chars set $i = 0 set $end_idx = (log_end - 1) & (log_buf_len - 1) while ($i < logged_chars) set $idx = (log_end - 1 - logged_chars + $i) & (log_buf_len - 1) printf "%c", log_buf[$idx] set $i = $i + 1 end end document dmesg print the kernel ring buffer end define reload mon reset shell load_kernel.py arch/arm/boot/Image mon halt mon reg r0 0 mon reg r1 2028 mon reg r2 0xFFFFFFFF mon reg pc 0x00008000 mon arm core_state arm symbol-file vmlinux end document reload reload Resets the target and reloads the kernel, halted at the kernel entry point end target remote :3333 mon target_request debugmsgs charmsg mon arm7_9 fast_memory_access enable mon arm7_9 dcc_downloads enable reload