I think my issue is similar to issue 2 in this thread GDB Linux debugging
I have a ADSP-SC589 EZ-Board which is running a Linux kernel created by Buildroot.
I start openocd connecting to an ICE1000 emulator.
Note I have removed the line mwh phys 0x3100101c 0xff from adspsc58x.cfg and also replaced the reset command in configure -event gdb-attach with halt as I don't want the cpu resetting.
> sudo /opt/analog/cces/2.8.0/ARM/openocd/bin/openocd -f interface/ice1000.cfg -f target/adspsc58x.cfg
Open On-Chip Debugger (Analog Devices CCES 2.8.0 OpenOCD 0.9.0-g5030ad7) 0.9.0
Licensed under GNU GPL v2
Report bugs to <firstname.lastname@example.org>
adapter speed: 1000 kHz
Info : select transport "jtag"
adapter speed: 500 kHz
halt and restart using CTI
trst_only separate trst_push_pull
Info : ICE-1000 firmware version is 1.0.2
Info : clock speed 1000 kHz
Info : JTAG tap: adspsc58x.adjc tap/device found: 0x228080cb (mfg: 0x065, part: 0x2808, ver: 0x2)
Info : JTAG tap: adspsc58x.dap enabled
Info : adspsc58x.dap: hardware has 3 breakpoints, 2 watchpoints
Info : adspsc58x.dap: but you can only set 1 watchpoint
I then start gdb and attach to openocd
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from output/build/linux-custom/vmlinux...done.
(gdb) target remote :3333
Remote debugging using :3333
0x00004884 in ?? ()
At this point the system is unresponsive to keyboard input
The openocd output is as follows:
Info : accepting 'gdb' connection on tcp/3333
Info : ttbcr 0ttbr0 cecfc059ttbr1 c2004059
Info : adspsc58x.dap rev 1, partnum c05, arch f, variant 0, implementor 41
Info : number of cache level 1
Info : adspsc58x.dap cluster 0 core 0 mono core
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc001b528
So how do I debug the Linux kernel? I noticed the author of the thread I referenced was using a BDI2000 debugger, I have not got one of these but I have tried JLink and Olimex emulators using the SC589 config files in Openocd with no success. I'm sure the ADI developers are able to debug the kernel. How do they do it? Is there an alternative openocd adspsc589.cfg file for debugging the Linux kernel?