- Wed May 06, 2015 12:40 am
#16662
Made some progress, new commits pushed including some fixes and hardware breakpoint support.
openocd usually tells gdb where to use hard vs soft breakpoints based on the flash map. There's no flash driver yet so no flash map, so to use breakpoints first run:
... in openocd before setting a breakpoint. Also remember there's only one breakpoint!
***
Found what looks like a bug in gdb when unwinding call0 stack frames. Registers in previous frames aren't read properly. This becomes really obvious if the frame pointer is on (nonsense backtraces), but probably has other effects too.
Patch here. Can anyone test this or confirm it looks reasonable before I take it to the gdb maintainers?
For future reference - If you used crosstool for your existing gdb but want to build a new gdb from git, and install it over the old gdb, the steps are:
Code: Select allcd /path/to/gdb/source/
tar --strip-components=1 -xvf /path/to/esp-open-sdk/crosstool-NG/overlays/xtensa_lx106.tar gdb
./configure --target=xtensa-lx106-elf' '--prefix=/path/to/esp-open-sdk/xtensa-lx106-elf' '--with-build-sysroot=/path/to/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot' '--with-sysroot=/path/to/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot
make
make install
(You can possibly also just patch the gdb 7.5.1 in the crosstool-NG/.build directory and rerun ct-ng build. I didn't try that.)
***
Still no luck finding a way to break on reset, for 'reset halt'.