As the title says ‘is it even possible’?
I have been successfully uploading code to ESP32 Devkit v4 (with ESP32-WROOM-1) many times on macOS through USB from VSCode/PlatformIO using Arduino (not ESP-IDF). I am developing a board which will not have USB but JTAG.
To test, I now have the Espressif ESP-Prog connected to the Devkit.
I have manually wired
JTAG1 3v3 to Devkit 3v3
JTAG2 TMS to Devkit 14 SCL-TMS
JTAG3 Gnd to Devkit GND
JTAG4 TCK to Devkit 13 SDA-TCK
JTAG5 Gnd to Devkit 0 GPIO0 – meter shows 0v
JTAG6 TDO to Devkit 15 MTDO
JTAG7 Gnd to Devkit 2 GPIO2 – meter shows 0v
JTAG8 TDI to Devkit 12 MTDI
After choosing either of the available USB ports (cu.usbserial-101/cu.usbserial-101-0, at 9600 baud) it never loads:
- Building in release mode Retrieving maximum program size
.pio/build/esp32/firmware.elf Checking size
.pio/build/esp32/firmware.elf Advanced Memory Usage is available via
“PlatformIO Home > Project Inspect” RAM: [= ] 6.9% (used
22456 bytes from 327680 bytes) Flash: [== ] 20.2% (used
264417 bytes from 1310720 bytes) Configuring upload protocol…
AVAILABLE: cmsis-dap, esp-bridge, 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 = esptool Looking for upload port… Using
manually specified: /dev/cu.usbserial-101 Uploading
.pio/build/esp32/firmware.bin esptool.py v4.5.1 Serial port
/dev/cu.usbserial-101
Connecting………………………………..
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
*** [upload] Error 2