Page 1 of 2

Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Tue Jul 11, 2017 5:53 am
by hassan789
Hi Everyone,
I have started developing ESP32 code on Windows with Eclipse.
Coming from a visual studio based IDE in the past, I will be trying out VisualGDB next.
(https://visualgdb.com/tutorials/esp32/)

I plan to use a JTAG debugger alot, instead of relying only on printf...
Which IDE do you guys recommend? ...and is there anything other than these two that I should be taking a look at?

Thanks


EDIT:
The most popular seem to be:

1. eclipse -- free
see official documentation

2. Visual Stduio Community/Pro + VisualGDB -- $$$
https://visualgdb.com/tutorials/esp32/

3. Visual Studio Code + IDF + OpenOCD -- free
https://gojimmypi.blogspot.com/2017/05/ ... art-1.html

4. Platform IO + Atom (or VSCode) -- free
http://platformio.org/platformio-ide

5. embedXcode for MAC -- Release 7.5.7 adds support for ESP32-DevC
http://embedxcode.weebly.com

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Tue Jul 11, 2017 9:22 am
by f.h-f.s.
Yeah to start I went with visualgdb too. It makes debugging setup easier.
They aren't always up to date with the new esp-idf, keep that in mind.

Using esp-idf you can integrate with visual studio code or eclipse.
IMO vscode can be set up really well and easily for using esp-idf.

At the moment I don't use JTAG debugging anymore. To me it is more trouble than it's worth.

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Tue Jul 11, 2017 10:31 am
by ESP_krzychb
Which IDE do you guys recommend?
Hi @hassan789,
I have tested Eclipse IDE + GDB Hardware Debugging Plugin and they work great.
At the moment I don't use JTAG debugging anymore. To me it is more trouble than it's worth.
Hi @f.h-f.s.
If you could name three key things that make the trouble, what would it be?

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Tue Jul 11, 2017 11:06 am
by sintech
If you could name three key things that make the trouble, what would it be?
Can I name one and only?
Inability to use JTAG and SDIO/HSPI at the same time due to intersection of pin functions.

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Tue Jul 11, 2017 11:14 am
by f.h-f.s.
krzychb wrote: Hi @f.h-f.s.
If you could name three key things that make the trouble, what would it be?
I have trouble stepping through code. Somehow the JTAG debugger resets and the next hw-breakpoint does not hit. Overall just a confusing experience (using gdb directly, eclipse pluging and vscode). printline debugging is just way more reliable.

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Wed Jul 12, 2017 6:31 am
by ESP_krzychb
Can I name one and only?
Sure, "killer" issue are welcome ;)
I have trouble stepping through code.
Have you tried latest commit https://github.com/espressif/openocd-es ... 73d7388d11 ?
It contains fixes to the stepping.

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Wed Jul 12, 2017 7:46 am
by f.h-f.s.
I might try again =) thanks for the tip.
EDIT
@krzychbI
pulled openocd from espressif, did a build, hooked up my olimex ARM-USB-OCD-H.
Reflashed my LoPy, started OpenOCD.
The program halts on scheduler.
I started monitor, but it keeps resetting O_o
I'm probably doing smthn wrong but idk what =P

Code: Select all

running command$ bash -c ${openOCDPath}/src/openocd -s ${openOCDPath}/tcl -f ${openOCDPath}/esp32.cfg
Open On-Chip Debugger 0.10.0-dev-ged7b1a9f-dirty (2017-07-12-10:48)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 2000 kHz
force hard breakpoints
Info : clock speed 2000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xE5, after clear 0x5F).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Fri Jul 21, 2017 4:34 am
by hassan789
DELETED

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Fri Jul 21, 2017 9:38 am
by ESP_krzychb
pulled openocd from espressif, did a build, hooked up my olimex ARM-USB-OCD-H.
Reflashed my LoPy, started OpenOCD.
The program halts on scheduler.
I started monitor, but it keeps resetting O_o
I'm probably doing smthn wrong but idk what =P
@f.h-f.s.,

Sorry for missing your post. I am not sure about command to invoke OpenOCD where I see only "-f ${openOCDPath}/esp32.cfg":

With latest commit of OpenOCD, it is run providing separate configuration files (after "-f") for JTAG interface and ESP32 board. For instance for ESP-WROVER-KIT with ESP-WROOM-32 module it looks as follows:

Code: Select all

./src/openocd -s ./tcl -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Example how to run it is provided in https://github.com/espressif/openocd-es ... oom-32.cfg

Re: Favorite IDE for debugging -- Eclipse, Visual Studio, or other?

Posted: Fri Jul 21, 2017 9:49 am
by f.h-f.s.
Ooh, this is a variable defined in vscode's tasks.json
The -s flag adds a directory to search for the tlc directory and I coppied esp32.cfg to my openocd directory