In circuit debugging ?

65 views
Skip to first unread message

Roger Clark

unread,
May 10, 2015, 11:14:49 PM5/10/15
to devel...@arduino.cc
Guys,

Does anyone know the current status of the in-circuit debugger for the Zero.

I'm not actually interested in the Zero, but I am interested with interfacing to an in-circuit debugger.

I have been debugging on the command line, using the arm version of GDB which is part of the ARM toolchain for the Due, but GDB from the command line is hard to use, and I presume that there must have been some plans to do a GUI to this within the IDE



Thanks

Roger

Bill Perry

unread,
May 12, 2015, 4:42:48 PM5/12/15
to devel...@arduino.cc
Why not run DDD on top of the gdb session?
It is a pretty nice GUI.
--- bill

Roger Clark

unread,
May 12, 2015, 6:53:48 PM5/12/15
to devel...@arduino.cc
Hi Bill,

DDD was one option, but I'm not sure if its possible to build for Windows or OSX.

I did have a go at compiling under MinGW on Windows, but I get compile errors because all warnings are treated as errors and there seem to be some variables that are not used under windows

I'm now trying to compile on Linux, but that's proving to be somewhat complicated, as it keeps requesting libraries that are not part of build essentials, i.e I'm having to run configure over and over and add libs each time it comes up with an error

Judging by how complicated it is to install the correct dev env to compile under Linux, I suspect it will be nigh on impossible to build under MinGW etc on Windows

Eclipse CDT Standalone debugger looks like it may eventually be the best option, but at the moment there isn't an install script for Windows, and also they only recently introduce debugging of embedded devices to the debugger, and I can't find any explanation of how to set it up for embedded devices

I have found some old examples of setting up Eclipse to debug embedded code, but I think I followed them to the letter, and they still don't seem to work. I suspect that Eclipse has changed since the examples were written and the config now has to be different.

I presume there must be a forum or mailing list for Eclipse, so I guess I better get posting to that instead.








--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Cristian Maglie

unread,
May 13, 2015, 4:36:37 AM5/13/15
to devel...@arduino.cc
Il 11/05/2015 05:14, Roger Clark ha scritto:
> I have been debugging on the command line, using the arm version of GDB
> which is part of the ARM toolchain for the Due, but GDB from the command
> line is hard to use, and I presume that there must have been some plans
> to do a GUI to this within the IDE

A debugging GUI for the Arduino IDE is planned, but is not going to
happen soon.

I know that Eclipse and Atmel Studio can do debugging with EDBG, I guess
that other IDE's are able to debug as well.

C


Bill Perry

unread,
May 13, 2015, 12:47:15 PM5/13/15
to devel...@arduino.cc
While a GUI wrapper on top of gdb can be easier to use for some things, I wouldn't call commandline gdb hard to use.

If you have gdb working why can't you get ddd or eclipse working on top of it?
ddd is available in the debian repos so you can just install it on OS's like linux mint.


In the bigger picture, source level debugging being integrated into the IDE would seem to go against the current views of some of the core Arduino Team members that seem to be dead set against doing anything that they call "advanced" for fear of scaring
their less technical users.
I mean I got extreme push back from them for simply trying to get printf() added to the Print class.
Source level debugging is a much higher technical bar than a simple print formatting routine and I would think that those that were opposed to adding printf() to the Print class would not be in favor of adding source level debugging to the IDE.


My view is that anybody that wants to do advanced coding and debugging should probably look elsewhere than the IDE anyway.
For those that are using operating systems designed for s/w development, like *nix machines, the tools already exist to do source level debugging.
The trick is to learn what they are how to set up your environment to use them.



--- bill

Roger Clark

unread,
May 13, 2015, 6:29:25 PM5/13/15
to devel...@arduino.cc
Bill

I tried to compile the latest version of DDD on Linux Mint 32 bit, but it doesnt seem to compile.
Actually just getting the build env setup was relatively time consuming, as it needs a lot of things beyond "build essentials"

I think the chances of getting DDD working on Windows is probably about zero, unless the guy maintaining DDD could help, but I get the feeling that DDD isn't an active development as the last news item list is dated 2013 and the sources were last updated in 2009 :-(

As far as debugging not being something that an entry level programmer would need...
I'd say its quite the reverse.

Debugging using print statements makes coding a lot slower and harder than being able to put a break point into the code and then inspect the variables.

I'd see In Circuit debugging as being a significant selling point to new comers.

But I understand why the IDE Team are now not doing it, i.e because they don't have any hardware that supports this. (Well I presume the Due must, but as there is currently no support for the Zero AFIK, it doesnt look like they have any "Arduino" hardware that supports this)

In the mean time the world moves on.

I know one guy is working on it for STM32 (see http://www.stm32duino.com/viewtopic.php?f=35&t=113&hilit=debugger#p818 ) this could be a Linux only solution, but it is a significant step forwards

Andrew Kroll

unread,
May 17, 2015, 12:27:32 PM5/17/15
to devel...@arduino.cc
ddd needs several patches to work.
Why the people who maintain it don't patch, I don't know. It took me a while to get it to compile as well.
At some point I will put up a copy on github. When I don't know since I am pretty busy with work.

--
Visit my github for awesome Arduino code @ https://github.com/xxxajk

Reply all
Reply to author
Forward
0 new messages