Re:ESP32 Buyer’s Guide: Different Chips, Firmware, Sensors
by doug_life on Saturday February 04, 2023 @12:55PM
(#34656444)
Oh, so this isn’t full in circuit debugging like ESP-PROG would enable, correct? These parts just have built in USB-Serial for programming and printing to the terminal without an external IC.
Edit: Never mind, it does appear to allow full in circuit debugging. I’ll have to do some more research.
Re:ESP32 Buyer’s Guide: Different Chips, Firmware, Sensors
by realharo on Saturday February 04, 2023 @01:12PM
(#34656608)
As far as debugging goes, you basically need to run `idf.py openocd` to start OpenOCD, and then connect to it with the gdb that's part of the ESP-IDF SDK, by default it should be listening on port 3333. At least that's how I have it set up in CLion.
There is more info here https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32c3/..., the ESP-IDF VS Code extension should have this doable with one button click.
On the chip or the modules, this is pins GPIO18 and GPIO19 that just need to be directly connected to USB D- and D+. Of course the chip still needs between 3.0V and 3.6V for power, so you can't power it from USB directly. If the firmware is just rebooting all the time (sometimes the case on a fresh module), you may need to pull GPIO9 low to enter bootloader instead (https://docs.espressif.com/projects/esptool/en/latest/esp32c..., there is a button for this on some boards), but otherwise you can just flash it in normal mode too.