gdb 7.x and OpenOCD
Posted: Fri Jun 04, 2010 5:43 pm
I've been trying to setup debugging on my LM3S based Cortex-M3 board using the devkitARM toolchain and OpenOCD. My goal is to get this same setup configured for use in the Eclipse IDE with the CDT, Zylin, and GNU ARM plugins. I had release 25 (gdb 6.8) installed and working 100% with the latest OpenOCD 0.5.0 SVN build and it worked flawlessly. However, since updating to release 30 and gdb 7.1, I get a warning about disabled XML support after connecting to OpenOCD and the code fails to flash successfully. I get no error messages from gdb or OpenOCD regarding any failure but it gets lost when I start debugging. I have also tried releases 28 and 29 which use gdb versions 7.0.1 and 7.1 respectively with the same results. I have tried CodeSourcery's G++ Lite with gdb 7.0.50 and it works 100%.
This is the output I get from the gdb from command line:
This is the output I get from the gdb from command line:
This is the output I get from OpenOCD:C:\Program Files\Micromint\Eagle\StellarisWare\boards\eagle\uart_echo\eagle-50e\
gcc>arm-eabi-gdb uart_echo.out
GNU gdb (GDB) 7.1
Copyright (C) 2010 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-pc-mingw32 --target=arm-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Program Files\Micromint\Eagle\StellarisWare\boards\eagle
\uart_echo\eagle-50e\gcc/uart_echo.out...done.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
warning: Can not parse XML memory map; XML support was disabled at compile time
0x00000060 in ?? ()
(gdb) monitor jtag arp_init
JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, v
er: 0x3)
(gdb) monitor reset init
JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, v
er: 0x3)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000060 msp: 0x20000008
(gdb) load
Loading section .text, size 0x1924 lma 0x2000
Loading section .data, size 0x11c lma 0x3924
Start address 0x2000, load size 6720
Transfer rate: 35 KB/sec, 3360 bytes/write.
(gdb) j ResetISR
Continuing at 0x2508.
lm3s6918.cpu -- clearing lockup after double fault
Program received signal SIGINT, Interrupt.
0x000003e2 in ?? ()
Alternatively, I can successfully flash by issuing the flash write_image command to OpenOCD but this is less than ideal when working in Eclipse. I could also stick with an older release but I would prefer to be able to use the latest updates. From doing some Googling, it appears this problem may be caused by devkitARM not being built with the libexpat library. Is this true and if so is it possible to have the community release's built with this in the future? I could build my own but I think sticking with community releases would be better. Thanks in advance for any input.C:\openocd-0.5.0>openocd -f stellaris.cfg -c "init" -c "halt" -c "reset halt"
Open On-Chip Debugger 0.5.0-dev-00267-gef72484-dirty (2010-05-27-10:08)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
500 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
srst_only separate srst_gates_jtag srst_open_drain
Info : device: 4 "2232C"
Info : deviceID: 67353817
Info : SerialNumber: 04SGCG3DA
Info : Description: Stellaris Evaluation Board A
Info : clock speed 500 kHz
Info : JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : lm3s6918.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000060 msp: 0x20000008
Info : accepting 'gdb' connection from 3333
Warn : acknowledgment received, but no packet pending
Info : JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : JTAG tap: lm3s6918.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000060 msp: 0x20000008
Warn : lm3s6918.cpu -- clearing lockup after double fault