ESP8266: Unknown upload protocol esp-prog

I am trying to move my ESP8266 project over to a custom PCB. I just received the first version. The idea is to use Espressif’s Prog Board to upload to the ESP via serial connection.

The PCB is based on the wroom2 module, so I assume that’s what I’d have to select as board? I have this very simple PlatfromIO ini file:

[env:esp_wroom_02]
platform = espressif8266
board = esp_wroom_02
framework = arduino
debug_tool = esp-prog
upload_protocol = esp-prog

However when I try to upload, I get a warning saying

Warning! Unknown upload protocol esp-prog

After successfully compiling my code, nothing happens. It looks like it doesn’t even try to upload the code.

Can anybody provide any inside on what I have to do to get the esp prog recognized by platform io?

Per Espressif ESP-WROOM-02 — PlatformIO latest documentation there is only support for esptool and espota.

I only know the ESP-PROG in relation to the ESP32, but not to the ESP8266.
However, it should be possible to use it as a simple USB to serial bridge.

The setting for this is then esptool.

Thanks for the answer. I was going by this statement:

ESP-Prog’s automatic firmware downloading and serial communication functions are supported on both the ESP8266 and ESP32 platforms

From the ESP Prog site of the platform io docs here: ESP-Prog — PlatformIO v6.1 documentation

But if I understand you correctly, as long as I’m not using the JTAG stuff, the upload protocol would be esptool even if I’m using the prog board? I’ll give that a try.

Yes, thats correct.

You only use the USB to Serial feature of the ESP-PROG. Same as a FTDI cable or CH3xx Chip on devkit modules.

AFAIK the ESP8266 lacks the JTAG feature.

Remove those two lines if you want to upload via serial. That’s the regular esptool protocol then. Also, PlatformIO doesn’t support JTAG-debugging the esp8266 via the ESP-Prog (https://github.com/platformio/platform-espressif8266/issues/280), and debugging via a gdbstub is also highly experimental (https://github.com/platformio/platform-espressif8266/issues/43) and unstable.

Okay, thanks everyone, I got that working now. I simply didn’t understand that not all ways to use the esp prog board require the esp-prog upload protocol.

Unfortunately there’s still something wrong with my connection. After being able to upload a very simple project a couple of times in a row, I then never got it to work anymore. I’ve been trying to fix this for a couple of hours now, but the farthest I get is either this error:

“A fatal error occurred: Timed out waiting for packet header” right after it is saying “Uploading stub…” or sometimes it does start to copy but then stops after 20 or 30% and just times out.

I’ve tried various different baud rates, connecting the prog board and the PCB to power as I thought maybe I don’t have enough power, tried different USB ports on my Mac, manually putting it in boot mode,… nothing.

Never mind, finally got this working. After trying the third USB cable I thought I ruled out an issue with the USB cable, but apparently the forth cable fixed it and the connection is rock solid now!