Author Topic: openOCD integration with gdb through Codeblocks  (Read 186 times)

Offline anandamu16

  • Multiple posting newcomer
  • *
  • Posts: 56
openOCD integration with gdb through Codeblocks
« on: February 10, 2017, 07:02:47 am »

I am working on developing my embedded system toolchain through codeblocks.
Tools I am using:
- Codeblocks (developed after building codeblocks sdk available at SVN)
- wxwidget 2.8.12 (shared=1, monolithic=1, unicode=1, build = relaease and debug)
- Mingw compiler (5.3)
- openOCD

I have build up openOCD.exe from its libraries and source through cygwin.
Now I want to connect gdb debugger to this openOCD for JTAG/SWD Connection through codeblocks. I get to know that I can do it by setting a remote debugger connection setting available in codeblocks. Projects->properties->debugger->Remote debugger support.

I know that I need to put some gdb amd shell commands to communicate with openOCD like target remote localhost 4444 etc.
I want to ask that how can i link it with openocd.exe. I mean I want to know how the communication will setup properly.? Any help or related link will be good to kickstart.

Anand A.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1186
Re: openOCD integration with gdb through Codeblocks
« Reply #1 on: February 10, 2017, 12:52:21 pm »
Hi, i don't use OpenOCD, but i use the segger j-link with j-link gdb. I think there are more or less the same steps to create a successful environment for embedded debugging:

Project settings: Project->Properties->Debugger->Additional GDB commands->After connection:
monitor reset

strangely this was all i had to set...

have you any command line or tutorial to start OpenOCD?
You can use the Tool plugin to start OpenOCD with path to the project for example...