I’m new to PlatformIO and ran into a couple of problems setting up my ESP32-DevKitC-32E Development Board with the ESP-PROG for debugging and firmware uploading. I was able to workaround the issues but I’m not sure what the proper way to fix them. See below for details of issues I encountered and my workaround.
Spamming Error when Debugging Started
xtensa_poll: Target failure Error: xtensa_poll: Target failure
After some research, I found “https://www.esp32.com/viewtopic.php?f=13&p=62510” which recommended upgrading openocd to “v0.10.0-esp32-20191008” or higher. I replaced the contents of “C:\Users<username>.platformio\packages\tool-openocd-esp32” with “v0.10.0-esp32-20200709” and left packages.json from the original package so platformio would think that it had the correct version
What is the proper way to update the OpenOCD version?
JTAG Upload not Working
** Programming Started ** embedded:startup.tcl:449: Error: ** Programming Failed ** in procedure 'program_esp32' in procedure 'program_esp' called at file "C:/Users/<username>/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 64 in procedure 'program_error' called at file "C:/Users/<username>/.platformio/packages/tool-openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 106 at file "embedded:startup.tcl", line 449 *** [upload] Error 1
Modifying “C:\Users<username>.platformio\platforms\espressif32\builder\main.py” to add reset to the program commands (line 373 and 379) seems to address this issue.
Should this work without the reset? Is anyone successfully able to upload to the ESP32-DevKitC-32E without modifying this script?