PlatformIO Community

Unable to upload to ESP32-EVB


Hello !
I’ve been trying to upload a simple sketch into the ESP32-EVB but it doesn’t work.

This also doesn’t work with Arduino IDE.

Here’s what’s in the platformio.ini:

platform =
board = esp32-evb
framework = arduino
board_build.flash_mode = qio
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
upload_speed = 115200

Here’s the output:

CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttyUSB0
Uploading .pioenvs/esp32-evb/firmware.bin v2.6
Serial port /dev/ttyUSB0

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
*** [upload] Error 2

What do you think happened ?


DOes the board have some kind of “Boot” or “Flash” button? On some Esp32 boards you have to hold down the right button while trying to flash it, not doing so could cause the error you are expiriencing.
If there is such a (or a similar) button on your board, try holding it down as soon as the output says “Serial port /dev/ttyUSB…” and hold it until it starts flashing.


I thought that I don’t have to mention this. I am holding down the boot button.

I’ve also tried Holding down the boot button, then, without releasing it, pressing the Reset button and then release the boot button, which works on Arduino IDE and uploads the code, but it doesn’t on PlatformIO IDE.


You may try to go into your PIO folder under C:\Users\<user>\.platformio\platforms\espressif32\builder\ and in line 266 "--before", "default_reset", change the default_reset to no_reset. You should then manually enter the board into bootloader mode as you have done previously (hold down flash-button, press reset, release flash-button) and then upload. If this suddenly works there is a problem with being unable to reboot the ESP32 into bootloader mode by controlling DTR/RTS lines of the CH340T chip (schematics), which may indicate a wrong hardware design of the board or a driver problem.


Thank you for your answer !

I’ve replaced default_reset' withno_reset` and now I, randomly get the following error:

Looking for upload port...
Use manually specified: /dev/ttyUSB0
Uploading .pioenvs/esp32-evb/firmware.bin v2.6
Traceback (most recent call last):
File "/home/george/.platformio/packages/tool-esptoolpy/", line 2959, in <module>
File "/home/george/.platformio/packages/tool-esptoolpy/", line 2952, in _main
File "/home/george/.platformio/packages/tool-esptoolpy/", line 2652, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "/home/george/.platformio/packages/tool-esptoolpy/", line 222, in __init__
self._port = serial.serial_for_url(port)
File "/home/george/.platformio/penv/local/lib/python2.7/site-packages/serial/", line 88, in serial_for_url
File "/home/george/.platformio/penv/local/lib/python2.7/site-packages/serial/", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
Serial port /dev/ttyUSB0
*** [upload] Error 1

When I don’t get this error, I still can’t upload sketches to the ESP from PlatformIO.