> Executing task in folder 190722-124508-esp32dev: C:\Users\johnw\.platformio\penv\Scripts\platformio.exe run --target upload <
Processing esp32dev (framework: arduino; platform: espressif32; board: esp32dev)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PackageManager: Installing tool-openocd-esp32 @ ~1.1000.20181026
Error: Detected unknown package 'tool-openocd-esp32'
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
Weird - I tried again and it got further, but now failing here:
Building .pio\build\esp32dev\firmware.bin
esptool.py v2.6
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 4.1% (used 13540 bytes from 327680 bytes)
PROGRAM: [== ] 15.5% (used 203472 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esp-prog
Uploading .pio\build\esp32dev\firmware.bin
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
** OpenOCD init failed **
shutdown command invoked
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
*** [upload] Error 1
====================================================================== [ERROR] Took 26.67 seconds ======================================================================
The terminal process terminated with exit code: 1
I thought that was only for debugging - I’m just trying to upload. There are 2 USB/Serial ports - is one for uploading and one for JTAG? How do I configure the upload side?
I followed the instructions because I want to do JTAG debugging at some point. I tried the upload again and got this:
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esp-prog
Uploading .pio\build\esp32dev\firmware.bin
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
*** [upload] Error 253
====================================================================== [ERROR] Took 5.09 seconds ======================================================================
The terminal process terminated with exit code: 1
JTAG is not connected atm - just upload. Do I need to follow the same WinUSB procedure for channel 1 to get upload working? Just don’t want to screw anything up that will take hours to unwind…
No only 1 of the 2 channels of the adapter is connected to the JTAG interface anyways. The second is UART.
The JTAG should also be able to upload the firmware. Given that saw 0x00 not 0x01 you should double-check all wires to make sure they go to their correct JTAG pin on the ESP32. What exact target ESP32 board do you have?
It’s a custom board but wired as esp dev kit. At this point I don’t care as much about jtag debugging - that is a nice to have but the programming is a must-have. How can I skip the jtag side and just upload?
Does it work every time after that? Intermittent connections sound like a bad cable or a too-high frequency signal going through it.
This drives the cable at 20MHz, crappy breadboard cables might not like that. You can decrease the frequency in <home folder>\.platformio\packages\tool-openocd-esp32\share\openocd\scripts\board\esp-wroom-32.cfg at the adapter_khz line if needed.
Hi Maximillian, I am trying to upload (no debug) using the ESP_PROG, like Daemach did. My ESP32 is not responding, and I suspect I need to “put back one of the interfaces in UART mode so that the PC sees a COM adapter” as you suggested. I am on Ubuntu and see 2 ports, ttyUSB0 and ttyUSB1. How do I set the port as a COM adapter on LInux?
Another difficulty is that I do not have easy access to the EN pin right now. Is this necessary for uploading?