Unable to flash to ESP8285 in PlatformIO but can in Linux terminal

I am running the current version of VSC with PlatformIO. I am trying to flash a file to an ESP8285 (ESP-m3 to be precise). I can erase flash and flash to the chip in a terminal window in a Linux terminal window on Mint 19.3. I am using esptool.py v 3.0 to do that flash and it works just fine. When I try to flash a file to it in VSC/PlatformIO, (which I guess is using v2.8?) it fails to connect and times out. The messages are seemingly the same as far as content. I am confused.
This is my Platformio.ini file…
Since I can only put one picture per post in at this point… gotta love anti-spam measures…

1 Like

The terminal window on Linux Mint 19.3

AND the message from PlatformIO (attempted) flash:

Seems like v2.8 of esptool can’t reset the ESP into bootloader mode. How is the ESP connected to the usb-uart adapter, especially regarding the DTR and RTS pins?

Seems to me like you’re just missing the correct reset method declaration. (Espressif 8266 — PlatformIO latest documentation)

Edit: To clarify that thing with upload methods, this is a property that comes from the chosen board = x line (the default value at least, still overrideable as seen in link above). You have board = esp8285 which maps to PlatformIO’s board JSON file

due to this definition, PIO will call esptool.py with the reset method flag “ck” (method again explained in link). If the reset method is the problem, you may also try to just set another board = x which directly has the reset method. You can browse all available board json filse (and thus possible board values, just without the .json extension` from the link above.

In any case, the goal is to that you should just match all other settings as well in the platformio.ini, regarding flash size (ldscript and maximum_size) , flash mode (DIO/QIO/DOUT/QOUT), flash frequency (20, 26 , 40 or 80MHz) etc. as the default settings there might be wrong for you. The docs link above again tell you how you can change each specific setting, together with the board documentation.

1 Like

I believe you are probably correct. I have noticed that there are settings that apply in VSC/PlatformIO that don’t seem to exist in other applications. I was not aware of that flag. Will try that once I get back home and can take shot at it. I made a programmer board that has the programmer adapter on it and has a row of pogo pins. Press it on the board, tell it to flash. Will keep you posted. Thank You

Thank you Max! It was exactly what you said. I have the 8285 board (ESP-M3) mounted onto a receiver board that a friend designed that uses the NodeMCU reset transistor setup so it does use the same reset as the NodeMCU dev board. I added the reset method line to my .ini file and gave it the ‘nodemcu’ flag. It flashed up perfectly. PlatformIO just didn’t know what to do to put the board in bootloader mode.

That resolves a LOT of issues I have had but didn’t know why.

1 Like

Thank you. I had the same problem, and I solved this problem after reading your discussion. But of course, this still took me some time, so I release my solution intuitively here: