Author Topic: Remote debugging  (Read 5904 times)

FreeRTOS.org

  • Guest
Remote debugging
« on: January 08, 2009, 01:36:48 pm »
Hi,

I am looking for information on how to set up and configure CB for remote debugging.  I can find information on configuring the IDE to use different compilers, but not different debug links.  For example, if I want to use OpenOCD to interface between the host computer and an ARM7 or Cortex M3, what would I have to do?  I expect directing GDB commands to the correct server is a case of just using the right GDB command line and init files.  Is this the case?  What about displaying registers, etc?  Do I have to define the architecture somehow so CB knows how to display the info received from GDB, or would I have to write new display windows in C/C++?

Sorry if this is all rather basic.  I would be grateful for any links or information that would provide a bit of info for me.

Regards,
Richard (http://www.FreeRTOS.org)

Offline mariocup

  • Moderator
  • Lives here!
  • *****
  • Posts: 587
Re: Remote debugging
« Reply #1 on: January 08, 2009, 02:50:41 pm »
Hi Richard,

I do not know when an OpenOCD plug-in will be available, but perhaps these threads could be of interest.

http://forums.codeblocks.org/index.php/topic,9668.0.html

http://forums.codeblocks.org/index.php/topic,7432.0.html

Bye,

Mario

FreeRTOS.org

  • Guest
Re: Remote debugging
« Reply #2 on: January 08, 2009, 03:04:38 pm »
Thanks for the links - it looks like others are also working on this.  I will keep an eye on the forum to see the latest developments.  Code::Blocks + FreeRTOS + OpenOCD could make a very nice setup.

Regards,
Richard.

Offline martind

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Remote debugging
« Reply #3 on: January 09, 2009, 01:07:26 am »
Hi Richard,

Enjoyed your Microchip training recently.

At the moment I am just about to release a plugin that will automatically launch OpenOCD within CodeBlocks.
But for now, you can run OpenOCD standalone with a script. The script contains the important info such as the GDB port.

You then go to the debugger/options tab (right click your project, debugger tab). In the remote connections tab, you can specify a port to match whatever port was selected in the OpenOCD script.

You will most likely specify extra init commands such as "b main", to breakpoint at main etc...

Then: Run OpenOCD (from a script or command line for instance).
CB: Click debug, then it should connect.

The biggest problem you will have (without modification of CB) is halting a running process:

http://forums.codeblocks.org/index.php/topic,8577.0.html


Martin.