Hello all!
I have managed to install openocd version 0.4.0 along gdb version 6.8 and already managed to set a single break point. But then I get stuck: When my program stops at the breakpoint I can not single step through the application. This is the gdb session:
$ /c/arm-gcc/bin/arm-eabi-gdb.exe hello.elf
GNU gdb 6.8
Copyright (C) 2008 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”…
(gdb) target remote |openocd --pipe
Remote debugging using |openocd --pipe
Open On-Chip Debugger 0.4.0 (2010-06-29-13:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
0x00000000 in ?? ()
(gdb) mon halt
target state: halted
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x80000033 pc: 0x00c508b0
MMU: enabled, D-Cache: enabled, I-Cache: enabled
(gdb) b vMain
Breakpoint 1 at 0xbd74d2: file src/hello.cpp, line 45.
(gdb) cont
Continuing.
Breakpoint 1, vMain () at src/hello.cpp:45
45 B b;
Current language: auto; currently c++
(gdb) n
Breakpoint 1, vMain () at src/hello.cpp:45
45 B b;
(gdb) n
Breakpoint 1, vMain () at src/hello.cpp:45
45 B b;
(gdb) n
Breakpoint 1, vMain () at src/hello.cpp:45
45 B b;
(gdb) n
Breakpoint 1, vMain () at src/hello.cpp:45
45 B b;
(gdb) delete 1
(gdb) n
As you can see the PC is just not increased when trying to step. When I delete the breakpoint “n” just does not return.
The code lives in flash, i.e. I have to use hardware breakpoints. I use the following configuration:
source [find interface/olimex-jtag-tiny.cfg]
source [find target/at91rm9200.cfg]
flash bank xip cfi 0x400000 0xC00000 2 2 $_TARGETNAME
telnet_port 4444
gdb_port 3333
arm7_9 fast_memory_access enable
Although I use “flash bank” gdb does not seem to detect the flash and “info mem” does list it. I also played around with “gdb_breakpoint_override hard” which also did not help.
So what is missing that I can single step through the application?