User forums > Embedded development

openOCD integration with gdb through Codeblocks

(1/1)

anandamu16:
Hi,

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.

Thanks
Anand A.

BlueHazzard:
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:

--- Quote ---monitor reset
load
--- End quote ---

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...

anandamu16:
Thanks Blue Hazzard,

I go through some online openocd + codeblocks tutorials and succeeded to set up remote connection to openocd.

I have recently started working with it. Whenever I call the commands like "load ./bin/Debug/ledtest.elf", my program gets written into flash. I want to know what are the commands sequence it is calling at backend like flash erase, flash write etc. I f you have any idea, please let me know.

BlueHazzard:
look at the makefile of this post:
http://stackoverflow.com/questions/38033130/how-to-use-the-gdb-gnu-debugger-and-openocd-for-microcontroller-debugging-fr

You can make tool entries from the tools+ menu with this commands...
At the moment you can't integrate them in the debugger...
I think since a long time how to integrate this, but i have no clean idea...

Navigation

[0] Message Index

Go to full version