I’m having trouble getting the board to debug in PlatformIO. It was short once. But since then… When I watched certain videos… everything was shown so easily… but now I feel like I’m standing in the forest… between ESP-IDF and CMAKE and hundreds of configuration files… and Every step just brings more errors… I mean, it can’t be that complicated… to debug a simple program.
No platformio.ini
and no error message shown is already a bad start for this topic.
Do you want to use ESP-IDF as the framework or Arduino instead? In any case, you first step should be cloning / creating the respective minimal blinky projects from e.g.
- https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-hello-world
- https://github.com/platformio/platform-espressif32/tree/develop/examples/arduino-blink
And uploading them with the default (UART-based) upload protocol.
If that works (if not, something is fundamentally wrong or your upload_port = ..
is wrong), you can start making the changes for debugging. The only things that should be needed are:
- per ESP-WROVER-KIT V4.1 Getting Started Guide - ESP32 - — ESP-IDF Programming Guide latest documentation you have to populate 4 jumpers for TMS, TDO, TDI and TCK. Without that, the ESP32’s JTAG signals won’t be connected to the USB-to-JTAG chip (the FT2332HL) at all
- add both
upload_protocol = esp-prog
anddebug_tool = esp-prog
to yourplatformio.ini
to configure PlatformIO for uploading + debugging via the FTDI chip. (note:esprog
andftdi
are equivalent and map to the same OpenOCD config file) - On Windows, per https://medium.com/@manuel.bl/low-cost-esp32-in-circuit-debugging-dbbee39e508b, use Zadig to load “WinUSB” drivers for the “Dual RS232-HS (Interface 0)” device. This is also documented at the official https://docs.platformio.org/en/latest/plus/debug-tools/esp-prog.html#debugging-tool-esp-prog page.
Use the “upload” button first, not “Debug”. Does it upload? Then debugging should work equivalently.
← Sorry about that and thanks for the answer… I’ll test the examples.
The hello world example from Espressif worked…thank you very much for the tip… and above all I noticed that I didn’t have enough memory for some of the programs…the hard drive was constantly full…
It works AFTER DAYS of frustration :D! Party on! AND NO F… CMAKE OR OpenOCD OR ESP IDF in the Way… on this example i can finaly go on to my project again.