How to debug openocd in eclipse

apt-get install libftdi-dev

apt-get install libusb-1.0-0-dev

i use notepadqq replace all Makefile -O2 to -O0

cd [~home]/openocd-0.9.0

./configure --prefix=/opt/openocd --enable-maintainer-mode --enable-ftdi

make && make install

in eclipse

File → new → c++ project

cancel [use default location]

input [~home]/openocd-0.9.0

project properties

c/c++ build → builder settings

  1. debug setting

c/c++ application

main tab: /root/openocd-0.9.0/src/openocd

arguments tab: -f /opt/openocd/share/openocd/scripts/target/imx6d-1gb.cfg

demo:

https://picasaweb.google.com/1061855410 … 6517908210

done~~~ start debug