Firmware fails to upload to ESP-01S when "board = esp01_1m"

New to PlatformIO and am having issues uploading firmware when board = esp01_1m

Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM7
Uploading .pio\build\esp01_1m\firmware.bin
esptool.py v3.0
Serial port COM7
Connecting........_____....._____....._____....._____....._____....._____....._____

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

If I change board to board = esp12e firmware uploads ok

Configuring upload protocol…
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port…
Auto-detected: COM7
Uploading .pio\build\esp01_1m\firmware.bin
esptool.py v3.0
Serial port COM7
Connecting…
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: e8:db:84:da:35:29
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Compressed 266368 bytes to 196350…
Writing at 0x00000000… (8 %)
Writing at 0x00004000… (16 %)
Writing at 0x00008000… (25 %)
Writing at 0x0000c000… (33 %)
Writing at 0x00010000… (41 %)
Writing at 0x00014000… (50 %)
Writing at 0x00018000… (58 %)
Writing at 0x0001c000… (66 %)
Writing at 0x00020000… (75 %)
Writing at 0x00024000… (83 %)
Writing at 0x00028000… (91 %)
Writing at 0x0002c000… (100 %)
Wrote 266368 bytes (196350 compressed) at 0x00000000 in 17.3 seconds (effective 123.3 kbit/s)…
Hash of data verified.

Is this user error/misconfig on my part or an issue with PlatformIO

These are the boards Im using
https://lonelybinary.com/collections/esp-01s/products/esp-01s

Changed resetmethod in board definition json from “ck” to “nodemcu” and this resolved my problem.

%USERPROFILE%\.platformio\platforms\espressif8266\boards\esp01_1m.json

"upload": {
    "maximum_ram_size": 81920,
    "maximum_size": 1048576,
    "require_upload_port": true,
    "resetmethod": "nodemcu",
    "speed": 115200
  },
1 Like

After a bit more tinkering and reading the docs - great documentation by the way, I more elegant way is to override the option rather than editing the json file

I reverted the option back to “ck” in
%USERPROFILE%\.platformio\platforms\espressif8266\boards\esp01_1m.json and added the option override in platformio.ini

[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino
board_upload.resetmethod = nodemcu
2 Likes

Dude. Thanks for this, it worked like a charm.