Arduino Forum

Development => Other Software Development => Topic started by: fari5 on Dec 12, 2016, 06:34 pm

Title: Sloeber - how to debug?
Post by: fari5 on Dec 12, 2016, 06:34 pm
Has anyone succeeded to use the eclipse debugging environment with Sloeber?

I have tried to install the GNU ARM Eclipse plugin additionally to Sloeber. It installs and compiles my sketch, but for some reason the debugger can't use the result.

My goal is to use GDB and QEMU without a hardware debugger, but at the moment I don't know what's the best way to do it.


Title: Re: Sloeber - how to debug?
Post by: Jantje on Dec 19, 2016, 07:45 pm
I can do hardware debugging with the zero and the ESP8266 with Sloeber (without additional hardware).
For the zero I use the launch configuration provided by the GNU ARM Eclipse plugin.
I did not try with QEMU.
But from my experience everything has to be 100% ok or it fails.
Best regards
jantje
Title: Re: Sloeber - how to debug?
Post by: fari5 on Jan 04, 2017, 09:52 pm
Hi Jantje,

thank's for the reply.

If debugging with the GNU ARM Eclipse plugin and Sloeber works for you, it probably means that I've messed up some configuration stuff.

I'm going to try it again when I've gathered enough patience for it.  :smiley-sad-blue:
Title: Re: Sloeber - how to debug?
Post by: Jantje on Jan 05, 2017, 01:01 pm
I made a video on debugging.
https://www.youtube.com/watch?v=S_QTMNhaDwM (https://www.youtube.com/watch?v=S_QTMNhaDwM)
I explain both esp8266 and the zero. The demo is with ESP8266 but the zero is pretty much the same.
If I get to it I'll make a zero video as well.
Best regards
Jantje
Title: Re: Sloeber - how to debug?
Post by: fari5 on Aug 12, 2017, 01:35 pm
Update on this topic:

Jantje has added a great feature to his plugin which allows pure software debugging (without the Arduino hardware involved).

Just watch this video:

https://www.youtube.com/watch?v=ZN-rLSyhBN8 (https://www.youtube.com/watch?v=ZN-rLSyhBN8)

This is a major breakthrough for all serious Arduino users as the original Arduino IDE doesn't support debugging at all (except for this serial monitor stuff which has severe limitations)

Thank you Jantje and I hope you'll add the Due to your supported hardware platforms, too.  ;)

Title: Re: Sloeber - how to debug?
Post by: Jantje on Aug 12, 2017, 03:45 pm
Thanbks for the nice words.
Does the due have debug capability?
Title: Re: Sloeber - how to debug?
Post by: fari5 on Aug 13, 2017, 01:30 pm
Quote
Does the due have debug capability?
I think so. At least the chip has a JTAG interface which can be used for debugging and the DUE board features a corresponding connector.

But for starters it would be enough to do the non hardware debugging on the local machine. Basically I think that I could just use the avr_local definition that you provided, but when I remember right then some variable definitions are different between the ARM based cores and the AVR ones (words have a different size or something like this).
Title: Re: Sloeber - how to debug?
Post by: Jantje on Aug 13, 2017, 03:17 pm
I made a local for the avr. Not for sam.
The local debugging is to test your non hardware code. So as long as the hardware code compiles you are mostly ok.
Title: Re: Sloeber - how to debug?
Post by: fari5 on Aug 13, 2017, 04:50 pm
Yes I understood that.
I was just wondering if this

https://www.arduino.cc/en/Reference/Word (https://www.arduino.cc/en/Reference/Word)

could lead to problems when I try to debug SAM code with an AVR_Local.

My problem is that I have to debug a program which does some variable juggling. But I hope it'll work when I replace the word variable definitions by uint32_t.
Title: Re: Sloeber - how to debug?
Post by: Jantje on Aug 13, 2017, 06:26 pm
When doing cross-platform testing it is mutch better to work with variable declarations that are the same on all plaforms. So indeed uint32_t is safer than word.