I have been there a while ago, but now the old remedies seem to fail.
I am trying to upload a sketch to a NodeMCU Amica board. platformio.ini
:
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps = fastled/FastLED@^3.9.3
Upload log:
* Executing task: platformio run --target upload
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (4.2.1) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 1.200.0 (2.0)
- toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- FastLED @ 3.9.3
Building in release mode
Retrieving maximum program size .pio/build/nodemcuv2/firmware.elf
Checking size .pio/build/nodemcuv2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 35.0% (used 28684 bytes from 81920 bytes)
Flash: [=== ] 25.4% (used 264891 bytes from 1044464 bytes)
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/nodemcuv2/firmware.bin
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
*** [upload] Error 2
================================================================================== [FAILED] Took 24.88 seconds ==================================================================================
Platformio is
Running on an Ubuntu 24.04LTS PC.
lsusb
delivers:
...
Bus 001 Device 009: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
...
I tried:
- 3 different USB cables
- rebooting the PC
- FLASH->RESET->Release buttons
upload_speed = 115200
To no avail, unfortunately.
Addendum:
The very same with a Wemos D1 mini works immediately.